GetFEM++  5.3
bgeot::mesh_structure Class Reference

Mesh structure definition. More...

#include <bgeot_mesh_structure.h>

Inherited by bgeot::basic_mesh.

Public Member Functions

const dal::bit_vector & convex_index () const
 Return the list of valid convex IDs.
 
dal::bit_vector convex_index (dim_type) const
 Return the list of valid convex IDs of a given dimension.
 
size_type nb_convex () const
 The total number of convexes in the mesh.
 
size_type nb_allocated_convex () const
 The number of convex indexes from 0 to the index of the last convex.
 
bool is_convex_valid (size_type i)
 Return true if i is in convex_index()
 
bool is_point_valid (size_type i) const
 Return true if the point i is used by at least one convex.
 
const ind_cv_ct & ind_points_of_convex (size_type ic) const
 Return a container to the list of points attached to convex ic. More...
 
size_type local_ind_of_convex_point (size_type ic, size_type ip) const
 Return the "local" index for point ip of the mesh.
 
pconvex_structure structure_of_convex (size_type ic) const
 Return the pconvex_structure of the convex ic.
 
short_type nb_points_of_convex (size_type ic) const
 Return the number of points of convex ic.
 
short_type nb_faces_of_convex (size_type ic) const
 Return the number of faces of convex ic.
 
void swap_points (size_type i, size_type j)
 Exchange two point IDs.
 
void swap_convex (size_type cv1, size_type cv2)
 Exchange two convex IDs.
 
template<class ITER >
size_type add_convex (pconvex_structure cs, ITER ipts, bool *present=0)
 Insert a new convex in the mesh_structure. More...
 
void sup_convex (size_type ic)
 Remove the convex ic.
 
template<class ITER >
void sup_convex_with_points (ITER ipts, short_type nb)
 Remove a convex given its points. More...
 
size_type add_face_of_convex (size_type ic, short_type f)
 Insert a new convex corresponding to face f of the convex ic.
 
void add_faces_of_convex (size_type ic)
 Insert new convexes corresponding to the faces of the convex ic.
 
void to_faces (dim_type n)
 build a new mesh, such that its convexes are the faces of the convexes of the previous one
 
void to_edges ()
 build a new mesh, such that its convexes are the edges of the convexes of the previous one
 
const ind_cv_ct & convex_to_point (size_type ip) const
 Return a container of the convexes attached to point ip.
 
void ind_points_to_point (size_type, ind_set &) const
 Return a container of the points attached (via an edge) to point ip.
 
template<class ITER >
bool is_convex_having_points (size_type ic, short_type nb, ITER pit) const
 Return true if the convex contains the listed points. More...
 
template<class ITER >
bool is_convex_face_having_points (size_type ic, short_type face_num, short_type nb, ITER pit) const
 Return true if the face of the convex contains the given list of points.
 
ind_pt_face_ct ind_points_of_face_of_convex (size_type ic, short_type f) const
 Return a container of the (global) point number for face f or convex ic.
 
void optimize_structure ()
 Reorder the convex IDs and point IDs, such that there is no hole in their numbering. More...
 
void clear ()
 erase the mesh
 
void neighbours_of_convex (size_type ic, short_type f, ind_set &s) const
 Return in s a list of neighbours of a given convex face. More...
 
void neighbours_of_convex (size_type ic, const std::vector< short_type > &ftab, ind_set &s) const
 Return in s a list of neighbours of a given convex sharing the intersection of a given list of faces. More...
 
void neighbours_of_convex (size_type ic, ind_set &s) const
 Return a list of neighbours of a given convex. More...
 
size_type neighbour_of_convex (size_type ic, short_type f) const
 Return a neighbour convex of a given convex face. More...
 
convex_face adjacent_face (size_type ic, short_type f) const
 Return a face of the neighbouring element that is adjacent to the given face. More...
 
size_type first_convex_of_point (size_type ip) const
 Convex ID of the first convex attached to the point ip. More...
 
size_type ind_in_convex_of_point (size_type ic, size_type ip) const
 Find the local index of the point of global index ip with respect to the convex cv. More...
 

Detailed Description

Mesh structure definition.

At this point, the mesh is just a graph: the points have no associated coordinates

Definition at line 73 of file bgeot_mesh_structure.h.

Member Function Documentation

const ind_cv_ct& bgeot::mesh_structure::ind_points_of_convex ( size_type  ic) const
inline

Return a container to the list of points attached to convex ic.

They are ordered according to structure_of_convex(ic)

Definition at line 107 of file bgeot_mesh_structure.h.

template<class ITER >
size_type bgeot::mesh_structure::add_convex ( pconvex_structure  cs,
ITER  ipts,
bool *  present = 0 
)

Insert a new convex in the mesh_structure.

Parameters
csthe structure of the new convex.
iptsan iterator over a sequence of integers (point IDs of the convex nodes).
presentan optional argument, contains true on return if the convex already exists in the mesh_structure.
Returns
the convex ID

Definition at line 293 of file bgeot_mesh_structure.h.

template<class ITER >
void bgeot::mesh_structure::sup_convex_with_points ( ITER  ipts,
short_type  nb 
)

Remove a convex given its points.

Parameters
nbthe number of points for the convex
iptsan iterator over the list of point IDs of the convex

Definition at line 304 of file bgeot_mesh_structure.h.

template<class ITER >
bool bgeot::mesh_structure::is_convex_having_points ( size_type  ic,
short_type  nb,
ITER  pit 
) const

Return true if the convex contains the listed points.

Parameters
icthe convex ID.
nbthe number of points which are searched in ic.
pitan iterator to the list of points searched.

Definition at line 259 of file bgeot_mesh_structure.h.

void bgeot::mesh_structure::optimize_structure ( )

Reorder the convex IDs and point IDs, such that there is no hole in their numbering.

Definition at line 191 of file bgeot_mesh_structure.cc.

void bgeot::mesh_structure::neighbours_of_convex ( size_type  ic,
short_type  f,
ind_set &  s 
) const

Return in s a list of neighbours of a given convex face.

Parameters
icthe convex id.
fthe face number of the convex.
sthe resulting ind_set.

Definition at line 217 of file bgeot_mesh_structure.cc.

void bgeot::mesh_structure::neighbours_of_convex ( size_type  ic,
const std::vector< short_type > &  ftab,
ind_set &  s 
) const

Return in s a list of neighbours of a given convex sharing the intersection of a given list of faces.

Parameters
icthe convex id.
fthe face number of the convex.
sthe resulting ind_set.

Definition at line 232 of file bgeot_mesh_structure.cc.

void bgeot::mesh_structure::neighbours_of_convex ( size_type  ic,
ind_set &  s 
) const

Return a list of neighbours of a given convex.

Parameters
icthe convex id.
sthe resulting ind_set.

Definition at line 280 of file bgeot_mesh_structure.cc.

size_type bgeot::mesh_structure::neighbour_of_convex ( size_type  ic,
short_type  f 
) const

Return a neighbour convex of a given convex face.

Parameters
icthe convex id.
fthe face number of the convex.
Returns
size_type(-1) if there is no neighbour to this convex and the index of the first neighbour found otherwise.

Definition at line 297 of file bgeot_mesh_structure.cc.

convex_face bgeot::mesh_structure::adjacent_face ( size_type  ic,
short_type  f 
) const

Return a face of the neighbouring element that is adjacent to the given face.

Parameters
icthe convex id.
fthe face number of the convex.
Returns
convex_face that contains the neighbours convex id and the adjacent face number, or convex_face::invalid_face() otherwise.

Definition at line 311 of file bgeot_mesh_structure.cc.

size_type bgeot::mesh_structure::first_convex_of_point ( size_type  ip) const
inline

Convex ID of the first convex attached to the point ip.

Definition at line 239 of file bgeot_mesh_structure.h.

size_type bgeot::mesh_structure::ind_in_convex_of_point ( size_type  ic,
size_type  ip 
) const

Find the local index of the point of global index ip with respect to the convex cv.

Returns
local index (a number smaller than nb_points_of_convex(first_convex_of_point(ip))) or size_type(-1) if the point is not found.

Definition at line 327 of file bgeot_mesh_structure.cc.


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