gf_fem_get

Purpose

Obtain informations about a FEM handle F.

Synopsis

int I = gf_fem_get(fem F,'nbdof')
int I = gf_fem_get(fem F,'dim')
int I = gf_fem_get(fem F,'target_dim')
mat P = gf_fem_get(fem F,'pts')
int I = gf_fem_get(fem F,'is_equivalent')
int I = gf_fem_get(fem F,'is_lagrange')
int I = gf_fem_get(fem F,'is_polynomial')
int I = gf_fem_get(fem F,'estimated_degree')
mat V = gf_fem_get(fem F,'base_value', vec X)
mat V = gf_fem_get(fem F,'grad_base_value', vec X)
mat V = gf_fem_get(fem F,'hess_base_value', vec X)
string S = gf_fem_get(fem F,'poly_str')
string S = gf_fem_get(fem F,'char')

Description

The number of degrees of freedom of a specific fem F are returned by gf_fem_get(F,'nbdof'), while its dimension (i.e. the dimension of the reference convex) is given by gf_fem_get(F,'dim'). The target dimension, i.e. the dimension of the target space (denoted Q in the introduction to the finite element kernel) is returned by gf_fem_get(F,'target dim') (it is always 1 except for vector FEM). The geometrical nodes (on the reference convex) associated with each degree of freedom of the fem is given in the columns of gf_fem_get(F,'pts').

gf_fem_get(F,'is equivalent'), gf_fem_get(F,'is lagrange'), or gf_fem_get(F,'is polynomial') gives some important properties of a FEM (a polynomial fem is a necessary condition for an exact integration method, and a interpolation a function of a Lagrangian fem is easy).

gf_fem_get(F,'estimated_degree') : return an estimation of the polynomial degree of a fem (this is an estimation for fem which are not polynomials). gf_fem_get(F,'base_value',X) evaluate the values of all basis functions of the FEM at point X (X is supposed to be in the reference convex!). gf_fem_get(F,'grad_base_value',X) and gf_fem_get(F,'hess_base_value',X) evaluate respectively the first and second derivative of the basis functions.

gf_fem_get(F, 'char') return the canonical name of the FEM in getfem, and gf_fem_get(F, 'poly_str') return the polynomial expression of its basis functions in the reference convex (of course this will fail on non-polynomial FEMs).

Examples

Plotting the basis functions of the P5 fem on a segment:
]8cm

f=gf_fem('FEM_PK(1,5)');
n=100; M=zeros(gf_fem_get(f,'nbdof'),n);
for i=1:n, 
  M(:,i)=gf_fem_get(f,'base_value',(i-1)/(n-1)); 
end;
plot((0:n-1)/n,M);  
basis functions of the P5 fem

Viewing the basis function of the Argyris FEM:

f=gf_fem('FEM_ARGYRIS');
gf_fem_get(f, 'poly_str')

See Also