Mesh management 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. | |
| #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_MATERIALS 10 |
| Maximum number of materials. | |
| #define | TheNode (*theNode) |
| #define | TheElement (*theElement) |
| #define | TheSide (*theSide) |
| #define | TheEdge (*theEdge) |
| #define | ElementLoop(m) for (auto const& theElement: (m).theElements) |
| #define | SideLoop(m) for (auto const& theSide: (m).theSides) |
| #define | EdgeLoop(m) for (auto const& theEdge: (m).theEdges) |
| #define | NodeLoop(m) for (auto const& theNode: (m).theNodes) |
| #define | BoundaryNodeLoop(m) for (auto const& theNode: (m).theBoundaryNodes) |
| #define | BoundarySideLoop(m) for (auto const& theSide: (m).theBoundarySides) |
| #define | ElementNodeLoop(el, nd) for (auto const& nd: (el).theNodes) |
| #define | ElementSideLoop(el, sd) for (auto const& sd: (el).theSides) |
| #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. | |
| Figure | operator|| (const Figure &f1, const Figure &f2) |
| Function to define a Figure instance as the union of two Figure instances. | |
| Figure | operator- (const Figure &f1, const Figure &f2) |
| Function to define a Figure instance as the set subtraction of two Figure instances. | |
| ostream & | operator<< (ostream &s, const Grid &g) |
| Output grid data. | |
| 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. | |
| size_t | Label (const Node &nd) |
| Return label of a given node. | |
| size_t | Label (const Element &el) |
| Return label of a given element. | |
| size_t | Label (const Side &sd) |
| Return label of a given side. | |
| size_t | Label (const Edge &ed) |
| Return label of a given edge. | |
| size_t | NodeLabel (const Element &el, size_t n) |
| Return global label of node local label in element. | |
| size_t | NodeLabel (const Side &sd, size_t n) |
| Return global label of node local label in side. | |
| Point< real_t > | Coord (const Node &nd) |
| Return coordinates of a given node. | |
| int | Code (const Node &nd, size_t i=1) |
| Return code of a given (degree of freedom of) node. | |
| int | Code (const Element &el) |
| Return code of a given element. | |
| int | Code (const Side &sd, size_t i=1) |
| Return code of a given (degree of freedom of) side. | |
| bool | operator== (const Element &el1, const Element &el2) |
| Check equality between 2 elements. | |
| bool | operator== (const Side &sd1, const Side &sd2) |
| Check equality between 2 sides. | |
| void | DeformMesh (Mesh &mesh, const Vect< real_t > &u, real_t rate=0.2) |
| Calculate deformed mesh using a displacement field. | |
| 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. | |
| void | MeshToMesh (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. | |
| 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. | |
| real_t | getMaxSize (const Mesh &m) |
| Return maximal size of element edges for given mesh. | |
| real_t | getMinSize (const Mesh &m) |
| Return minimal size of element edges for given mesh. | |
| real_t | getMinElementMeasure (const Mesh &m) |
| Return minimal measure (length, area or volume) of elements of given mesh. | |
| real_t | getMaxElementMeasure (const Mesh &m) |
| Return maximal measure (length, area or volume) of elements of given mesh. | |
| real_t | getMinSideMeasure (const Mesh &m) |
| Return minimal measure (length or area) of sides of given mesh. | |
| real_t | getMaxSideMeasure (const Mesh &m) |
| Return maximal measure (length or area) of sides of given mesh. | |
| real_t | getMeanElementMeasure (const Mesh &m) |
| Return average measure (length, area or volume) of elements of given mesh. | |
| real_t | getMeanSideMeasure (const Mesh &m) |
| Return average measure (length or area) of sides of given mesh. | |
| 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. | |
| 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. | |
| int | NodeInElement (const Node *nd, const Element *el) |
| Say if a given node belongs to a given element. | |
| int | NodeInSide (const Node *nd, const Side *sd) |
| Say if a given node belongs to a given side. | |
| int | SideInElement (const Side *sd, const Element *el) |
| Say if a given side belongs to a given element. | |
| ostream & | operator<< (ostream &s, const Node &nd) |
| Output node data. | |
| ostream & | operator<< (ostream &s, const Side &sd) |
| Output side data. | |
Mesh management classes
| #define BoundaryNodeLoop | ( | m | ) | for (auto const& theNode: (m).theBoundaryNodes) |
A macro to loop on mesh nodes m: Instance of Mesh
theNode to current Node | #define BoundarySideLoop | ( | m | ) | for (auto const& theSide: (m).theBoundarySides) |
A macro to loop on mesh boundary sides m: Instance of Mesh
theSide to current Node | #define EdgeLoop | ( | m | ) | for (auto const& theEdge: (m).theEdges) |
A macro to loop on mesh edges m : Instance of Mesh
theEdge to current Edge | #define ElementLoop | ( | m | ) | for (auto const& theElement: (m).theElements) |
A macro to loop on mesh elements m : Instance of Mesh
theElement to current Element | #define ElementNodeLoop | ( | el, | |
| nd ) for (auto const& nd: (el).theNodes) |
A macro to loop on element nodes
| el | Instance of Element |
| nd | Pointer to pointed node |
| #define ElementSideLoop | ( | el, | |
| sd ) for (auto const& sd: (el).theSides) |
A macro to loop on element sides
| el | Instance of Element |
| sd | Pointer to pointed side |
| #define GRAPH_MEMORY 1000000 |
Memory necessary to store matrix graph.
This value is necessary only if nodes are to be renumbered.
| #define NodeLoop | ( | m | ) | for (auto const& theNode: (m).theNodes) |
A macro to loop on mesh nodes m : Instance of Mesh
| #define SideLoop | ( | m | ) | for (auto const& theSide: (m).theSides) |
A macro to loop on mesh sides m : Instance of Mesh
theSide to current Element | #define TheEdge (*theEdge) |
A macro that gives the instance pointed by theEdge
| #define TheElement (*theElement) |
A macro that gives the instance pointed by theElement
| #define TheNode (*theNode) |
A macro that gives the instance pointed by theNode
| #define theNodeLabel theNode->n() |
A macro that returns node label in a loop using macro MeshNodes
| #define TheSide (*theSide) |
A macro that gives the instance pointed by theSide
| int Code | ( | const Element & | el | ) |
Return code of a given element.
| [in] | el | Reference to Element instance |
| int Code | ( | const Node & | nd, |
| size_t | i = 1 ) |
Return code of a given (degree of freedom of) node.
| [in] | nd | Reference to Node instance |
| [in] | i | Label of dof [Default: 1] |
| int Code | ( | const Side & | sd, |
| size_t | i = 1 ) |
Return code of a given (degree of freedom of) side.
| [in] | sd | Reference to Side instance |
| [in] | i | Label of dof [Default: 1] |
Return coordinates of a given node.
| [in] | nd | Reference to Node instance |
Calculate deformed mesh using a displacement field.
| [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 | Maximal deformation rate. [Default: 1]. A typical value is 0.2 (i.e. 20%). |
| real_t getMaxElementMeasure | ( | const Mesh & | m | ) |
Return maximal measure (length, area or volume) of elements of given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMaxSideMeasure | ( | const Mesh & | m | ) |
Return maximal measure (length or area) of sides of given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMaxSize | ( | const Mesh & | m | ) |
Return maximal size of element edges for given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMeanElementMeasure | ( | const Mesh & | m | ) |
Return average measure (length, area or volume) of elements of given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMeanSideMeasure | ( | const Mesh & | m | ) |
Return average measure (length or area) of sides of given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMinElementMeasure | ( | const Mesh & | m | ) |
Return minimal measure (length, area or volume) of elements of given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMinSideMeasure | ( | const Mesh & | m | ) |
Return minimal measure (length or area) of sides of given mesh.
| [in] | m | Reference to mesh instance |
| real_t getMinSize | ( | const Mesh & | m | ) |
Return minimal size of element edges for given mesh.
| [in] | m | Reference to mesh instance |
| size_t Label | ( | const Edge & | ed | ) |
Return label of a given edge.
| [in] | ed | Reference to Edge instance |
| size_t Label | ( | const Element & | el | ) |
Return label of a given element.
| [in] | el | Reference to Element instance |
| size_t Label | ( | const Node & | nd | ) |
Return label of a given node.
| [in] | nd | Reference to Node instance |
| size_t Label | ( | const Side & | sd | ) |
Return label of a given side.
| [in] | sd | Reference to Side instance |
| void MeshToMesh | ( | 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.
| [in] | u1 | Input vector of nodal values defined on first mesh. This vector instance must contain Mesh instance |
| [out] | u2 | Output vector of nodal values defined on second mesh. This vector instance must contain Mesh instance |
| [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 of ny is 0, i.e. a 1-D grid |
| [in] | nz | Number of cells in the z-direction in the fine structured grid The default value of nz is 0, 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] |
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 mesh m1. The size of vector u2 is deduced from the mesh m2| 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.
| [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 of ny is 0, i.e. a 1-D grid |
| [in] | nz | Number of cells in the z-direction in the fine structured grid The default value of nz is 0, 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] |
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 mesh m1. The size of vector u2 is deduced from the mesh m2| 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.
| [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 of ny is 0, i.e. a 1-D grid |
| [in] | nz | Number of cells in the z-direction in the fine structured grid The default value of nz is 0, 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] |
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 mesh m1. The size of vector u2 is deduced from the mesh m2| size_t NodeLabel | ( | const Element & | el, |
| size_t | n ) |
Return global label of node local label in element.
| [in] | el | Reference to Element instance |
| [in] | n | Local label of node in element |
| size_t NodeLabel | ( | const Side & | sd, |
| size_t | n ) |
Return global label of node local label in side.
| [in] | sd | Reference to Side instance |
| [in] | n | Local label of node in side |
| ostream & operator<< | ( | ostream & | s, |
| const EdgeList & | el ) |
Output EdgeList instance.
| ostream & operator<< | ( | ostream & | s, |
| const ElementList & | el ) |
Output ElementList instance.
| ostream & operator<< | ( | ostream & | s, |
| const Mesh & | ms ) |
Output mesh data.
Level of mesh output depends on the global variable Verbosity
| ostream & operator<< | ( | ostream & | s, |
| const Node & | nd ) |
Output node data.
| ostream & operator<< | ( | ostream & | s, |
| const NodeList & | nl ) |
Output NodeList instance.
| ostream & operator<< | ( | ostream & | s, |
| const Side & | sd ) |
Output side data.
| ostream & operator<< | ( | ostream & | s, |
| const SideList & | sl ) |
Output SideList instance.
| 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.
| [in] | m | Reference to mesh instance |
| [in] | exp | Regular expression using x, y, and z coordinates of nodes, according to exprtk parser |
| [in] | code | Code to assign |
| [in] | dof | Degree of freedom for which code is assigned [Default: 1] |
| 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.
| [in] | m | Reference to mesh instance |
| [in] | exp | Regular expression using x, y, and z coordinates of nodes, according to exprtk parser |
| [in] | code | Code to assign |
| [in] | dof | Degree of freedom for which code is assigned [Default: 1] |