Gathers mesh related classes. More...
Classes | |
class | Domain |
To store and treat finite element geometric information. More... | |
class | Edge |
To describe an edge. More... | |
class | Element |
To store and treat finite element geometric information. More... | |
class | Figure |
To store and treat a figure (or shape) information. More... | |
class | Rectangle |
To store and treat a rectangular figure. More... | |
class | Brick |
To store and treat a brick (parallelepiped) figure. More... | |
class | Circle |
To store and treat a circular figure. More... | |
class | Sphere |
To store and treat a sphere. More... | |
class | Ellipse |
To store and treat an ellipsoidal figure. More... | |
class | Triangle |
To store and treat a triangle. More... | |
class | Polygon |
To store and treat a polygonal figure. More... | |
class | Grid |
To manipulate structured grids. More... | |
class | Mesh |
To store and manipulate finite element meshes. More... | |
class | MeshAdapt |
To adapt mesh in function of given solution. More... | |
class | NodeList |
Class to construct a list of nodes having some common properties. More... | |
class | ElementList |
Class to construct a list of elements having some common properties. More... | |
class | SideList |
Class to construct a list of sides having some common properties. More... | |
class | EdgeList |
Class to construct a list of edges having some common properties. More... | |
class | Node |
To describe a node. More... | |
class | Partition |
To partition a finite element mesh into balanced submeshes. More... | |
class | Side |
To store and treat finite element sides (edges in 2-D or faces in 3-D) More... | |
Macros | |
#define | GRAPH_MEMORY 1000000 |
Memory necessary to store matrix graph. More... | |
#define | MAX_NB_SUBMESHES 500 |
Maximum number of mesh partitions. More... | |
#define | MAX_NB_ELEMENTS 10000 |
Maximal Number of elements. | |
#define | MAX_NB_NODES 10000 |
Maximal number of nodes. | |
#define | MAX_NB_SIDES 30000 |
Maximal number of sides in. | |
#define | MAX_NB_EDGES 30000 |
Maximal Number of edges. | |
#define | MAX_NBDOF_NODE 6 |
Maximum number of DOF supported by each node. | |
#define | MAX_NBDOF_SIDE 6 |
Maximum number of DOF supported by each side. | |
#define | MAX_NBDOF_EDGE 2 |
Maximum number of DOF supported by each edge. | |
#define | MAX_NB_ELEMENT_NODES 20 |
Maximum number of nodes by element. | |
#define | MAX_NB_ELEMENT_EDGES 10 |
Maximum number of edges by element. | |
#define | MAX_NB_SIDE_NODES 9 |
Maximum number of nodes by side. | |
#define | MAX_NB_ELEMENT_SIDES 8 |
Maximum number of sides by element. | |
#define | MAX_NB_ELEMENT_DOF 27 |
Maximum number of dof by element. | |
#define | MAX_NB_SIDE_DOF 4 |
Maximum number of dof by side. | |
#define | MAX_NB_INT_PTS 20 |
Maximum number of integration points in element. | |
#define | MAX_NB_VERTICES 2000 |
Maximum number of vertices. | |
#define | MAX_NB_HOLES 10 |
Maximum number of holes. More... | |
#define | MAX_NB_LINES 200 |
Maximum number of lines. More... | |
#define | MAX_NB_LINE_NODES 1000 |
Maximum number of nodes on each line. More... | |
#define | MAX_NB_CONT_LINES 50 |
Maximum number of lines on each contour. More... | |
#define | MAX_NB_SUB_DOMAINS 5 |
Maximum number of subdomains. More... | |
#define | MAX_NB_MATERIALS 10 |
Maximum number of materials. | |
#define | TheNode (*theNode) |
#define | TheElement (*theElement) |
#define | TheSide (*theSide) |
#define | TheEdge (*theEdge) |
#define | MeshElements(mesh) for ((mesh).topElement(); (theElement=(mesh).getElement());) |
#define | MeshActiveElements(mesh) for ((mesh).topElement(); (theElement=(mesh).getActiveElement());) |
#define | MeshNodeLoop(mesh, node) for ((mesh).topNode(); ((node)=(mesh).getNode());) |
#define | MeshNodes(mesh) for ((mesh).topNode(); (theNode=(mesh).getNode());) |
#define | MeshBoundaryNodes(mesh) for ((mesh).topBoundaryNode(); (theNode=(mesh).getBoundaryNode());) |
#define | MeshSides(mesh) for ((mesh).topSide(); (theSide=(mesh).getSide());) |
#define | MeshSideSet(sl) for ((sl).top(); (theSide=(sl).get());) |
#define | MeshBoundarySides(mesh) for ((mesh).topBoundarySide(); (theSide=(mesh).getBoundarySide());) |
#define | MeshEdges(mesh) for ((mesh).topEdge(); (theEdge=(mesh).getEdge());) |
#define | theNodeLabel theNode->n() |
#define | theSideLabel theSide->n() |
A macro that returns side label in a loop using macro MeshSides | |
#define | theSideNodeLabel(i) theSide->getNodeLabel(i) |
A macro that returns label of i -th node of side using macro MeshSides | |
#define | theElementLabel theElement->n() |
A macro that returns element label in a loop using macro MeshElements | |
#define | theElementNodeLabel(i) theElement->getNodeLabel(i) |
A macro that returns label of i -th node of element using macro MeshElements | |
Functions | |
ostream & | operator<< (ostream &s, const Edge &ed) |
Output edge data. | |
ostream & | operator<< (ostream &s, const Element &el) |
Output element data. | |
Figure | operator&& (const Figure &f1, const Figure &f2) |
Function to define a Figure instance as the intersection of two Figure instances. More... | |
Figure | operator- (const Figure &f1, const Figure &f2) |
Function to define a Figure instance as the set subtraction of two Figure instances. More... | |
ostream & | operator<< (ostream &s, const Material &m) |
Output material data. | |
ostream & | operator<< (ostream &s, const Mesh &ms) |
Output mesh data. | |
ostream & | operator<< (ostream &s, const MeshAdapt &a) |
Output MeshAdapt class data. | |
ostream & | operator<< (ostream &s, const NodeList &nl) |
Output NodeList instance. | |
ostream & | operator<< (ostream &s, const ElementList &el) |
Output ElementList instance. | |
ostream & | operator<< (ostream &s, const SideList &sl) |
Output SideList instance. | |
ostream & | operator<< (ostream &s, const EdgeList &el) |
Output EdgeList instance. | |
void | DeformMesh (Mesh &mesh, const Vect< real_t > &u, real_t a=1) |
Calculate deformed mesh using a displacement field. More... | |
void | MeshToMesh (Mesh &m1, Mesh &m2, const Vect< real_t > &u1, Vect< real_t > &u2, size_t nx, size_t ny=0, size_t nz=0, size_t dof=1) |
Function to redefine a vector defined on a mesh to a new mesh. More... | |
void | MeshToMesh (Mesh &m1, Mesh &m2, const Vect< real_t > &u1, Vect< real_t > &u2, const Point< real_t > &xmin, const Point< real_t > &xmax, size_t nx, size_t ny, size_t nz, size_t dof=1) |
Function to redefine a vector defined on a mesh to a new mesh. More... | |
real_t | getMaxSize (const Mesh &m) |
Return maximal size of element edges for given mesh. More... | |
real_t | getMinSize (const Mesh &m) |
Return minimal size of element edges for given mesh. More... | |
real_t | getMinElementMeasure (const Mesh &m) |
Return minimal measure (length, area or volume) of elements of given mesh. More... | |
real_t | getMinSideMeasure (const Mesh &m) |
Return minimal measure (length or area) of sides of given mesh. More... | |
real_t | getMaxSideMeasure (const Mesh &m) |
Return maximal measure (length or area) of sides of given mesh. More... | |
real_t | getMeanElementMeasure (const Mesh &m) |
Return average measure (length, area or volume) of elements of given mesh. More... | |
real_t | getMeanSideMeasure (const Mesh &m) |
Return average measure (length or area) of sides of given mesh. More... | |
void | setNodeCodes (Mesh &m, const string &exp, int code, size_t dof=1) |
Assign a given code to all nodes satisfying a boolean expression using node coordinates. More... | |
void | setBoundaryNodeCodes (Mesh &m, const string &exp, int code, size_t dof=1) |
Assign a given code to all nodes on boundary that satisfy a boolean expression using node coordinates. More... | |
void | setSideCodes (Mesh &m, const string &exp, int code, size_t dof=1) |
Assign a given code to all sides satisfying a boolean expression using node coordinates. More... | |
void | setBoundarySideCodes (Mesh &m, const string &exp, int code, size_t dof=1) |
Assign a given code to all sides on boundary that satisfy a boolean expression using node coordinates. More... | |
void | setElementCodes (Mesh &m, const string &exp, int code) |
Assign a given code to all elements satisfying a boolean expression using node coordinates. More... | |
int | NodeInElement (const Node *nd, const Element *el) |
Say if a given node belongs to a given element. More... | |
int | NodeInSide (const Node *nd, const Side *sd) |
Say if a given node belongs to a given side. More... | |
int | SideInElement (const Side *sd, const Element *el) |
Say if a given side belongs to a given element. More... | |
ostream & | operator<< (ostream &s, const Node &nd) |
Output node data. | |
ostream & | operator<< (ostream &s, const Side &sd) |
Output side data. | |
Detailed Description
Gathers mesh related classes.
Macro Definition Documentation
#define GRAPH_MEMORY 1000000 |
Memory necessary to store matrix graph.
This value is necessary only if nodes are to be renumbered.
#define MAX_NB_SUBMESHES 500 |
Maximum number of mesh partitions.
Useful if mesh is to be partitioned by class Partition
#define MAX_NB_HOLES 10 |
Maximum number of holes.
Used only if class Domain is invoked
#define MAX_NB_LINES 200 |
Maximum number of lines.
Used only if class Domain is invoked
#define MAX_NB_LINE_NODES 1000 |
Maximum number of nodes on each line.
Used only if class Domain is invoked
#define MAX_NB_CONT_LINES 50 |
Maximum number of lines on each contour.
Used only if class Domain is invoked
#define MAX_NB_SUB_DOMAINS 5 |
Maximum number of subdomains.
Used only if class Domain is invoked
#define TheNode (*theNode) |
A macro that gives the instance pointed by theNode
#define TheElement (*theElement) |
A macro that gives the instance pointed by theElement
#define TheSide (*theSide) |
A macro that gives the instance pointed by theSide
#define TheEdge (*theEdge) |
A macro that gives the instance pointed by theEdge
#define MeshElements | ( | mesh | ) | for ((mesh).topElement(); (theElement=(mesh).getElement());) |
A macro to loop on mesh elements mesh
: Instance of Mesh
- Note
- : Each iteration updates the pointer
theElement
to current Element
#define MeshActiveElements | ( | mesh | ) | for ((mesh).topElement(); (theElement=(mesh).getActiveElement());) |
A macro to loop on mesh active elements mesh : Instance of Mesh
- Note
- : Each iteration updates the pointer
theElement
to current Element - : This macro is necessary only if adaptive meshing is used
#define MeshNodeLoop | ( | mesh, | |
node | |||
) | for ((mesh).topNode(); ((node)=(mesh).getNode());) |
A macro to loop on mesh nodes mesh
: Instance of Mesh node
: Pointer to pointed node
#define MeshNodes | ( | mesh | ) | for ((mesh).topNode(); (theNode=(mesh).getNode());) |
A macro to loop on mesh nodes mesh : Instance of Mesh
- Note
- : Each iteration updates the pointer theNode to current Node
#define MeshBoundaryNodes | ( | mesh | ) | for ((mesh).topBoundaryNode(); (theNode=(mesh).getBoundaryNode());) |
A macro to loop on mesh nodes mesh
: Instance of Mesh
- Note
- : Each iteration updates the pointer
theNode
to current Node
#define MeshSides | ( | mesh | ) | for ((mesh).topSide(); (theSide=(mesh).getSide());) |
A macro to loop on mesh sides mesh
: Instance of Mesh
- Note
- : Each iteration updates the pointer
theSide
to current Side
#define MeshSideSet | ( | sl | ) | for ((sl).top(); (theSide=(sl).get());) |
A macro to loop on a subset of mesh sides sl
: Instance of SideList class
- Note
- : Each iteration updates the pointer
theSide
to current Side
#define MeshBoundarySides | ( | mesh | ) | for ((mesh).topBoundarySide(); (theSide=(mesh).getBoundarySide());) |
A macro to loop on mesh boundary sides mesh
: Instance of Mesh
Notes:
- List of boundary sides must have been previously created by using class SideList
- Each iteration updates the pointer
theSide
to current Side
#define MeshEdges | ( | mesh | ) | for ((mesh).topEdge(); (theEdge=(mesh).getEdge());) |
A macro to loop on mesh edges mesh
: Instance of Mesh
- Note
- : Each iteration updates the pointer
theEdge
to current Edge
#define theNodeLabel theNode->n() |
A macro that returns node label in a loop using macro MeshNodes
Function Documentation
Figure operator&& | ( | const Figure & | f1, |
const Figure & | f2 | ||
) |
Figure operator- | ( | const Figure & | f1, |
const Figure & | f2 | ||
) |
Calculate deformed mesh using a displacement field.
- Parameters
-
[in,out] mesh Mesh instance. On output, node coordinates are modified to take into account the displacement [in] u Displacement field at nodes [in] a Amplification factor [Default: 1
]. The displacement is multiplied bya
before to be added to node coordinates
void MeshToMesh | ( | Mesh & | m1, |
Mesh & | m2, | ||
const Vect< real_t > & | u1, | ||
Vect< real_t > & | u2, | ||
size_t | nx, | ||
size_t | ny = 0 , |
||
size_t | nz = 0 , |
||
size_t | dof = 1 |
||
) |
Function to redefine a vector defined on a mesh to a new mesh.
The program interpolates (piecewise linear) first the vector on a finer structured grid. Then the values on the new mesh nodes are computed.
- Remarks
- For efficiency the number of grid cells must be large enough so that interpolation provides efficient accuracy
- Parameters
-
[in] m1 Reference to the first mesh instance [out] m2 Reference to the second mesh instance [in] u1 Input vector of nodal values defined on first mesh [out] u2 Output vector of nodal values defined on second mesh [in] nx Number of cells in the x
-direction in the fine structured grid[in] ny Number of cells in the y
-direction in the fine structured grid The default value ofny
is0
, i.e. a 1-D grid[in] nz Number of cells in the z
-direction in the fine structured grid The default value ofnz
is0
, i.e. a 1-D or 2-D grid[in] dof Label of degree of freedom of vector u
. Only this dof is considered. [Default:1
]
- Note
- The input vector
u1
is a one degree of freedom per node vector, i.e. its size must be equal (or greater than) the total number of nodes of meshm1
. The size of vectoru2
is deduced from the meshm2
void MeshToMesh | ( | Mesh & | m1, |
Mesh & | m2, | ||
const Vect< real_t > & | u1, | ||
Vect< real_t > & | u2, | ||
const Point< real_t > & | xmin, | ||
const Point< real_t > & | xmax, | ||
size_t | nx, | ||
size_t | ny, | ||
size_t | nz, | ||
size_t | dof = 1 |
||
) |
Function to redefine a vector defined on a mesh to a new mesh.
The program interpolates (piecewise linear) first the vector on a finer structured grid. Then the values on the new mesh nodes are computed. In this function the grid rectangle is defined so that this one can cover only a submesh of m1
.
- Remarks
- For efficiency the numeber of grid cells must be large enough so that interpolation provides efficient accuracy
- Parameters
-
[in] m1 Reference to the first mesh instance [out] m2 Reference to the second mesh instance [in] u1 Input vector of nodal values defined on first mesh [out] u2 Output vector of nodal values defined on second mesh [in] xmin Point instance containing minimal coordinates of the rectangle that defines the grid [in] xmax Point instance containing maximal coordinates of the rectangle that defines the grid [in] nx Number of cells in the x
-direction in the fine structured grid[in] ny Number of cells in the y
-direction in the fine structured grid The default value ofny
is0
, i.e. a 1-D grid[in] nz Number of cells in the z
-direction in the fine structured grid The default value ofnz
is0
, i.e. a 1-D or 2-D grid[in] dof Label of degree of freedom of vector u
. Only this dof is considered. [Default:1
]
- Note
- The input vector
u1
is a one degree of freedom per node vector, i.e. its size must be equal (or greater than) the total number of nodes of meshm1
. The size of vectoru2
is deduced from the meshm2
real_t getMaxSize | ( | const Mesh & | m | ) |
Return maximal size of element edges for given mesh.
- Parameters
-
[in] m Reference to mesh instance
real_t getMinSize | ( | const Mesh & | m | ) |
Return minimal size of element edges for given mesh.
- Parameters
-
[in] m Reference to mesh instance
real_t getMinElementMeasure | ( | const Mesh & | m | ) |
Return minimal measure (length, area or volume) of elements of given mesh.
Return maximal measure (length, area or volume) of elements of given mesh.
- Parameters
-
[in] m Reference to mesh instance
real_t getMinSideMeasure | ( | const Mesh & | m | ) |
Return minimal measure (length or area) of sides of given mesh.
- Parameters
-
[in] m Reference to mesh instance
- Note
- Use this function only if sides are present in the mesh and for 2-D meshes
real_t getMaxSideMeasure | ( | const Mesh & | m | ) |
Return maximal measure (length or area) of sides of given mesh.
- Parameters
-
[in] m Reference to mesh instance
- Note
- Use this function only if sides are present in the mesh and for 2-D meshes
real_t getMeanElementMeasure | ( | const Mesh & | m | ) |
Return average measure (length, area or volume) of elements of given mesh.
- Parameters
-
[in] m Reference to mesh instance
real_t getMeanSideMeasure | ( | const Mesh & | m | ) |
Return average measure (length or area) of sides of given mesh.
- Parameters
-
[in] m Reference to mesh instance
- Note
- Use this function only if sides are present in the mesh and for 2-D meshes
void setNodeCodes | ( | Mesh & | m, |
const string & | exp, | ||
int | code, | ||
size_t | dof = 1 |
||
) |
Assign a given code to all nodes satisfying a boolean expression using node coordinates.
- Parameters
-
[in] m Reference to mesh instance [in] exp Regular expression using x
,y
, andz
coordinates of nodes, according tofparser
parser[in] code Code to assign [in] dof Degree of freedom for which code is assigned [Default: 1
]
void setBoundaryNodeCodes | ( | Mesh & | m, |
const string & | exp, | ||
int | code, | ||
size_t | dof = 1 |
||
) |
Assign a given code to all nodes on boundary that satisfy a boolean expression using node coordinates.
- Parameters
-
[in] m Reference to mesh instance [in] exp Regular expression using x
,y
, andz
coordinates of nodes, according tofparser
parser[in] code Code to assign [in] dof Degree of freedom for which code is assigned [Default: 1
]
void setSideCodes | ( | Mesh & | m, |
const string & | exp, | ||
int | code, | ||
size_t | dof = 1 |
||
) |
Assign a given code to all sides satisfying a boolean expression using node coordinates.
- Parameters
-
[in] m Reference to mesh instance [in] exp Regular expression using x
,y
, andz
coordinates of side nodes, according tofparser
parser[in] code Code to assign [in] dof Degree of freedom for which code is assigned [Default: 1
]
void setBoundarySideCodes | ( | Mesh & | m, |
const string & | exp, | ||
int | code, | ||
size_t | dof = 1 |
||
) |
Assign a given code to all sides on boundary that satisfy a boolean expression using node coordinates.
- Parameters
-
[in] m Reference to mesh instance [in] exp Regular expression using x
,y
, andz
coordinates of side nodes, according tofparser
parser[in] code Code to assign [in] dof Degree of freedom for which code is assigned [Default: 1
]
void setElementCodes | ( | Mesh & | m, |
const string & | exp, | ||
int | code | ||
) |
Assign a given code to all elements satisfying a boolean expression using node coordinates.
- Parameters
-
[in] m Reference to mesh instance [in] exp Regular expression using x
,y
, andz
coordinates of element nodes, according tofparser
parser[in] code Code to assign
int NodeInElement | ( | const Node * | nd, |
const Element * | el | ||
) |
int NodeInSide | ( | const Node * | nd, |
const Side * | sd | ||
) |