38 #ifndef GETFEM_FEM_GLOBAL_FUNCTION_H__
39 #define GETFEM_FEM_GLOBAL_FUNCTION_H__
50 std::vector<pglobal_function> functions;
53 const bool has_mesh_im;
55 mutable std::vector<std::vector<size_type> > index_of_global_dof_;
56 mutable bgeot::pstored_point_tab pspt_override;
58 struct precomp_data { std::vector<base_tensor> val, grad, hess; };
62 public std::vector< std::map<bgeot::pstored_point_tab,
67 mutable std::shared_ptr<precomp_pool> precomps;
69 DAL_SIMPLE_KEY(precomp_pool_key, std::shared_ptr<precomp_pool>);
78 virtual bgeot::pstored_point_tab node_tab(
size_type)
const
79 {
return pspt_override; }
81 void base_value(
const base_node &, base_tensor &)
const;
86 base_tensor &t,
bool =
true)
const;
88 base_tensor &t,
bool =
true)
const;
90 base_tensor &,
bool =
true)
const;
97 { DAL_STORED_OBJECT_DEBUG_DESTROYED(
this,
"Global function fem"); }
base class for static stored objects
Deal with interdependencies of objects.
fem object with global basis functions.
virtual void update_from_context() const
this function has to be defined and should update the object when the context is modified.
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...
virtual bgeot::pconvex_ref ref_convex(size_type cv) const
Return the convex of the reference element.
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...
virtual size_type nb_dof(size_type cv) const
Number of degrees of freedom.
void hess_base_value(const base_node &, base_tensor &) const
Give the value of all hessians (on ref.
virtual const bgeot::convex< base_node > & node_convex(size_type cv) const
Gives the convex representing the nodes on the reference element.
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 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 grad_base_value(const base_node &, base_tensor &) const
Give the value of all gradients (on ref.
structure passed as the argument of fem interpolation functions.
Describe an integration method linked to a mesh.
Describe a mesh (collection of convexes (elements) and points).
Base class for finite element description.
Definition of the finite element methods.
Definition of global functions to be used as base or enrichment functions in fem.
Define the getfem::mesh_fem class.
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_fem_global_function(const pfem &pf)
release a global function FEM
pfem new_fem_global_function(const std::vector< pglobal_function > &funcs, const mesh &m)
create a new global function FEM.