[Getdp] solving trivial example using edge elements

Olivier Castany castany at quatramaran.ens.fr
Wed May 16 09:31:41 CEST 2007


> apparently, the boundary conditions are not applied as you want (from 
> the file edge_elts.pre, I see that zero is assigned to all the edge 
> elements on the boundary). Now, I don't know how to apply these BC... 
> (and I'm interested)


I made a quick try : I remove the assign constraint and I weakly apply 
the BC on the boundary

It works

see attached
-------------- next part --------------
Jacobian {
  { Name Vol ;
    Case{
      { Region All ; Jacobian Vol ; }
    }
  }
  { Name Sur ;
    Case{
      { Region All ; Jacobian Sur ; }
    }
  }

}

Integration {
  { Name CurlCurl ;
    Case { 
      { Type Gauss ;
        Case {  
        
          { GeoElement Point       ; NumberOfPoints  1 ; }
          { GeoElement Line        ; NumberOfPoints  3 ; }
          { GeoElement Triangle    ; NumberOfPoints  4 ; }
          { GeoElement Quadrangle  ; NumberOfPoints  4 ; }
          { GeoElement Tetrahedron ; NumberOfPoints  4 ; }
          { GeoElement Hexahedron  ; NumberOfPoints  6 ; }
          { GeoElement Prism       ; NumberOfPoints  6 ; } 

	}
      }
    }
  }
}

Group {
  Omega = Region[100];
  Bdry  = Region[101];
}

Function {
  f[Omega] = Vector[1.0, 0.0, 0.0];
  g[Bdry] = Vector[1.0, 0.0, 0.0];
}

Constraint {
  { Name DirichletBC; Type Assign;
    Case {
      { Region Bdry; Value g[]; }
// { Region Bdry; Type Assign ; Value 1; }
    }
  }
}

FunctionSpace {
  { Name H0curl; Type Form1;
    BasisFunction {
      { Name phi_j; NameOfCoef U_j; Function BF_Edge;
        Support Region[{Omega,Bdry}]; Entity EdgesOf[All]; }
    }
//    Constraint {
//      { NameOfCoef U_j; EntityType EdgesOf;
//        NameOfConstraint DirichletBC; }
//    }
  }
}

Formulation {
  { Name CurlSqr; Type FemEquation;
    Quantity {
      { Name uh; Type Local; NameOfSpace H0curl; }
    }
    Equation {
      Galerkin { [ Dof{uh}, {uh} ]; In Omega;
                 Jacobian Vol; Integration CurlCurl; }
      Galerkin { [ Dof{d uh}, {d uh} ] ; In Omega;
                 Jacobian Vol; Integration CurlCurl; }
      Galerkin { [ -f[], {uh} ]; In Omega;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { [ Dof{uh}, {uh} ]; In Bdry;
                 Jacobian Sur; Integration CurlCurl; }
      Galerkin { [ -g[], {uh} ]; In Bdry;
                 Jacobian Sur; Integration CurlCurl; }

    }
  }
}

Resolution {
  { Name DiscreteBVP;
    System {
      { Name SysCurlSqr; NameOfFormulation CurlSqr; }
    }
    Operation {
      Generate[SysCurlSqr]; Solve[SysCurlSqr]; SaveSolution[SysCurlSqr];
    }
  }
}


PostProcessing {
  { Name DiscreteBVP; NameOfFormulation CurlSqr;
    Quantity {
      { Name uh;
        Value {
          Local { [ {uh} ]; In Omega; Jacobian Vol; }
        }
      }
    }
  }
}

PostOperation {
  { Name Map; NameOfPostProcessing DiscreteBVP;
    Operation {
      Print [ uh, OnElementsOf Omega, File "uh.pos"];
    }
  }
}