GetFEM  5.4.2
getfem::mesh_im Class Reference

Describe an integration method linked to a mesh. More...

#include <getfem_mesh_im.h>

Inherits getfem::context_dependencies, and dal::static_stored_object.

Inherited by getfem::mesh_im_cross_level_set, and getfem::mesh_im_level_set.

Public Member Functions

void update_from_context (void) const
 this function has to be defined and should update the object when the context is modified.
 
void set_auto_add (pintegration_method pim)
 Set the im for automatic addition of element option. More...
 
const dal::bit_vector & convex_index (void) const
 Get the set of convexes where an integration method has been assigned.
 
const meshlinked_mesh () const
 Give a reference to the linked mesh of type mesh.
 
void set_integration_method (size_type cv, pintegration_method pim)
 Set the integration method of a convex. More...
 
void set_integration_method (const dal::bit_vector &cvs, pintegration_method pim)
 Set the integration method on all the convexes of indexes in bv, which is of type dal::bit_vector.
 
void set_integration_method (pintegration_method ppi)
 shortcut for More...
 
void set_integration_method (const dal::bit_vector &cvs, dim_type im_degree)
 Set an approximate integration method chosen to be exact for polynomials of degree 'im_degree'.
 
void set_integration_method (dim_type im_degree)
 Set an approximate integration method chosen to be exact for polynomials of degree 'im_degree' on the whole mesh.
 
virtual pintegration_method int_method_of_element (size_type cv) const
 return the integration method associated with an element (in no integration is associated, the function will crash! use the convex_index() of the mesh_im to check that a fem is associated to a given convex)
 
void read_from_file (std::istream &ist)
 Read the mesh_im from a stream. More...
 
void read_from_file (const std::string &name)
 Read the mesh_im from a file. More...
 
void write_to_file (std::ostream &ost) const
 Write the mesh_im to a stream.
 
void write_to_file (const std::string &name, bool with_mesh=false) const
 Write the mesh_im to a file. More...
 
- Public Member Functions inherited from getfem::context_dependencies
bool context_check () const
 return true if update_from_context was called
 

Detailed Description

Describe an integration method linked to a mesh.

Definition at line 47 of file getfem_mesh_im.h.

Member Function Documentation

◆ set_auto_add()

void getfem::mesh_im::set_auto_add ( pintegration_method  pim)
inline

Set the im for automatic addition of element option.

pim=0 disables the automatic addition.

Definition at line 68 of file getfem_mesh_im.h.

◆ set_integration_method() [1/2]

void getfem::mesh_im::set_integration_method ( size_type  cv,
pintegration_method  pim 
)

Set the integration method of a convex.

Parameters
cvthe convex number
pimthe integration method, typically obtained with
getfem::int_method_descriptor("IM_SOMETHING(..)")

Definition at line 49 of file getfem_mesh_im.cc.

◆ set_integration_method() [2/2]

void getfem::mesh_im::set_integration_method ( pintegration_method  ppi)

shortcut for

Definition at line 75 of file getfem_mesh_im.cc.

◆ read_from_file() [1/2]

void getfem::mesh_im::read_from_file ( std::istream &  ist)

Read the mesh_im from a stream.

Parameters
istthe stream.

Definition at line 154 of file getfem_mesh_im.cc.

◆ read_from_file() [2/2]

void getfem::mesh_im::read_from_file ( const std::string &  name)

Read the mesh_im from a file.

Parameters
namethe file name.

Definition at line 197 of file getfem_mesh_im.cc.

◆ write_to_file()

void getfem::mesh_im::write_to_file ( const std::string &  name,
bool  with_mesh = false 
) const

Write the mesh_im to a file.

Parameters
namethe file name
with_meshif set, then the linked_mesh() will also be saved to the file.

Definition at line 218 of file getfem_mesh_im.cc.


The documentation for this class was generated from the following files:
getfem::mesh_im::convex_index
const dal::bit_vector & convex_index(void) const
Get the set of convexes where an integration method has been assigned.
Definition: getfem_mesh_im.h:73
getfem::int_method_descriptor
pintegration_method int_method_descriptor(std::string name, bool throw_if_not_found=true)
Get an integration method from its name .
Definition: getfem_integration.cc:1130
getfem::mesh_im::set_auto_add
void set_auto_add(pintegration_method pim)
Set the im for automatic addition of element option.
Definition: getfem_mesh_im.h:68
getfem::mesh_im::linked_mesh
const mesh & linked_mesh() const
Give a reference to the linked mesh of type mesh.
Definition: getfem_mesh_im.h:79
getfem::mesh_im::set_integration_method
void set_integration_method(size_type cv, pintegration_method pim)
Set the integration method of a convex.
Definition: getfem_mesh_im.cc:49