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 " 
  101     const mesh_fem &linked_mesh_fem()
 const { 
return mf; }
 
  106     const std::vector<size_type> &
 
  107     ind_scalar_basic_dof_of_element(
size_type cv)
 const 
  108     { 
return mf.ind_scalar_basic_dof_of_element(cv); }
 
  137       return use_reduction ? gmm::mat_nrows(R_) : mf.
nb_dof();
 
  150     { GMM_ASSERT1(
false, 
"You cannot directly read this kind of mesh_fem"); }
 
  152     void write_to_file(
const std::string &name, 
bool with_mesh=
false) 
const;
 
  162   typedef std::shared_ptr<partial_mesh_fem> ppartial_mesh_fem;
 
  176                                       unsigned P = 
unsigned(-1));
 
bool context_check() const
return true if update_from_context was called
Describe a finite element method linked to a mesh.
virtual 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 first_convex_of_basic_dof(size_type d) const
Shortcut for convex_to_dof(d)[0].
virtual dim_type get_qdim() const
Return the Q dimension.
virtual size_type nb_dof() 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)
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 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 base_node point_of_basic_dof(size_type cv, size_type i) const
Return the geometrical location of a degree 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.
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!...
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 const mesh::ind_cv_ct & convex_to_basic_dof(size_type d) const
Return the list of convexes attached to the specified dof.
structure used to hold a set of convexes and/or convex faces.
a subclass of mesh_fem which allows to eliminate a number of dof of the original mesh_fem.
virtual void set_qdim(dim_type)
Change the Q dimension.
size_type nb_basic_dof_of_element(size_type cv) const
Return the number of degrees of freedom attached to a given convex.
dal::bit_vector basic_dof_on_region(const mesh_region &b) const
Get a list of basic dof lying on a given mesh_region.
ind_dof_ct ind_basic_dof_of_element(size_type cv) const
Give an array of the dof numbers a of convex.
void write_to_file(std::ostream &ost) const
Write the mesh_fem to a stream.
void read_from_file(std::istream &)
Read the mesh_fem from a stream.
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!...
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.
size_type nb_dof(void) const
Return the total number of degrees of freedom.
virtual void set_qdim(dim_type, dim_type)
Set the dimension for a matrix field.
size_type nb_basic_dof(void) const
Return the total number of basic degrees of freedom (before the optional reduction).
const mesh::ind_cv_ct & convex_to_basic_dof(size_type d) const
Return the list of convexes attached to the specified dof.
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...
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, dim_type, dim_type)
Set the dimension for a fourth order tensor field.
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_face_of_element(size_type cv, short_type f) const
Return the number of dof lying on the given convex face.
size_type first_convex_of_basic_dof(size_type d) const
Shortcut for convex_to_dof(d)[0].
virtual void set_qdim(const bgeot::multi_index &)
Set the dimension for an arbitrary order tensor field.
virtual dim_type get_qdim() const
Return the Q dimension.
base_node point_of_basic_dof(size_type cv, size_type i) const
Return the geometrical location of a degree of freedom.
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
gmm::uint16_type short_type
used as the common short type integer in the library
size_t size_type
used as the common size type in the library
GEneric Tool for Finite Element Methods.
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...