gf_fem

Purpose

Returns a handle to one of the various Finite Elements Method defined in getfem++ .

Synopsis

fem = gf_fem(string fem_name)

Description

The fem_name should contain a description of the finite element method. Please refer to the getfem++ manual (especially the description of finite element and integration methods) for a complete reference. Here is a list of some of them:
FEM_PK(N,K) classical Lagrange element PK on a simplex
FEM_PK_DISCONTINUOUS(N,K) discontinuous Lagrange element PK on a simplex
FEM_QK(N,K) classical Lagrange element QK on a parallelepiped
FEM_PK_PRISM(N,K) classical Lagrange element PK on a prism
FEM_PRODUCT(FEM1,FEM2) tensorial product of two polynomial elements
FEM_HERMITE(N) Hermite element on the simplex of dimension N=1,2 or 3
FEM_ARGYRIS Argyris C1 element on the triangle
FEM_HCT_TRIANGLE HCT composite C1 element on the triangle
FEM_PK_HIERARCHICAL(N,K) PK element with a hierarchical basis
FEM_QK_HIERARCHICAL(N,K) QK element with a hierarchical basis
FEM_PK_PRISM_HIERARCHICAL(N,K) PK element on a prism with a hierarchical basis
FEM_STRUCTURED_COMPOSITE(FEM, K) Composite fem on a grid with K divisions
FEM_PK_HIERARCHICAL_COMPOSITE(N,K,S) PK composite element on a grid with S subdivisions and with a hierarchical basis
FEM_PK_FULL_HIERARCHICAL_COMPOSITE(N,K,S) PK composite element with S subdivisions and a hierarchical basis on both degree and subdivision
FEM_RT0(N) Raviart-Thomas element of order 0 on a simplex of dimension N.
FEM_NEDELEC(N) Nedelec edge element of order 0 on a simplex of dimension N.
Of course, you have to ensure that the selected fem is compatible with the geometric transformation: a PK fem has no meaning on a quadrangle.

Examples

To get a fem of degree 2 on a quadrangle:
fem = gf_fem('FEM_QK(2,2)');
or
fem = gf_fem('FEM_PRODUCT(FEM_PK(1,1),FEM_PK(1,1))');  
The matlab function sprintf might be useful if you need to build the PK fem with k and n as arguments:
fem = gf_fem(sprintf('FEM_PK(%d,%d)', k, n));  

See Also