43 #ifndef GETFEM_PARTIAL_MESH_FEM_H__ 44 #define GETFEM_PARTIAL_MESH_FEM_H__ 58 mutable bool is_adapted;
66 void adapt(
const dal::bit_vector &kept_dof,
67 const dal::bit_vector &rejected_elt = dal::bit_vector());
74 virtual const bgeot::multi_index &get_qdims()
const 75 {
return mf.get_qdims(); }
77 virtual bool is_uniform()
const {
return mf.is_uniform(); }
78 virtual bool is_uniformly_vectorized()
const 79 {
return mf.is_uniformly_vectorized(); }
82 GMM_ASSERT1(
false,
"The Qdim of a partial_mesh_fem is the same as " 87 GMM_ASSERT1(
false,
"The Qdim of a partial_mesh_fem is the same as " 91 virtual void set_qdim(dim_type, dim_type, dim_type, dim_type) {
92 GMM_ASSERT1(
false,
"The Qdim of a partial_mesh_fem is the same as " 96 virtual void set_qdim(
const bgeot::multi_index &) {
97 GMM_ASSERT1(
false,
"The Qdim of a partial_mesh_fem is the same as " 104 const bgeot::mesh_structure::ind_cv_ct &
105 ind_scalar_basic_dof_of_element(
size_type cv)
const 106 {
return mf.ind_scalar_basic_dof_of_element(cv); }
135 return use_reduction ? gmm::mat_nrows(R_) : mf.
nb_dof();
148 { GMM_ASSERT1(
false,
"You cannot directly read this kind of mesh_fem"); }
150 void write_to_file(
const std::string &name,
bool with_mesh=
false)
const;
157 typedef std::shared_ptr<partial_mesh_fem> ppartial_mesh_fem;
171 unsigned P =
unsigned(-1));
virtual dim_type get_qdim() const
Return the Q dimension.
virtual size_type nb_basic_dof_of_element(size_type cv) const
Return the number of degrees of freedom attached to a given convex.
size_type first_convex_of_basic_dof(size_type d) const
Shortcut for convex_to_dof(d)[0].
void write_to_file(std::ostream &ost) const
Write the mesh_fem to a stream.
virtual size_type nb_dof() const
Return the total number of degrees of freedom.
base_node point_of_basic_dof(size_type cv, size_type i) const
Return the geometrical location of a degree of freedom.
structure used to hold a set of convexes and/or convex faces.
dal::bit_vector basic_dof_on_region(const mesh_region &b) const
Get a list of basic dof lying on a given mesh_region.
void read_from_file(std::istream &)
Read the mesh_fem from a stream.
virtual dim_type basic_dof_qdim(size_type d) const
Return the dof component number (0<= x <Qdim)
virtual void set_qdim(dim_type, dim_type)
Set the dimension for a matrix field.
ind_dof_ct ind_basic_dof_of_element(size_type cv) const
Give an array of the dof numbers a of convex.
Define the getfem::mesh_im class (integration of getfem::mesh_fem).
Define the getfem::mesh_fem class.
virtual pfem fem_of_element(size_type cv) const
Return the basic fem associated with an element (if no fem is associated, the function will crash! us...
Describe an integration method linked to a mesh.
virtual const mesh::ind_cv_ct & convex_to_basic_dof(size_type d) const
Return the list of convexes attached to the specified dof.
pfem fem_of_element(size_type cv) const
Return the basic fem associated with an element (if no fem is associated, the function will crash! us...
const mesh::ind_cv_ct & convex_to_basic_dof(size_type d) const
Return the list of convexes attached to the specified dof.
size_t size_type
used as the common size type in the library
virtual size_type nb_basic_dof() const
Return the total number of basic degrees of freedom (before the optional reduction).
virtual dal::bit_vector basic_dof_on_region(const mesh_region &b) const
Get a list of basic dof lying on a given mesh_region.
virtual size_type nb_basic_dof_of_face_of_element(size_type cv, short_type f) const
Return the number of dof lying on the given convex face.
virtual dim_type get_qdim() const
Return the Q dimension.
virtual base_node point_of_basic_dof(size_type cv, size_type i) const
Return the geometrical location of a degree of freedom.
void adapt(const dal::bit_vector &kept_dof, const dal::bit_vector &rejected_elt=dal::bit_vector())
build the mesh_fem keeping only the dof of the original mesh_fem which are listed in kept_dof...
base_node point_of_basic_dof(size_type d) const
Return the geometrical location of a degree of freedom.
GEneric Tool for Finite Element Methods.
virtual void set_qdim(const bgeot::multi_index &)
Set the dimension for an arbitrary order tensor field.
std::shared_ptr< const getfem::virtual_fem > pfem
type of pointer on a fem description
size_type nb_basic_dof(void) const
Return the total number of basic degrees of freedom (before the optional reduction).
Describe a finite element method linked to a mesh.
gmm::uint16_type short_type
used as the common short type integer in the library
virtual size_type first_convex_of_basic_dof(size_type d) const
Shortcut for convex_to_dof(d)[0].
size_type nb_basic_dof_of_face_of_element(size_type cv, short_type f) const
Return the number of dof lying on the given convex face.
size_type nb_dof(void) const
Return the total number of degrees of freedom.
void update_from_context(void) const
this function has to be defined and should update the object when the context is modified.
size_type nb_basic_dof_of_element(size_type cv) const
Return the number of degrees of freedom attached to a given convex.
ind_dof_face_ct ind_basic_dof_of_face_of_element(size_type cv, short_type f) const
Give an array of the dof numbers lying of a convex face (all degrees of freedom whose associated base...
virtual ind_dof_face_ct ind_basic_dof_of_face_of_element(size_type cv, short_type f) const
Give an array of the dof numbers lying of a convex face (all degrees of freedom whose associated base...
a subclass of mesh_fem which allows to eliminate a number of dof of the original mesh_fem.
dal::bit_vector select_dofs_from_im(const mesh_fem &mf, const mesh_im &mim, unsigned P=unsigned(-1))
Return a selection of dof who contribute significantly to the mass-matrix that would be computed with...
bool context_check() const
return true if update_from_context was called
virtual ind_dof_ct ind_basic_dof_of_element(size_type cv) const
Give an array of the dof numbers a of convex.
dim_type basic_dof_qdim(size_type d) const
Return the dof component number (0<= x <Qdim)
virtual void set_qdim(dim_type)
Change the Q dimension.
virtual void set_qdim(dim_type, dim_type, dim_type, dim_type)
Set the dimension for a fourth order tensor field.