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::vector<size_type> ind_dof;
114 mutable bgeot::rtree::pbox_set boxlst;
116 mutable base_tensor taux;
119 mutable base_matrix G;
120 mutable bgeot::pstored_point_tab pspt_override;
121 mutable bgeot::multi_index mi2, mi3;
122 mutable base_node ptref;
123 mutable gmm::dense_matrix<scalar_type> trans;
125 void build_rtree(
void)
const;
127 bool find_a_point(base_node pt, base_node &ptr,
130 virtual void update_from_context(
void)
const;
132 const base_node &ptr)
const;
138 virtual bgeot::pconvex_ref ref_convex(
size_type cv)
const;
140 virtual bgeot::pstored_point_tab node_tab(
size_type)
const 141 {
return pspt_override; }
142 void base_value(
const base_node &, base_tensor &)
const;
143 void grad_base_value(
const base_node &, base_tensor &)
const;
144 void hess_base_value(
const base_node &, base_tensor &)
const;
146 base_tensor &t,
bool =
true)
const;
148 base_tensor &t,
bool =
true)
const;
150 base_tensor &,
bool =
true)
const;
154 dal::bit_vector interpolated_convexes()
const;
158 void gauss_pts_stats(
unsigned &ming,
unsigned &maxg,
159 scalar_type &meang)
const;
162 pinterpolated_func pif_ = 0,
163 dal::bit_vector blocked_dof = dal::bit_vector(),
164 bool store_val =
true);
166 { DAL_STORED_OBJECT_DEBUG_DESTROYED(
this,
"Interpolated fem"); }
181 pinterpolated_func pif = 0,
182 dal::bit_vector blocked_dof = dal::bit_vector(),
183 bool store_val =
true);
Base class for finite element description.
Define the getfem::mesh_im class (integration of getfem::mesh_fem).
Define the getfem::mesh_fem class.
does the inversion of the geometric transformation for a given convex
void del_stored_object(const pstatic_stored_object &o, bool ignore_unstored)
Delete an object and the object which depend on it.
Describe an integration method linked to a mesh.
void del_interpolated_fem(const pfem &pf)
release an interpolated fem
size_t size_type
used as the common size type in the library
Inversion of geometric transformations.
structure passed as the argument of fem interpolation functions.
Deal with interdependencies of objects.
GEneric Tool for Finite Element Methods.
std::shared_ptr< const getfem::virtual_fem > pfem
type of pointer on a fem description
Describe a finite element method linked to a mesh.
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.
Definition of the finite element methods.
FEM which interpolates a mesh_fem on a different mesh.
Balanced tree of n-dimensional rectangles.
region-tree for window/point search on a set of rectangles.