GetFEM  5.4.3
getfem::stored_mesh_slice Class Reference

The output of a getfem::mesh_slicer which has been recorded. More...

#include <getfem_mesh_slice.h>

Inherits dal::static_stored_object.

Public Member Functions

 stored_mesh_slice (const getfem::mesh &m, size_type nrefine=1)
 Shortcut constructor to simplexify a mesh with refinement.
 
size_type nb_convex () const
 return the number of convexes of the original mesh referenced in the slice
 
size_type convex_num (size_type ic) const
 return the original convex number of the 'ic'th convex referenced in the slice
 
size_type convex_pos (size_type cv) const
 return the position ic of the referenced convex in the slice convexes list cvlist, corresponding to the original convex number cv
 
void set_dim (size_type newdim)
 change the slice dimension (append zeros or truncate node coordinates..)
 
size_type dim () const
 return the slice dimension
 
const meshlinked_mesh () const
 return a pointer to the original mesh
 
void nb_simplexes (std::vector< size_type > &c) const
 return the simplex count, in an array. More...
 
size_type nb_simplexes (size_type sdim) const
 Return the number of simplexes of dimension sdim.
 
size_type nb_points () const
 Return the number of nodes in the slice.
 
const mesh_slicer::cs_nodes_ct & nodes (size_type ic) const
 Return the list of nodes for the 'ic'th convex of the slice.
 
const mesh_slicer::cs_simplexes_ct & simplexes (size_type ic) const
 Return the list of simplexes for the 'ic'th convex of the slice.
 
void merge (const stored_mesh_slice &sl)
 merge with another mesh slice.
 
void merge_nodes () const
 build a list of merged nodes. More...
 
size_type nb_merged_nodes () const
 Return the number of merged nodes in slice.
 
const base_node merged_point (size_type i_merged) const
 Return the physical position of the merged node. More...
 
size_type merged_point_cnt (size_type i_merged) const
 Return the number of nodes that were merged to form the merged one. More...
 
void get_edges (std::vector< size_type > &edges, dal::bit_vector &slice_edges, bool from_merged_nodes) const
 Extract the list of mesh edges. More...
 
void build (const getfem::mesh &m, const slicer_action &a, size_type nrefine=1)
 Build the slice, by applying a slicer_action operation.
 
void build (const getfem::mesh &m, const slicer_action &a, const slicer_action &b, size_type nrefine=1)
 Build the slice, by applying two slicer_action operations.
 
void build (const getfem::mesh &m, const slicer_action &a, const slicer_action &b, const slicer_action &c, size_type nrefine=1)
 Build the slice, by applying three slicer_action operations.
 
void replay (slicer_action &a) const
 Apply the listed slicer_action(s) to the slice object. More...
 
void write_to_file (std::ostream &os) const
 Save a slice content to a text file.
 
void read_from_file (std::istream &ist, const getfem::mesh &m)
 Read a slice from a file.
 
template<typename V1 , typename V2 >
void interpolate (const getfem::mesh_fem &mf, const V1 &UU, V2 &V) const
 Interpolation of a mesh_fem on a slice. More...
 

Detailed Description

The output of a getfem::mesh_slicer which has been recorded.

See also
getfem::slicer_build_stored_mesh_slice

Definition at line 47 of file getfem_mesh_slice.h.

Member Function Documentation

◆ nb_simplexes()

void getfem::stored_mesh_slice::nb_simplexes ( std::vector< size_type > &  c) const
inline

return the simplex count, in an array.

Parameters
ccontains the number of simplexes of dimension 0, 1, ... dim().

Definition at line 114 of file getfem_mesh_slice.h.

◆ merge_nodes()

void getfem::stored_mesh_slice::merge_nodes ( ) const

build a list of merged nodes.

build a list of merged nodes, i.e. nodes which have the same geometrical location but were extracted from two different convexes will be considered as one same node. Use for exportation purposes, as VTK and OpenDX do not like 'discontinuous' meshes

Definition at line 349 of file getfem_mesh_slice.cc.

◆ merged_point()

const base_node getfem::stored_mesh_slice::merged_point ( size_type  i_merged) const
inline

Return the physical position of the merged node.

Parameters
i_mergedshould be 0 <= i_merged < nb_merged_nodes()

Definition at line 155 of file getfem_mesh_slice.h.

◆ merged_point_cnt()

size_type getfem::stored_mesh_slice::merged_point_cnt ( size_type  i_merged) const
inline

Return the number of nodes that were merged to form the merged one.

Parameters
i_mergedindex of the merged node: 0 <= i_merged < nb_merged_nodes()

Definition at line 168 of file getfem_mesh_slice.h.

◆ get_edges()

void getfem::stored_mesh_slice::get_edges ( std::vector< size_type > &  edges,
dal::bit_vector &  slice_edges,
bool  from_merged_nodes 
) const

Extract the list of mesh edges.

extract the list of mesh edges into 'edges' (size = 2* number of edges). 'slice_edges' indicates which one were created after slicing. The from_merged_nodes flag may be used if you want to use (and merge common edges according to) the merged points

Definition at line 231 of file getfem_mesh_slice.cc.

◆ replay()

void getfem::stored_mesh_slice::replay ( slicer_action a) const
inline

Apply the listed slicer_action(s) to the slice object.

the stored_mesh_slice is not modified. This can be used to build a new stored_mesh_slice from a stored_mesh_slice.

Definition at line 215 of file getfem_mesh_slice.h.

◆ interpolate()

template<typename V1 , typename V2 >
void getfem::stored_mesh_slice::interpolate ( const getfem::mesh_fem mf,
const V1 &  UU,
V2 &  V 
) const
inline

Interpolation of a mesh_fem on a slice.

The mesh_fem and the slice must share the same mesh, of course.

Parameters
mfthe mesh_fem
Ua vector whose dimension is a multiple of mf.nb_dof(), the field to be interpolated.
Von output, a vector corresponding to the interpolated field on the slice (values given on each node of the slice).

Definition at line 245 of file getfem_mesh_slice.h.


The documentation for this class was generated from the following files: