GetFEM  5.4.2
getfem::projected_fem Class Reference

FEM which interpolates the projection of a mesh_fem on a different mesh. More...

#include <getfem_projected_fem.h>

Inherits getfem::virtual_fem, and getfem::context_dependencies.

Public Member Functions

virtual size_type nb_dof (size_type cv) const
 Number of degrees of freedom. More...
 
virtual bgeot::pconvex_ref ref_convex (size_type cv) const
 Return the convex of the reference element.
 
virtual const bgeot::convex< base_node > & node_convex (size_type cv) const
 Gives the convex representing the nodes on the reference element.
 
void base_value (const base_node &, base_tensor &) const
 Give the value of all components of the base functions at the point x of the reference element. More...
 
void grad_base_value (const base_node &, base_tensor &) const
 Give the value of all gradients (on ref. More...
 
void hess_base_value (const base_node &, base_tensor &) const
 Give the value of all hessians (on ref. More...
 
void real_base_value (const fem_interpolation_context &c, base_tensor &t, bool=true) const
 Give the value of all components of the base functions at the current point of the fem_interpolation_context. More...
 
void real_grad_base_value (const fem_interpolation_context &c, base_tensor &t, bool=true) const
 Give the gradient of all components of the base functions at the current point of the fem_interpolation_context. More...
 
void real_hess_base_value (const fem_interpolation_context &, base_tensor &, bool=true) const
 Give the hessian of all components of the base functions at the current point of the fem_interpolation_context. More...
 
dal::bit_vector projected_convexes () const
 return the list of convexes of the projected mesh_fem which contain at least one gauss point (should be all convexes)!
 
mesh_region projected_target_region () const
 faces and convexes from the target region that contain at least one Gauss point that is projected by the source
 
void gauss_pts_stats (unsigned &ming, unsigned &maxg, scalar_type &meang) const
 return the min/max/mean number of gauss points in the convexes of the projected mesh_fem
 
- Public Member Functions inherited from getfem::virtual_fem
virtual size_type nb_base (size_type cv) const
 Number of basis functions.
 
size_type nb_base_components (size_type cv) const
 Number of components (nb_dof() * dimension of the target space).
 
const std::vector< pdof_description > & dof_types () const
 Get the array of pointer on dof description.
 
dim_type dim () const
 dimension of the reference element.
 
dim_type target_dim () const
 dimension of the target space.
 
vec_type vectorial_type () const
 Type of vectorial element.
 
bgeot::pconvex_structure basic_structure (size_type cv) const
 Gives the convex of the reference element.
 
bgeot::pconvex_structure structure (size_type cv) const
 Gives the convex structure of the reference element nodes.
 
const base_node & node_of_dof (size_type cv, size_type i) const
 Gives the node corresponding to the dof i. More...
 
bool is_lagrange () const
 true if the base functions are such that $ \varphi_i(\textrm{node\_of\_dof(j)}) = \delta_{ij} $
 
bool is_polynomial () const
 true if the base functions are polynomials
 
template<typename CVEC , typename VVEC >
void interpolation (const fem_interpolation_context &c, const CVEC &coeff, VVEC &val, dim_type Qdim) const
 Interpolate at an arbitrary point x given on the reference element. More...
 
template<typename MAT >
void interpolation (const fem_interpolation_context &c, MAT &M, dim_type Qdim) const
 Build the interpolation matrix for the interpolation at a fixed point x, given on the reference element. More...
 
template<typename CVEC , typename VMAT >
void interpolation_grad (const fem_interpolation_context &c, const CVEC &coeff, VMAT &val, dim_type Qdim=1) const
 Interpolation of the gradient. More...
 
template<typename CVEC , typename VMAT >
void interpolation_hess (const fem_interpolation_context &c, const CVEC &coeff, VMAT &val, dim_type Qdim) const
 Interpolation of the hessian. More...
 
template<typename CVEC >
void interpolation_diverg (const fem_interpolation_context &c, const CVEC &coeff, typename gmm::linalg_traits< CVEC >::value_type &val) const
 Interpolation of the divergence. More...
 
void add_node (const pdof_description &d, const base_node &pt, const dal::bit_vector &faces)
 internal function adding a node to an element for the creation of a finite element method. More...
 
- Public Member Functions inherited from getfem::context_dependencies
bool context_check () const
 return true if update_from_context was called
 

Protected Member Functions

virtual void update_from_context (void) const
 this function has to be defined and should update the object when the context is modified. More...
 

Detailed Description

FEM which interpolates the projection of a mesh_fem on a different mesh.

Note that the memory cost of this method is extremely high!

Definition at line 70 of file getfem_projected_fem.h.

Member Function Documentation

◆ update_from_context()

void getfem::projected_fem::update_from_context ( void  ) const
protectedvirtual

this function has to be defined and should update the object when the context is modified.

setup global dofs, with dummy coordinates

Implements getfem::context_dependencies.

Definition at line 322 of file getfem_projected_fem.cc.

◆ nb_dof()

size_type getfem::projected_fem::nb_dof ( size_type  ) const
virtual

Number of degrees of freedom.

Parameters
cvthe convex number for this FEM. This information is rarely used, but is needed by some "special" FEMs, such as getfem::interpolated_fem.

Reimplemented from getfem::virtual_fem.

Definition at line 483 of file getfem_projected_fem.cc.

◆ base_value()

void getfem::projected_fem::base_value ( const base_node &  x,
base_tensor &  t 
) const
virtual

Give the value of all components of the base functions at the point x of the reference element.

Basic function used essentially by fem_precomp.

Implements getfem::virtual_fem.

Definition at line 513 of file getfem_projected_fem.cc.

◆ grad_base_value()

void getfem::projected_fem::grad_base_value ( const base_node &  x,
base_tensor &  t 
) const
virtual

Give the value of all gradients (on ref.

element) of the components of the base functions at the point x of the reference element. Basic function used essentially by fem_precomp.

Implements getfem::virtual_fem.

Definition at line 515 of file getfem_projected_fem.cc.

◆ hess_base_value()

void getfem::projected_fem::hess_base_value ( const base_node &  x,
base_tensor &  t 
) const
virtual

Give the value of all hessians (on ref.

element) of the components of the base functions at the point x of the reference element. Basic function used essentially by fem_precomp.

Implements getfem::virtual_fem.

Definition at line 518 of file getfem_projected_fem.cc.

◆ real_base_value()

void getfem::projected_fem::real_base_value ( const fem_interpolation_context c,
base_tensor &  t,
bool  withM = true 
) const
virtual

Give the value of all components of the base functions at the current point of the fem_interpolation_context.

Used by elementary computations. if withM is false the matrix M for non tau-equivalent elements is not taken into account.

Reimplemented from getfem::virtual_fem.

Definition at line 533 of file getfem_projected_fem.cc.

◆ real_grad_base_value()

void getfem::projected_fem::real_grad_base_value ( const fem_interpolation_context c,
base_tensor &  t,
bool  withM = true 
) const
virtual

Give the gradient of all components of the base functions at the current point of the fem_interpolation_context.

Used by elementary computations. if withM is false the matrix M for non tau-equivalent elements is not taken into account.

Reimplemented from getfem::virtual_fem.

Definition at line 627 of file getfem_projected_fem.cc.

◆ real_hess_base_value()

void getfem::projected_fem::real_hess_base_value ( const fem_interpolation_context c,
base_tensor &  t,
bool  withM = true 
) const
virtual

Give the hessian of all components of the base functions at the current point of the fem_interpolation_context.

Used by elementary computations. if withM is false the matrix M for non tau-equivalent elements is not taken into account.

Reimplemented from getfem::virtual_fem.

Definition at line 726 of file getfem_projected_fem.cc.


The documentation for this class was generated from the following files: