Go to the documentation of this file.
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 std::vector<size_type> &
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;
160 typedef std::shared_ptr<partial_mesh_fem> ppartial_mesh_fem;
174 unsigned P =
unsigned(-1));
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.
a subclass of mesh_fem which allows to eliminate a number of dof of the original mesh_fem.
virtual dim_type get_qdim() const
Return the Q dimension.
virtual void set_qdim(const bgeot::multi_index &)
Set the dimension for an arbitrary order tensor field.
void write_to_file(std::ostream &ost) const
Write the mesh_fem to a stream.
virtual const mesh::ind_cv_ct & convex_to_basic_dof(size_type d) const
Return the list of convexes attached to the specified dof.
virtual size_type first_convex_of_basic_dof(size_type d) const
Shortcut for convex_to_dof(d)[0].
size_t size_type
used as the common size type in the library
size_type nb_dof(void) const
Return the total number of degrees of freedom.
virtual dim_type basic_dof_qdim(size_type d) const
Return the dof component number (0<= x <Qdim)
size_type first_convex_of_basic_dof(size_type d) const
Shortcut for convex_to_dof(d)[0].
const mesh::ind_cv_ct & convex_to_basic_dof(size_type d) const
Return the list of convexes attached to the specified dof.
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!...
Describe a finite element method linked to a mesh.
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...
base_node point_of_basic_dof(size_type cv, size_type i) const
Return the geometrical location of a degree of freedom.
virtual void set_qdim(dim_type)
Change the Q dimension.
gmm::uint16_type short_type
used as the common short type integer in the library
size_type nb_basic_dof(void) const
Return the total number of basic degrees of freedom (before the optional reduction).
GEneric Tool for Finite Element Methods.
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.
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 size_type nb_basic_dof_of_element(size_type cv) const
Return the number of degrees of freedom attached to a given convex.
virtual size_type nb_basic_dof() const
Return the total number of basic degrees of freedom (before the optional reduction).
size_type nb_basic_dof_of_element(size_type cv) const
Return the number of degrees of freedom attached to a given convex.
Define the getfem::mesh_im class (integration of getfem::mesh_fem).
Define the getfem::mesh_fem class.
virtual void set_qdim(dim_type, dim_type, dim_type, dim_type)
Set the dimension for a fourth order tensor field.
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...
std::shared_ptr< const getfem::virtual_fem > pfem
type of pointer on a fem description
void read_from_file(std::istream &)
Read the mesh_fem from a stream.
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 dim_type get_qdim() const
Return the Q dimension.
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!...
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 void set_qdim(dim_type, dim_type)
Set the dimension for a matrix field.
virtual base_node point_of_basic_dof(size_type cv, size_type i) const
Return the geometrical location of a degree of freedom.
void update_from_context(void) const
this function has to be defined and should update the object when the context is modified.
virtual ind_dof_ct ind_basic_dof_of_element(size_type cv) const
Give an array of the dof numbers a of convex.
structure used to hold a set of convexes and/or convex faces.
bool context_check() const
return true if update_from_context was called
ind_dof_ct ind_basic_dof_of_element(size_type cv) const
Give an array of the dof numbers a of convex.
virtual size_type nb_dof() const
Return the total number of degrees of freedom.
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.
dim_type basic_dof_qdim(size_type d) const
Return the dof component number (0<= x <Qdim)