41 #ifndef GETFEM_INTERPOLATED_FEM_H__ 
   42 #define GETFEM_INTERPOLATED_FEM_H__ 
   54   struct virtual_interpolated_func {
 
   55     virtual void val(
const base_node&, base_node &)
 const 
   56     { GMM_ASSERT1(
false, 
"this interpolated_func has no value"); }
 
   57     virtual void grad(
const base_node&, base_matrix &)
 const 
   58     { GMM_ASSERT1(
false, 
"this interpolated_func has no gradient"); }
 
   59     virtual void hess(
const base_node&, base_matrix &)
 const 
   60     { GMM_ASSERT1(
false, 
"this interpolated_func has no hessian"); }
 
   61     virtual ~virtual_interpolated_func() {}
 
   65   typedef const virtual_interpolated_func *pinterpolated_func;
 
   68   struct gausspt_interpolation_data {
 
   76     std::vector<size_type> local_dof; 
 
   89     struct elt_interpolation_data {
 
   91       std::vector<gausspt_interpolation_data> gausspt;
 
   92       std::vector<size_type> inddof;
 
   93       pintegration_method pim; 
 
   94       elt_interpolation_data() : 
nb_dof(0), pim(0) {}
 
  101     pinterpolated_func pif; 
 
  104     dal::bit_vector blocked_dof;
 
  107     mutable std::vector<elt_interpolation_data> elements;
 
  110     mutable std::map<size_type, std::vector<size_type>> box_to_convexes_map;
 
  111     mutable std::vector<size_type> ind_dof; 
 
  115     mutable bgeot::rtree::pbox_set boxlst;
 
  117     mutable base_tensor taux;
 
  120     mutable base_matrix G;
 
  121     mutable bgeot::pstored_point_tab pspt_override;
 
  122     mutable bgeot::multi_index mi2, mi3;
 
  123     mutable base_node ptref;
 
  124     mutable gmm::dense_matrix<scalar_type> trans;
 
  126     void build_rtree(
void) 
const;
 
  128     bool find_a_point(base_node pt, base_node &ptr,
 
  133                                 const base_node &ptr) 
const;
 
  141     virtual bgeot::pstored_point_tab node_tab(
size_type)
 const 
  142     { 
return pspt_override; }
 
  143     void base_value(
const base_node &, base_tensor &) 
const;
 
  147                          base_tensor &t, 
bool = 
true) 
const;
 
  149                               base_tensor &t, 
bool = 
true) 
const;
 
  151                               base_tensor &, 
bool = 
true) 
const;
 
  160                          scalar_type &meang) 
const;
 
  163                      pinterpolated_func pif_ = 0,
 
  164                      dal::bit_vector blocked_dof = dal::bit_vector(),
 
  165                      bool store_val = 
true);
 
  167     { DAL_STORED_OBJECT_DEBUG_DESTROYED(
this, 
"Interpolated fem"); }
 
  182                             pinterpolated_func pif = 0,
 
  183                             dal::bit_vector blocked_dof = dal::bit_vector(),
 
  184                             bool store_val = 
true);
 
Inversion of geometric transformations.
region-tree for window/point search on a set of rectangles.
does the inversion of the geometric transformation for a given convex
Balanced tree of n-dimensional rectangles.
Deal with interdependencies of objects.
structure passed as the argument of fem interpolation functions.
FEM which interpolates a mesh_fem on a different mesh.
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_interpolati...
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_...
void grad_base_value(const base_node &, base_tensor &) const
Give the value of all gradients (on ref.
virtual size_type nb_dof(size_type cv) const
Number of degrees of freedom.
virtual void update_from_context(void) const
this function has to be defined and should update the object when the context is modified.
virtual const bgeot::convex< base_node > & node_convex(size_type cv) const
Gives the convex representing the nodes on the reference element.
void hess_base_value(const base_node &, base_tensor &) const
Give the value of all hessians (on ref.
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.
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 interpolated mesh_fem
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_interpolatio...
dal::bit_vector interpolated_convexes() const
return the list of convexes of the interpolated mesh_fem which contain at least one gauss point (shou...
virtual bgeot::pconvex_ref ref_convex(size_type cv) const
Return the convex of the reference element.
Describe a finite element method linked to a mesh.
Describe an integration method linked to a mesh.
Base class for finite element description.
Definition of the finite element methods.
Define the getfem::mesh_fem class.
Define the getfem::mesh_im class (integration of getfem::mesh_fem).
std::shared_ptr< const getfem::virtual_fem > pfem
type of pointer on a fem description
size_t size_type
used as the common size type in the library
void del_stored_object(const pstatic_stored_object &o, bool ignore_unstored)
Delete an object and the object which depend on it.
GEneric Tool for Finite Element Methods.
void del_interpolated_fem(const pfem &pf)
release an interpolated fem
pfem new_interpolated_fem(const mesh_fem &mef, const mesh_im &mim, pinterpolated_func pif=0, dal::bit_vector blocked_dof=dal::bit_vector(), bool store_val=true)
create a new interpolated FEM.