Class xlifepp::Mesh#

class Mesh#

Collaboration diagram for xlifepp::Mesh:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "21" [label="xlifepp::Collection< string_t >" tooltip="xlifepp::Collection< string_t >"] "14" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"] "18" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "29" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"] "34" [label="std::list< std::pair< number_t, real_t > >" tooltip="std::list< std::pair< number_t, real_t > >"] "10" [label="std::map< number_t, std::vector< number_t > >" tooltip="std::map< number_t, std::vector< number_t > >"] "8" [label="std::map< number_t, xlifepp::Geometry * >" tooltip="std::map< number_t, xlifepp::Geometry * >"] "33" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"] "35" [label="std::list< T >" tooltip="std::list< T >"] "9" [label="std::map< K, T >" tooltip="std::map< K, T >"] "5" [label="std::vector< T >" tooltip="std::vector< T >"] "24" [label="std::vector< T >" tooltip="std::vector< T >"] "17" [label="std::vector< K >" tooltip="std::vector< K >"] "4" [label="std::vector< RealPair >" tooltip="std::vector< RealPair >"] "20" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"] "25" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "15" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "39" [label="std::vector< std::vector< GeoNumPair > >" tooltip="std::vector< std::vector< GeoNumPair > >"] "11" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "22" [label="std::vector< string_t >" tooltip="std::vector< string_t >"] "38" [label="std::vector< xlifepp::GeomDomain * >" tooltip="std::vector< xlifepp::GeomDomain * >"] "37" [label="std::vector< xlifepp::GeomElement * >" tooltip="std::vector< xlifepp::GeomElement * >"] "32" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"] "7" [label="std::vector< xlifepp::Point >" tooltip="std::vector< xlifepp::Point >"] "26" [label="std::vector< xlifepp::Transformation * >" tooltip="std::vector< xlifepp::Transformation * >"] "30" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"] "3" [label="xlifepp::BoundingBox" tooltip="xlifepp::BoundingBox"] "23" [label="xlifepp::Collection< T >" tooltip="xlifepp::Collection< T >"] "12" [label="xlifepp::ExtrusionData" tooltip="xlifepp::ExtrusionData"] "36" [label="xlifepp::GeoNode" tooltip="xlifepp::GeoNode"] "2" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"] "16" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"] "1" [label="xlifepp::Mesh" tooltip="xlifepp::Mesh" fillcolor="#BFBFBF"] "6" [label="xlifepp::MinimalBox" tooltip="xlifepp::MinimalBox"] "31" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"] "28" [label="xlifepp::Parametrization" tooltip="xlifepp::Parametrization"] "27" [label="xlifepp::Point" tooltip="xlifepp::Point"] "13" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation"] "19" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "21" -> "22" [dir=forward tooltip="public-inheritance"] "21" -> "23" [dir=forward tooltip="template-instance"] "14" -> "15" [dir=forward tooltip="public-inheritance"] "14" -> "16" [dir=forward tooltip="template-instance"] "18" -> "15" [dir=forward tooltip="public-inheritance"] "18" -> "19" [dir=forward tooltip="template-instance"] "29" -> "30" [dir=forward tooltip="public-inheritance"] "29" -> "19" [dir=forward tooltip="template-instance"] "34" -> "35" [dir=forward tooltip="template-instance"] "10" -> "9" [dir=forward tooltip="template-instance"] "8" -> "9" [dir=forward tooltip="template-instance"] "33" -> "9" [dir=forward tooltip="template-instance"] "17" -> "5" [dir=forward tooltip="template-instance"] "4" -> "5" [dir=forward tooltip="template-instance"] "20" -> "5" [dir=forward tooltip="template-instance"] "25" -> "5" [dir=forward tooltip="template-instance"] "15" -> "5" [dir=forward tooltip="template-instance"] "39" -> "5" [dir=forward tooltip="template-instance"] "11" -> "5" [dir=forward tooltip="template-instance"] "22" -> "5" [dir=forward tooltip="template-instance"] "38" -> "5" [dir=forward tooltip="template-instance"] "37" -> "5" [dir=forward tooltip="template-instance"] "32" -> "5" [dir=forward tooltip="template-instance"] "7" -> "5" [dir=forward tooltip="template-instance"] "26" -> "5" [dir=forward tooltip="template-instance"] "30" -> "5" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="usage"] "23" -> "24" [dir=forward tooltip="public-inheritance"] "12" -> "13" [dir=forward tooltip="usage"] "12" -> "21" [dir=forward tooltip="usage"] "12" -> "25" [dir=forward tooltip="usage"] "12" -> "15" [dir=forward tooltip="usage"] "12" -> "18" [dir=forward tooltip="usage"] "12" -> "26" [dir=forward tooltip="usage"] "12" -> "27" [dir=forward tooltip="usage"] "36" -> "36" [dir=forward tooltip="usage"] "36" -> "2" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "6" [dir=forward tooltip="usage"] "2" -> "8" [dir=forward tooltip="usage"] "2" -> "10" [dir=forward tooltip="usage"] "2" -> "11" [dir=forward tooltip="usage"] "2" -> "12" [dir=forward tooltip="usage"] "2" -> "28" [dir=forward tooltip="usage"] "2" -> "2" [dir=forward tooltip="usage"] "2" -> "36" [dir=forward tooltip="usage"] "16" -> "17" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "7" [dir=forward tooltip="usage"] "1" -> "37" [dir=forward tooltip="usage"] "1" -> "38" [dir=forward tooltip="usage"] "1" -> "25" [dir=forward tooltip="usage"] "1" -> "39" [dir=forward tooltip="usage"] "1" -> "1" [dir=forward tooltip="usage"] "6" -> "7" [dir=forward tooltip="usage"] "31" -> "32" [dir=forward tooltip="usage"] "31" -> "33" [dir=forward tooltip="usage"] "28" -> "2" [dir=forward tooltip="usage"] "28" -> "18" [dir=forward tooltip="usage"] "28" -> "29" [dir=forward tooltip="usage"] "28" -> "1" [dir=forward tooltip="usage"] "28" -> "31" [dir=forward tooltip="usage"] "28" -> "34" [dir=forward tooltip="usage"] "27" -> "15" [dir=forward tooltip="public-inheritance"] "13" -> "14" [dir=forward tooltip="usage"] "13" -> "18" [dir=forward tooltip="usage"] "13" -> "20" [dir=forward tooltip="usage"] "19" -> "17" [dir=forward tooltip="public-inheritance"] }

handles mesh data either created by internal mesh tools or read from file generated by external mesh tools

Public Functions

Mesh()#

void constructor Mesh from a file of MeshFormat type

void constructor

inline Mesh(const Geometry &g)#

constructors from a geometry and between 0 and 9 key-value options

inline Mesh(const Geometry &g, number_t order, MeshGenerator mg = _defaultGenerator, const string_t &name = "")#

constructor from any 1D geometry

inline Mesh(const Geometry &g, ShapeType sh, number_t order, MeshGenerator mg, MeshOption mo, const string_t &name = "")#

constructor from any 2D and 3D geometries

inline Mesh(const Geometry &g, ShapeType sh, number_t order, MeshGenerator mg, MeshOption mo1, MeshOption mo2, const string_t &name = "")#

constructor from any 2D and 3D geometries

inline Mesh(const Geometry &g, ShapeType sh, number_t order, MeshGenerator mg, MeshOption mo1, MeshOption mo2, MeshOption mo3, const string_t &name = "")#

constructor from any 2D and 3D geometries

inline Mesh(const Geometry &g, ShapeType sh, number_t order = 1, MeshGenerator mg = _defaultGenerator, const string_t &name = "")#

constructor from any 2D and 3D geometries

inline Mesh(const Mesh &m)#

copy constructor

inline Mesh(const Mesh &sectionMesh, const Point &origin, const Point &end, number_t nbl, number_t namingDomain = 0, number_t namingSection = 0, number_t namingSide = 0, const string_t &meshName = "")#

constructor from extrusion

Mesh(ShapeType shape)#

elementary mesh constructor with only one reference element for test purpose

inline ~Mesh()#

destructor

void adaptDomains(number_t mainDomNum, const std::vector<number_t> &elementsColorMap)#

adaptative domains for levelset methods

void addDomain(GeomDomain &dom) const#

add domain to mesh domain list (if not listed)

void addSuffix(const string_t &s)#

add a suffix to all names (mesh name and domain names)

compute mesh center (barycenter of nodes)

void build1DMesh(const Geometry &g, number_t order, MeshGenerator mg, MeshPattern pattern, StructuredMeshSplitRule splitDirection)#

construction method from 1D geometry

void buildGeomData()#

compute element measures and orientation

void buildMesh(const Geometry &g, ShapeType sh, number_t order, MeshGenerator mg, MeshPattern pattern, StructuredMeshSplitRule splitDirection)#

constructor from 2D and 3D geometries

void buildParam(const Parameter &p, IOFormat &iof, number_t &nodesDim)#

construct mesh from file

void buildParam(const Parameter &p, number_t &refinementDepth, number_t &order)#

constructor from a mesh to be subdivided

void buildSideOfSides()#

build the sides of sides elements

void buildSides()#

build the sides elements

void buildSplittedMesh(const Mesh &m, ShapeType sh, const string_t name = "")#

build new mesh splitting type of element of a given mesh, if possible

void buildVertexElements()#

build for each vertex v, the list of elements having v as vertex

Point center() const#

compute mesh center (barycenter of nodes)

void clear()#

clear all data and delete pointers

clear all pointers that have been copied at creation or copy

Mesh &closedCrack(GeomDomain &cdom)#

user shortcut to crack one domain

Mesh &closedCrack(GeomDomain &cdom, const Point &p)#

user shortcut to crack one domain with a point

Mesh &closedCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &cdom2, const Point &p2)#

user shortcut to crack two domains with a point

Mesh &closedCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &cdom2, const Point &p2, GeomDomain &cdom3, const Point &p3)#

user shortcut to crack three domains with a point

Mesh &closedCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &cdom2, const Point &p2, GeomDomain &cdom3, const Point &p3, GeomDomain &cdom4, const Point &p4)#

user shortcut to crack four domains with a point

Mesh &closedCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &cdom2, const Point &p2, GeomDomain &cdom3, const Point &p3, GeomDomain &cdom4, const Point &p4, GeomDomain &cdom5, const Point &p5)#

user shortcut to crack five domains with a point

Mesh &closedCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &cdom2, const Point &p2, GeomDomain &cdom3, const Point &p3, GeomDomain &cdom4, const Point &p4, GeomDomain &cdom5, const Point &p5, GeomDomain &cdom6, const Point &p6)#

user shortcut to crack six domains with a point

Mesh &closedCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &cdom2, const Point &p2, GeomDomain &cdom3, const Point &p3, GeomDomain &cdom4, const Point &p4, GeomDomain &cdom5, const Point &p5, GeomDomain &cdom6, const Point &p6, GeomDomain &cdom7, const Point &p7)#

user shortcut to crack seven domains with a point

Mesh &closedCrack(GeomDomain &cdom1, GeomDomain &cdom2)#

user shortcut to crack two domains

Mesh &closedCrack(GeomDomain &cdom1, GeomDomain &cdom2, GeomDomain &cdom3)#

user shortcut to crack three domains

Mesh &closedCrack(GeomDomain &cdom1, GeomDomain &cdom2, GeomDomain &cdom3, GeomDomain &cdom4)#

user shortcut to crack four domains

Mesh &closedCrack(GeomDomain &cdom1, GeomDomain &cdom2, GeomDomain &cdom3, GeomDomain &cdom4, GeomDomain &cdom5)#

user shortcut to crack five domains

Mesh &closedCrack(GeomDomain &cdom1, GeomDomain &cdom2, GeomDomain &cdom3, GeomDomain &cdom4, GeomDomain &cdom5, GeomDomain &cdom6)#

user shortcut to crack six domains

Mesh &closedCrack(GeomDomain &cdom1, GeomDomain &cdom2, GeomDomain &cdom3, GeomDomain &cdom4, GeomDomain &cdom5, GeomDomain &cdom6, GeomDomain &cdom7)#

user shortcut to crack seven domains

void copy(const Mesh &m)#

deep copy of all mesh attributes

void copyAllButNodes(const Mesh &m)#

deep copy of all mesh attributes, nodes excepted

template<class ST_>
void copyPtsEltsDoms(subdivision::GeomFigureMesh<ST_> *TM_p, const ShapeType elShape, const dimen_t elementDim, const dimen_t spaceDim, number_t &el_k, const vector<string_t> &subdomainNames, const string_t &domName)#

Utilitary function to copy information from subdivision mesh to XLiFE++.

inline Mesh &crack(GeomDomain &cdom, const Point &P1, const string_t &crackName1 = "", const string_t &crackName2 = "", bool withPicture = false)#

general user routine for closed cracks with points

inline Mesh &crack(GeomDomain &cdom, const string_t &crackName1 = "", const string_t &crackName2 = "", bool withPicture = false)#

general user routine for closed cracks

Mesh &crack(GeomDomain &cdom, CrackType cracktype1, const GeomDomain *sideCrack1, CrackType cracktype2, const GeomDomain *sideCrack2, const string_t &crackName1, const string_t &crackName2, const Point *P1, bool withPicture)#

general routine to crack a mesh

main function to crack a side domain cdom the crack process consists in

  • building the list of elements having a vertex on cdom

  • split this list in two set defining the sides of the crack (the first is cdom and the second is named cdom->name2)

  • adding new nodes (clone) and update the node numbering of parent element of side -

  • managing open and closed crack information

  • setting the name of crack sides

The splitting algorithm differs from the case of a side domain in a same domain and an interface between two domains

cdom: the domain (dim-1) to crack cracktype1 : a crack type (openCrack or _closedcrack), default = _closedCrack sideCrack1 : the side domain of cdom where to apply the cracktype1, default = 0 mean all the side domain cracktype2 : a crack type (_openCrack or _closedCrack or _noCrack), default = _closedCrack sideCrack2 : the side domain of cdom where to apply the cracktype2, default = 0 crackName1 : name of crack side 1, default=”” -> crackName1 = “cdom name”+ crackName2 : name of crack side 2, default=”” -> crackName1 = “cdom name”_- P1 : a point close to crack specifying which side of the crack is the first one, default = 0 means unset if unset, crack side 1 is chosen such that max x_E1 > max x_E2 if different , if equal max y_E1 > max y_E2, … where E1/E2 is the set of all vertex of all volume elements connected to crack side 1/2 withPicture: if true save list of crack elements as domain to pictureCrack1.vtk and pictureCrack2.vtk files

NOTE: the original cdom becomes one of the crack side, renamed regarding arguments

examples: m a mesh with Sigma (named Sigma) as side domain to crack

  • m.crack(Sigma) closed crack of Sigma building the two side domains named Sigma+ and Sigma-

  • m.crack(Sigma, _openCrack) open crack of Sigma building the two side domains named Sigma+ and Sigma-

  • m.crack(Sigma, _openCrack, dsig) open crack on dsig and closed everywhere of Sigma building the two side domains named Sigma+ and Sigma-

  • m.crack(Sigma, _openCrack, 0, _noCrack, 0, “S+”,”S-”) open crack everywhere of Sigma building the two side domains named S+ and S-

  • m.crack(Sigma, _openCrack, 0, _noCrack, 0, “S+”,”S-”, P) open crack everywhere of Sigma building the two side domains named S+ and S-, P located at S+ side

inline Mesh &crack(GeomDomain &cdom, CrackType ctype, const GeomDomain &sideCrackToOpen, const Point &P1, const string_t &crackName1 = "", const string_t &crackName2 = "", bool withPicture = false)#

general user routine for open cracks with points

inline Mesh &crack(GeomDomain &cdom, CrackType ctype, const GeomDomain &sideCrackToOpen, const string_t &crackName1 = "", const string_t &crackName2 = "", bool withPicture = false)#

general user routine for open cracks

Mesh *createFirstOrderMesh() const#

create underlying first order mesh if necessary

create a underlying first order mesh (P1) if there exists some elements of order greater than one elements of order greater than one are split in elements of order one as usual:

  • P2 triangle split in 4 P1 triangles, P3 triangle split in 9 P1 triangles, …

  • P2 tetrahedron split in 6 P1 tetrahedra, …

  • Q2 hexahedron split in 6 P1 tetrahedra, …

void createSideEltIndex(std::map<string_t, GeomElement*> &sideEltIndex) const#

index all the side elements of mesh

inline void createSideIndex(std::map<string_t, std::vector<GeoNumPair>> &sideIndex) const#

index all the sides of mesh

MeshGenerator defaultMeshGenerator(const Geometry &g, ShapeType sh = _noShape)#

choose mesh generator from Geometry and element shape

try to find a MeshGenerator for a geometry and an element shape

GeomDomain &domain(const string_t &na)#

access to a domain by its name (no const)

access to a domain by its name

const GeomDomain &domain(const string_t &na) const#

access to a domain by its name (const)

access to a domain by its name

GeomDomain &domain(number_t n)#

access to a domain by its number (no const)

access to a domain by its number

const GeomDomain &domain(number_t n) const#

access to a domain by its number (const)

access to a domain by its number

string_t domainName(number_t n)#

access to a domain name by its number (no const)

access to a domain by its number

string_t domainName(number_t n) const#

access to a domain name by its number (const)

access to a domain by its number

number_t domainNumber(const string_t &na)#

access to a domain number by its name (no const)

access to a domain by its name

number_t domainNumber(const string_t &na) const#

access to a domain number by its name (const)

access to a domain by its name

GeomDomain *domainP(const string_t &na)#

access to a domain pointer by its name, return 0 if not found

const GeomDomain *domainP(const string_t &na) const#

access to a domain pointer by its name, return 0 if not found

access to a domain pointer by its name, return 0 if not found (const)

inline const std::vector<GeomDomain*> &domains() const#

access to the domains list

inline const GeomDomain &domains(number_t i) const#

access to the i-th domain (i>0; no control)

inline const GeomElement &element(number_t i) const#

test if a domain is to be exported in a file

access to the i-th element (i>0; no control)

inline const std::vector<GeomElement*> &elements() const#

access to the elements list

void exportNodes(const string_t &filename) const#

export nodes to a file

export nodes to a file as: x1 y1 z1 … xn yn zn

inline Mesh &firstOrderMesh()#

return underlying first order mesh as reference

inline const Mesh &firstOrderMesh() const#

return underlying first order mesh as const reference

inline dimen_t geometryDim() const#

return the dimension of geometry

Mesh &homothetize(const Parameter &p1)#

apply a homothety on a Mesh (1 key)

apply a homothety on a Mesh (one key)

Mesh &homothetize(const Parameter &p1, const Parameter &p2)#

apply a homothety on a Mesh (2 keys)

Mesh &homothetize(const Point &c, real_t factor = 1.)#

apply a homothety on a Mesh

Mesh &homothetize(real_t factor)#

apply a homothety on a Mesh

void insertDomain(GeomDomain &dom) const#

insert domain at the begining of the list

add domain to mesh domain list (if not listed)

bool isDomainToBeExported(const GeomDomain &dom) const#

test if a domain is to be exported in a file

inline bool isMadeOfSimplices() const#

true if the mesh is composed only with simplices

void melExport(std::ostream &out) const#

export mesh as mel file format to ostream

void merge(const Mesh &m, bool mergeSharedBoundary = true, const string_t &nd = "#Omega")#

“add” mesh to the current one

Merge a mesh to the current mesh with the following rules:

  • the two meshes must have the same dimensions (spaceDim and meshDim)

  • duplicated point are merged (duplicated means same points at a given tolerance, see Point class)

  • duplicated element (same order and same nodes) are merged notes: if meshes are not compatible, they are merged in a stupid way … algorithm is not optimized ! sides_, sideOfSides_, vertexElements_ vectors are not copied (recall buildSides)

mergeSharedBoundary: if true, same boundary domains are merged in a new one domain and original domains are kept with the naming rule: let na1 and na2 the first and second domain name the merged domain name is “na1 or na2” nmd: the optional name of the main domain (the whole domain), by default “#Omega”

void mergeDomainsWithSameName()#

merge all domains having the same name (internal tool)

inline dimen_t meshDim() const#

return the dimension of mesh element (may be less than space dimension)

void mshExport(const GeomDomain &dom, std::ostream &out) const#

export mesh domain as msh file format

void mshExport(std::ostream &out) const#

export mesh as msh file format to ostream

inline const string_t &name() const#

access to the mesh name

inline void name(const string_t &na)#

set to the mesh name

inline number_t nbOfDomains() const#

return the number of domains

inline number_t nbOfElements() const#

return the number of elements

inline number_t nbOfNodes() const#

return the number of nodes

inline number_t nbOfSideOfSides() const#

return the number of side of sides

inline number_t nbOfSides() const#

return the number of sides

inline number_t nbOfVertices() const#

return the number of vertices

void noDuplicateNode(real_t tol = theTolerance)#

remove duplicate nodes at e tolerance and update geomelement

Mesh &openCrack(GeomDomain &cdom, const Point &p, GeomDomain &sideDom)#

user shortcut to crack one domain with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom, GeomDomain &sideDom)#

user shortcut to crack one domain with an open boundary

Mesh &openCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &sideDom1, GeomDomain &cdom2, const Point &p2, GeomDomain &sideDom2)#

user shortcut to crack two domains with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &sideDom1, GeomDomain &cdom2, const Point &p2, GeomDomain &sideDom2, GeomDomain &cdom3, const Point &p3, GeomDomain &sideDom3)#

user shortcut to crack three domains with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &sideDom1, GeomDomain &cdom2, const Point &p2, GeomDomain &sideDom2, GeomDomain &cdom3, const Point &p3, GeomDomain &sideDom3, GeomDomain &cdom4, const Point &p4, GeomDomain &sideDom4)#

user shortcut to crack four domains with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &sideDom1, GeomDomain &cdom2, const Point &p2, GeomDomain &sideDom2, GeomDomain &cdom3, const Point &p3, GeomDomain &sideDom3, GeomDomain &cdom4, const Point &p4, GeomDomain &sideDom4, GeomDomain &cdom5, const Point &p5, GeomDomain &sideDom5)#

user shortcut to crack five domains with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &sideDom1, GeomDomain &cdom2, const Point &p2, GeomDomain &sideDom2, GeomDomain &cdom3, const Point &p3, GeomDomain &sideDom3, GeomDomain &cdom4, const Point &p4, GeomDomain &sideDom4, GeomDomain &cdom5, const Point &p5, GeomDomain &sideDom5, GeomDomain &cdom6, const Point &p6, GeomDomain &sideDom6)#

user shortcut to crack six domains with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom1, const Point &p1, GeomDomain &sideDom1, GeomDomain &cdom2, const Point &p2, GeomDomain &sideDom2, GeomDomain &cdom3, const Point &p3, GeomDomain &sideDom3, GeomDomain &cdom4, const Point &p4, GeomDomain &sideDom4, GeomDomain &cdom5, const Point &p5, GeomDomain &sideDom5, GeomDomain &cdom6, const Point &p6, GeomDomain &sideDom6, GeomDomain &cdom7, const Point &p7, GeomDomain &sideDom7)#

user shortcut to crack seven domains with an open boundary and a point

Mesh &openCrack(GeomDomain &cdom1, GeomDomain &sideDom1, GeomDomain &cdom2, GeomDomain &sideDom2)#

user shortcut to crack two domains with an open boundary

Mesh &openCrack(GeomDomain &cdom1, GeomDomain &sideDom1, GeomDomain &cdom2, GeomDomain &sideDom2, GeomDomain &cdom3, GeomDomain &sideDom3)#

user shortcut to crack three domains with an open boundary

Mesh &openCrack(GeomDomain &cdom1, GeomDomain &sideDom1, GeomDomain &cdom2, GeomDomain &sideDom2, GeomDomain &cdom3, GeomDomain &sideDom3, GeomDomain &cdom4, GeomDomain &sideDom4)#

user shortcut to crack four domains with an open boundary

Mesh &openCrack(GeomDomain &cdom1, GeomDomain &sideDom1, GeomDomain &cdom2, GeomDomain &sideDom2, GeomDomain &cdom3, GeomDomain &sideDom3, GeomDomain &cdom4, GeomDomain &sideDom4, GeomDomain &cdom5, GeomDomain &sideDom5)#

user shortcut to crack five domains with an open boundary

Mesh &openCrack(GeomDomain &cdom1, GeomDomain &sideDom1, GeomDomain &cdom2, GeomDomain &sideDom2, GeomDomain &cdom3, GeomDomain &sideDom3, GeomDomain &cdom4, GeomDomain &sideDom4, GeomDomain &cdom5, GeomDomain &sideDom5, GeomDomain &cdom6, GeomDomain &sideDom6)#

user shortcut to crack six domains with an open boundary

Mesh &openCrack(GeomDomain &cdom1, GeomDomain &sideDom1, GeomDomain &cdom2, GeomDomain &sideDom2, GeomDomain &cdom3, GeomDomain &sideDom3, GeomDomain &cdom4, GeomDomain &sideDom4, GeomDomain &cdom5, GeomDomain &sideDom5, GeomDomain &cdom6, GeomDomain &sideDom6, GeomDomain &cdom7, GeomDomain &sideDom7)#

user shortcut to crack seven domains with an open boundary

Mesh &operator=(const Mesh &m)#

assign operator

insert domain to mesh domain list (if not listed)

inline dimen_t order() const#

return the order of the mesh (max of element orders)

Mesh &pointReflect(const Parameter &p1)#

apply a point reflection on a Mesh (1 key)

apply a point reflection on a Mesh

Mesh &pointReflect(const Point &c)#

apply a point reflection on a Mesh

void print(std::ostream&) const#

print mesh data

void printInfo(std::ostream &os = std::cout) const#

print general informations about what the mesh is made of

Mesh &reflect2d(const Parameter &p1)#

apply a reflection 2D on a Mesh (1 key)

apply a reflection2d on a Mesh (one key)

Mesh &reflect2d(const Parameter &p1, const Parameter &p2)#

apply a reflection 2D on a Mesh (2 keys)

apply a reflection2d on a Mesh (2 keys)

Mesh &reflect2d(const Point &c, real_t ux, real_t uy = 0.)#

apply a reflection 2D on a Mesh

apply a reflection2d on a Mesh

Mesh &reflect2d(const Point &c, std::vector<real_t> u = std::vector<real_t>(2, 0.))#

apply a reflection 2D on a Mesh

apply a reflection2d on a Mesh

Mesh &reflect3d(const Parameter &p1)#

apply a reflection 3D on a Mesh (1 key)

apply a reflection3d on a Mesh (one key)

Mesh &reflect3d(const Parameter &p1, const Parameter &p2)#

apply a reflection 3D on a Mesh (2 keys)

apply a reflection3d on a Mesh (2 keys)

Mesh &reflect3d(const Point &c, real_t ux, real_t uy, real_t uz = 0.)#

apply a reflection 3D on a Mesh

apply a reflection3d on a Mesh

Mesh &reflect3d(const Point &c, std::vector<real_t> u = std::vector<real_t>(3, 0.))#

apply a reflection 3D on a Mesh

apply a reflection3d on a Mesh

void removeDomain(const string_t&)#

remove a domain given by its name, use with cautious

inline void renameDomain(const string_t &oldname, const string_t &newname)#

rename a domain given by its name

inline void renameDomain(number_t n, const string_t &newname)#

rename a domain given by its number

Mesh &rotate2d(const Parameter &p1)#

apply a rotation 2D on a Mesh (1 key)

apply a rotation on a Mesh (one key)

Mesh &rotate2d(const Parameter &p1, const Parameter &p2)#

apply a rotation 2D on a Mesh (2 keys)

apply a rotation on a Mesh (2 keys)

Mesh &rotate2d(const Point &c, real_t angle = 0.)#

apply a rotation on a Mesh

Mesh &rotate3d(const Parameter &p1)#

apply a rotation 3D on a Mesh (1 key)

apply a rotation on a Mesh (one key)

Mesh &rotate3d(const Parameter &p1, const Parameter &p2)#

apply a rotation 3D on a Mesh (2 keys)

apply a rotation on a Mesh (2 keys)

Mesh &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#

apply a rotation 3D on a Mesh (2 keys)

apply a rotation on a Mesh (3 keys)

Mesh &rotate3d(const Point &c, real_t ux, real_t uy, real_t angle)#

apply a rotation on a Mesh

Mesh &rotate3d(const Point &c, real_t ux, real_t uy, real_t uz, real_t angle)#

apply a rotation on a Mesh

Mesh &rotate3d(const Point &c, std::vector<real_t> u = std::vector<real_t>(3, 0.), real_t angle = 0.)#

apply a rotation on a Mesh

Mesh &rotate3d(real_t ux, real_t uy, real_t angle)#

apply a rotation on a Mesh

Mesh &rotate3d(real_t ux, real_t uy, real_t uz, real_t angle)#

apply a rotation on a Mesh

void saveToFile(const string_t &filename, const std::vector<Parameter> &ps) const#

save mesh to file

void saveToFile(const string_t &filename, IOFormat iof = _undefFormat, bool withDomains = false) const#

save mesh to file

void saveToMel(const string_t &filename, bool withDomains) const#

save to mel file format

void saveToMsh(const string_t &filename, bool withDomains = false) const#

save to msh file format

void saveToVtk(const string_t &filename, bool withDomains) const#

save to vtk file format

void saveToVtu(const string_t &fname, bool withDomains) const#

export mesh as vtu file format to ostream

void setShapeTypes()#

set the shape types for all mesh domains

inline const GeomElement &side(number_t i) const#

access to the i-th side (i>0, no control)

inline const GeomElement &sideOfSide(number_t i) const#

access to the i-th side of side (i>0, no control)

inline const std::vector<GeomElement*> &sideOfSides() const#

access to the sides of sides list

inline const std::vector<GeomElement*> &sides() const#

access to the sides list

inline dimen_t spaceDim() const#

return the dimension of physical space (dimension of node)

Mesh &transform(const Transformation &t)#

apply a geometrical transformation on a Mesh

Mesh &translate(const Parameter &p1)#

apply a translation on a Mesh (1 key)

apply a translation on a Mesh (one key)

Mesh &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#

apply a translation on a Mesh (3 reals version)

Mesh &translate(std::vector<real_t> u)#

apply a translation on a Mesh (vector version)

void updateGeometryPointers()#

update geometry pointers of domains and parametrization pointers

void updateNodePointers(bool withDomains = false)#

update node pointers of meshelement from nodenumbers

update node pointers of meshelement from nodenumbers nodenumbers has to be up to date !!! withDomains = false -> do not process the side domains (default)

void updateSideDomains()#

update parent sides of elements involved in all side domains

Update parent sides of elements involved in all side domains.

inline number_t vertex(number_t i) const#

access to the i-th vertex as a MeshSideElement (i>0, no control)

inline const std::vector<std::vector<GeoNumPair>> &vertexElements() const#

access to the vertexElements list

inline const std::vector<number_t> &vertices() const#

access to the vertices list

void vtkExport(const GeomDomain &dom, std::ostream &out) const#

export mesh domain as vtk file format

void vtkExport(std::ostream &out) const#

export mesh as vtk file format to ostream

export first order mesh (firstOrderMesh_p) in vtk file format to ostream out

void vtuExport(const GeomDomain &dom, std::ostream &out) const#

export mesh domain as vtk file format

void vtuExport(std::ostream &out) const#

export mesh as vtu file format to ostream

export first order mesh (firstOrderMesh_p) in vtk file format to ostream out

Public Members

Geometry *geometry_p#

global geometric information (space dimension, variable names, bounding box, …)

mutable number_t lastIndex_#

last index of GeomElements (= max of id numbers over all GeomElements in the mesh)

std::vector<Point> nodes#

list of all mesh nodes (vertices and other nodes)

Friends

friend Mesh extrude(const Mesh &sectionMesh, const std::vector<Transformation*> &trs, const std::vector<Parameter> &ps)#

external routine to apply an extrusion on a Mesh using a list of transformation

friend Mesh extrude(const Mesh &sectionMesh, const Transformation &tr, const std::vector<Parameter> &ps)#

external routine to apply an extrusion on a Mesh using an elementary transformation

friend Mesh extrude(const Mesh &sectionMesh, par_fun f, const std::vector<Parameter> &ps)#

external routine to apply an extrusion on a Mesh using a parametrisation function

friend std::ostream &operator<<(std::ostream &os, const Mesh &m)#

print operator

inline friend Mesh split(const Mesh &m, ShapeType sh, const string_t &name = "")#

external routine to apply splitting of a Mesh