LifeV
LifeV::MeshUtility Namespace Reference

Namespaces

 MeshStatistics
 Mesh statistics.
 

Data Structures

class  EnquireBEdge
 
class  EnquireBFace
 Functor to check if a Face is on the boundary. More...
 
class  EnquireBPoint
 
class  GetCoordComponent
 This functor is used to do some geometry checks. More...
 
class  GetOnes
 
class  MeshTransformer
 Class to transform a mesh. More...
 

Typedefs

typedef std::map< BareFace, std::pair< ID, ID >, cmpBareItem< BareFace > > temporaryFaceContainer_Type
 A locally used structure, not meant for general use. More...
 
typedef std::map< BareEdge, std::pair< ID, ID >, cmpBareItem< BareEdge > > temporaryEdgeContainer_Type
 A locally used structure, not meant for general use. More...
 

Functions

template<typename MeshType >
UInt findFaces (const MeshType &mesh, temporaryFaceContainer_Type &boundaryFaceContainer, UInt &numInternalFaces, temporaryFaceContainer_Type &internalFaces, bool buildAllFaces=false)
 Finds mesh faces. More...
 
template<typename MeshType >
UInt findBoundaryFaces (const MeshType &mesh, temporaryFaceContainer_Type &boundaryFaceContainer, UInt &numInternalFaces)
 Finds boundary faces. More...
 
template<typename MeshType >
UInt findBoundaryEdges (const MeshType &mesh, temporaryEdgeContainer_Type &boundaryEdgeContainer)
 Finds boundary edges. More...
 
template<typename MeshType >
UInt findInternalEdges (const MeshType &mesh, const temporaryEdgeContainer_Type &boundaryEdgeContainer, temporaryEdgeContainer_Type &internalEdgeContainer)
 Finds internal edges. More...
 
template<typename MeshElementMarkedType >
markerID_Type inheritPointsStrongerMarker (MeshElementMarkedType &geoElement)
 
template<typename MeshElementMarkedType >
markerID_Type inheritPointsWeakerMarker (MeshElementMarkedType &geoElement)
 Sets the marker ID of a MeshElementMarked of dimension greater one. More...
 
template<typename MeshType >
UInt testDomainTopology (MeshType const &mesh, UInt &numBoundaryEdges)
 
template<typename MeshEntityListType >
bool checkIsMarkerSet (const MeshEntityListType &meshEntityList)
 Check whether all markers of a the geometry entities stored in a list are set. More...
 
template<typename MeshType >
void setBoundaryEdgesMarker (MeshType &mesh, std::ostream &logStream=std::cout, std::ostream &=std::cerr, bool verbose=true)
 Sets the marker id for all boundary edges by inheriting them from boundary points. More...
 
template<typename MeshType >
void setBoundaryFacesMarker (MeshType &mesh, std::ostream &logStream=std::cout, std::ostream &=std::cerr, bool verbose=true)
 Sets the marker ID for all boundary faces by inheriting them from boundary points. More...
 
template<typename MeshType >
void setBoundaryPointsMarker (MeshType &mesh, std::ostream &logStream=std::cout, std::ostream &=std::cerr, bool verbose=false)
 It sets the marker ID for Points, by inheriting it from facets. More...
 
template<typename MeshEntityListType >
bool checkId (const MeshEntityListType &meshEntityList)
 Verifies if a list of mesh entities have the ID properly set. More...
 
template<typename MeshEntityListType >
void fixId (MeshEntityListType &meshEntityList)
 Fixes a a list of mesh entities so that the ID is properly set. More...
 
template<typename MeshType >
void setBoundaryPointsCounters (MeshType &mesh)
 Fixes boundary points counter It fix the boundary points counter by counting how many points have the boundary flag set. It also resets the boundary points list. More...
 
template<typename MeshType >
void fixBoundaryPoints (MeshType &mesh, std::ostream &logStream=std::cout, std::ostream &=std::cerr, bool verbose=true)
 It fixes boundary flag on points laying on boundary faces. More...
 
template<class MeshType >
bool rearrangeFaces (MeshType &mesh, std::ostream &logStream, std::ostream &errorStream, Switch &sw, UInt &numFaces, UInt &numBoundaryFaces, bool verbose=false, temporaryFaceContainer_Type *externalFaceContainer=0)
 It rearranges the faces stored in the mesh. More...
 
template<class MeshType >
bool fixBoundaryFaces (MeshType &mesh, std::ostream &logStream, std::ostream &errorStream, Switch &sw, UInt &numFaces, UInt &numBoundaryFaces, bool=false, bool verbose=false, temporaryFaceContainer_Type *externalFaceContainer=0)
 It fixes boundary faces so that they are consistently numbered with volumes. More...
 
template<class MeshType >
bool buildFaces (MeshType &mesh, std::ostream &logStream, std::ostream &errorStream, UInt &numBoundaryFaces, UInt &numInternalFaces, bool buildBoundaryFaces=true, bool buildInternalFaces=false, bool verbose=false, temporaryFaceContainer_Type *externalFaceContainer=0)
 Builds faces. More...
 
template<typename MeshType >
bool buildEdges (MeshType &mesh, std::ostream &logStream, std::ostream &errorStream, UInt &numBoundaryEdgesFound, UInt &numInternalEdgesFound, bool buildBoundaryEdges=true, bool buildInternalEdges=false, bool verbose=false, temporaryEdgeContainer_Type *externalEdgeContainer=0)
 It builds edges. More...
 
template<typename MeshType >
void p2MeshFromP1Data (MeshType &mesh, std::ostream &logStream=std::cout)
 It builds a P2 mesh from P1 data. More...
 
template<typename RegionMeshType , typename RegionFunctorType >
void assignRegionMarkerID (RegionMeshType &mesh, const RegionFunctorType &fun)
 
template<typename RegionMeshType >
void printMeshInfos (std::shared_ptr< RegionMeshType > mesh)
 Print informations about the mesh. More...
 
MeshData getMeshData (const std::string &meshName, const std::string &resourcesPath="./", const std::string &meshOrder="P1")
 setup and get the mesh data More...
 
template<typename RegionMeshType >
void loadMesh (std::shared_ptr< RegionMeshType > &meshLocal, std::shared_ptr< RegionMeshType > &meshFull, const std::string &meshName, const std::string &resourcesPath, const std::string &meshOrder)
 Read and partitioned a *.mesh file. More...
 
template<typename RegionMeshType >
void loadPartitionedMesh (std::shared_ptr< RegionMeshType > &meshLocal, const std::string &meshName, const std::string &resourcesPath)
 Read and partitioned a *.mesh file. More...
 
template<typename RegionMeshType >
void loadMesh (std::shared_ptr< RegionMeshType > &meshLocal, std::shared_ptr< RegionMeshType > &meshFull, const std::string &meshName, const std::string &resourcesPath="./", bool isPartitioned=false, const std::string &meshOrder="P1")
 Read and partitioned a *.mesh file. More...
 
template<typename RegionMeshType >
void loadMesh (std::shared_ptr< RegionMeshType > &meshLocal, const std::string &meshName, const std::string &resourcesPath="./", bool isPartitioned=false, const std::string &meshOrder="P1")
 Read and partitioned a *.mesh file. More...
 
template<typename RegionMeshType >
void loadStructuredMesh (std::shared_ptr< RegionMeshType > &mesh, std::shared_ptr< RegionMeshType > &meshFull, markerID_Type regionFlag, const std::vector< UInt > &m, bool verbose=false, const std::vector< Real > &l=std::vector< Real >(3, 1), const std::vector< Real > &t=std::vector< Real >(3, 0))
 Build a mesh from a partitioned mesh. More...
 
template<typename RegionMeshType >
void loadStructuredMesh (std::shared_ptr< RegionMeshType > &mesh, markerID_Type regionFlag, const std::vector< UInt > m, bool verbose=false, const std::vector< Real > &l=std::vector< Real >(3, 1), const std::vector< Real > &t=std::vector< Real >(3, 0))
 Build a mesh from a partitioned mesh. More...
 

Typedef Documentation

◆ temporaryFaceContainer_Type

typedef std::map< BareFace, std::pair<ID, ID >, cmpBareItem<BareFace> > temporaryFaceContainer_Type

A locally used structure, not meant for general use.

Definition at line 72 of file MeshUtility.hpp.

◆ temporaryEdgeContainer_Type

typedef std::map< BareEdge, std::pair<ID, ID>, cmpBareItem<BareEdge> > temporaryEdgeContainer_Type

A locally used structure, not meant for general use.

Definition at line 76 of file MeshUtility.hpp.

Function Documentation

◆ findFaces()

UInt LifeV::MeshUtility::findFaces ( const MeshType mesh,
temporaryFaceContainer_Type boundaryFaceContainer,
UInt numInternalFaces,
temporaryFaceContainer_Type internalFaces,
bool  buildAllFaces = false 
)

Finds mesh faces.

A low level routine, not meant to be called directly. It creates a container with all the information needed to set up properly the boundary faces connectivities.

Parameters
meshA 3D mesh.
boundaryFaceContainer[out]This container will eventually contain a map whose key are the BareFaces corresponding to the boundary faces; the map data are pairs of IDs: the ID of the adjacent element and the relative position of the face in the element. The search of boundary faces does not rely on the proper setting of boundary nodes.
NumInternalFaces[out]A reference to an integer returning the number of internal faces found.
[out]internalFacesA container that will possibly contain a map whose keys are the BareFaces corresponding to internal faces and whose data are pairs of IDs: the ID of the two elements adjacent to the face.
buildAllFacesWhen this bool is set true the function will also construct the set of internal faces, stored in internalFaces.
Returns
Number of boundary faces found
Note
this method is intended to work on 3D meshes

Definition at line 446 of file MeshUtility.hpp.

◆ findBoundaryFaces()

UInt LifeV::MeshUtility::findBoundaryFaces ( const MeshType mesh,
temporaryFaceContainer_Type boundaryFaceContainer,
UInt numInternalFaces 
)

Finds boundary faces.

A low level routine, not meant to be called directly. It creates a container with all the information needed to set up properly the boundary face connectivities.

Parameters
meshA 3D mesh.
boundaryFaceContainer[out]This container will eventually contain a map whose key are the BareFaces corresponding to the boundary faces; the map data are pairs of IDs: the ID of the adjacent element and the relative position of the face in the element. The search of boundary faces does not rely on the proper setting of boundary nodes.
numInternalFaces[out]A reference to an integer returning the number of internal faces found.
Returns
Number of boundary faces found.
Note
this method is intended to work on 3D meshes

Definition at line 528 of file MeshUtility.hpp.

◆ findBoundaryEdges()

UInt LifeV::MeshUtility::findBoundaryEdges ( const MeshType mesh,
temporaryEdgeContainer_Type boundaryEdgeContainer 
)

Finds boundary edges.

A low level routine, not meant to be called directly. It creates a container with all the information needed to set up properly the boundary edges connectivities.

Parameters
meshA mesh.
boundaryEdgeContainer[out]This container will eventually contain a map whose key are the BareEdges corresponding to the boundary edges; the map data are pairs of IDs: the ID of the adjacent face and the relative position of the edge in the element. The search of boundary edges does not rely on the proper setting of boundary nodes.
Returns
Number of boundary edges found.
Precondition
The list of boundary faces in the mesh must be correctly set.

Definition at line 555 of file MeshUtility.hpp.

◆ findInternalEdges()

UInt LifeV::MeshUtility::findInternalEdges ( const MeshType mesh,
const temporaryEdgeContainer_Type boundaryEdgeContainer,
temporaryEdgeContainer_Type internalEdgeContainer 
)

Finds internal edges.

A low level routine, not meant to be called directly. It creates a container with all the information needed to set up properly the edge connectivities.

Parameters
meshA 3D mesh.
boundaryEdgeContainer[in]This container contains a map whose key are the BareEdges corresponding to the boundary edges; the map data are pairs of IDs (if generated from findBoundaryEdges(), those pairs will contain be the ID of the adjacent mesh element and the relative position of the edge in the element).
internalEdgeContainer[out]This container contains a map whose key are the BareEdges corresponding to the boundary edges; the map data are pairs of IDs: the ID of the adjacent element and the relative position of the edge in the element.
Returns
Number of edges found.

Definition at line 613 of file MeshUtility.hpp.

◆ testDomainTopology()

UInt LifeV::MeshUtility::testDomainTopology ( MeshType const &  mesh,
UInt numBoundaryEdges 
)

This routine tests if the topological description of boundary face is sane. In particular all boundary edges must be adjacent to only 2 surface elements and the orientation must be correct.

Parameters
mesha mesh
numBoundaryEdgesThe function also returns the number of boundary edges in numBoundaryEdges.
Returns
It it returns 0 if the test has been passed. If not it returns the number of wrong boundary edges.
Warning
numBoundaryEdges is properly set only if the test has been passed.

Definition at line 730 of file MeshUtility.hpp.

◆ checkIsMarkerSet()

bool LifeV::MeshUtility::checkIsMarkerSet ( const MeshEntityListType &  meshEntityList)

Check whether all markers of a the geometry entities stored in a list are set.

Definition at line 785 of file MeshUtility.hpp.

◆ setBoundaryEdgesMarker()

void LifeV::MeshUtility::setBoundaryEdgesMarker ( MeshType mesh,
std::ostream &  logStream = std::cout,
std::ostream &  = std::cerr,
bool  verbose = true 
)

Sets the marker id for all boundary edges by inheriting them from boundary points.

The paradigm is that an edge WHOSE MARKER HAS NOT ALREADY BEEN SET will get the WEAKER marker ID among its VERTICES. For instance if a vertex is assigned to an Essential BC and the other to a Natural BC the edge will get the marker ID related to the Natural B.C.

What is a weaker marker is set in the MarkerPolicy passed through the markers.

Parameters
meshA mesh
logStreamstream to which a map edgeId -> TimeAdvanceNewmarker will be output
errorStreamstream to which error messages will be sent
verboseif false, no messages will be sent to the logStream
Todo:

it should take the way to handle missing marker ids as policy

errorStream is unused

Definition at line 817 of file MeshUtility.hpp.

◆ setBoundaryFacesMarker()

void LifeV::MeshUtility::setBoundaryFacesMarker ( MeshType mesh,
std::ostream &  logStream = std::cout,
std::ostream &  = std::cerr,
bool  verbose = true 
)

Sets the marker ID for all boundary faces by inheriting them from boundary points.

The paradigm is that a face WHOSE MARKER ID HAS NOT ALREADY BEEN SET will get the WEAKER marker ID among its VERTICES. For instance if a vertex is assigned to a Natural BC and the others to a Natural BC the face will get the marker ID related to the Natural BC

Parameters
meshA mesh
logStreamstream to which a map faceId -> TimeAdvanceNewmarker will be output
errorStreamstream to which error messages will be sent
verboseif false, no messages will be sent to the logStream
Todo:
the way to handle missing IDs should be passed as a policy

Definition at line 869 of file MeshUtility.hpp.

◆ setBoundaryPointsMarker()

void LifeV::MeshUtility::setBoundaryPointsMarker ( MeshType mesh,
std::ostream &  logStream = std::cout,
std::ostream &  = std::cerr,
bool  verbose = false 
)

It sets the marker ID for Points, by inheriting it from facets.

The paradigm is that a point whose marker ID is unset will inherit the strongest marker ID of the surrounding facets, with the convention that if the marker ID of one of the surrounding facets is null, it is ignored.

Parameters
meshA mesh
logStreamstream to which a map PointId -> MarkerId will be output
errorStreamstream to which error messages will be sent
verboseif false, no messages will be sent to the logStream
Precondition
The boundary faces must be correctly set and the points boundary flags as well
Note
it does not touch _bPoints. It must be set otherwhise.

Definition at line 923 of file MeshUtility.hpp.

◆ checkId()

bool LifeV::MeshUtility::checkId ( const MeshEntityListType &  meshEntityList)

Verifies if a list of mesh entities have the ID properly set.

Definition at line 1004 of file MeshUtility.hpp.

◆ fixId()

void LifeV::MeshUtility::fixId ( MeshEntityListType &  meshEntityList)

Fixes a a list of mesh entities so that the ID is properly set.

Definition at line 1026 of file MeshUtility.hpp.

◆ setBoundaryPointsCounters()

void LifeV::MeshUtility::setBoundaryPointsCounters ( MeshType mesh)

Fixes boundary points counter It fix the boundary points counter by counting how many points have the boundary flag set. It also resets the boundary points list.

Precondition
It assumes that the points have the boundary flag correctly set

Definition at line 1047 of file MeshUtility.hpp.

◆ fixBoundaryPoints()

void LifeV::MeshUtility::fixBoundaryPoints ( MeshType mesh,
std::ostream &  logStream = std::cout,
std::ostream &  = std::cerr,
bool  verbose = true 
)

It fixes boundary flag on points laying on boundary faces.

Parameters
mesha mesh
logStreamlogging stream
errorStreamerror stream
verboseIf true you have a verbose output
Precondition
mesh point list must exists and boundary face list must have been set properly.

Definition at line 1103 of file MeshUtility.hpp.

◆ rearrangeFaces()

bool LifeV::MeshUtility::rearrangeFaces ( MeshType mesh,
std::ostream &  logStream,
std::ostream &  errorStream,
Switch sw,
UInt numFaces,
UInt numBoundaryFaces,
bool  verbose = false,
temporaryFaceContainer_Type externalFaceContainer = 0 
)

It rearranges the faces stored in the mesh.

It makes sure that

  1. Faces have the boundary flag correctly set
  2. Boundary faces are stored first

It uses the information given by findBoundaryFaces, so it relies ONLY on the mesh topology

It works on a mesh where faces have already been found! So it is not meant to be used for finding the boundary faces. Use the general utility BuildFaces for that purpose. Its main role, as the name says, is to make sure that faces are well ordered. It does not verify the consitency of the face-to-adjacentVolume information. Use fixBoundaryFaces for this purpose

Parameters
[out]mesha mesh
[out]logStreamstream that will receive all information regarding the markers
[out]errorStreamstream for error messages
[out]swA switch that will contain information on what has been done Possible values are
  1. FACES_REORDERED
numFaces[out]It returns the number of faces found by the function
numBoundaryFaces[out]It returns the number of boundary faces found by the function
[in]verboseif false nothing is written to logStream
[out]externalFaceContainer.If not NULL it is a pointer to an external map of boundary faces, already produced by a call to findBoundaryFaces(). This parameter may be used to save a lot of computational work, since findBoundaryFaces() is rather expensive.
Precondition
Mesh must contain the faces, at least the boundary ones

Definition at line 1202 of file MeshUtility.hpp.

◆ fixBoundaryFaces()

bool LifeV::MeshUtility::fixBoundaryFaces ( MeshType mesh,
std::ostream &  logStream,
std::ostream &  errorStream,
Switch sw,
UInt numFaces,
UInt numBoundaryFaces,
bool  = false,
bool  verbose = false,
temporaryFaceContainer_Type externalFaceContainer = 0 
)

It fixes boundary faces so that they are consistently numbered with volumes.

An important step for building degrees of freedom on faces. It also fixes other face related data. It works on a mesh where boundary faces have already been found! So it is not meant to be used for finding the boundary faces. Use the general utility BuildFaces for that purpose. Its main role, as the name says, is to fix a partially broken mesh. In particular, it assures that the boundary faces are correctly set w.r.t. the adjacent volumes

Parameters
[out]mesha mesh
[out]logStreamstream that will receive all information regarding the markers
[out]errorStreamstream for error messages
[out]swA switch that will contain information on what has been done Possible values are
  1. NUM_FACES_MISMATCH
  2. FIXED_FACE_COUNTER
  3. BFACE_MISSING
  4. BFACE_STORED_MISMATCH
  5. BFACE_COUNTER_UNSET
  6. BFACE_STORED_MISMATCH
  7. FIXED_MAX_NUM_FACES
numFaces[out]It returns the number of faces found by the function
numBoundaryFaces[out]It returns the number of boundary faces found by the function
fixMarker[in]If set to the true value, all faces without a markerFlag set will inherit it from the points. todo remove this parameter (unused)
[in]verboseif false nothing is written to logStream
[out]externalFaceContainer.If not NULL it is a pointer to an external map of boundary faces, already produced by a call to findBoundaryFaces(). This parameter may be used to save a lot of computational work, since findBoundaryFaces() is rather expensive.
Precondition
Boundary faces list must be properly set.
Todo:
The policy to treat missing markers should be passed in the argument, so to allow changes

Definition at line 1357 of file MeshUtility.hpp.

◆ buildFaces()

bool LifeV::MeshUtility::buildFaces ( MeshType mesh,
std::ostream &  logStream,
std::ostream &  errorStream,
UInt numBoundaryFaces,
UInt numInternalFaces,
bool  buildBoundaryFaces = true,
bool  buildInternalFaces = false,
bool  verbose = false,
temporaryFaceContainer_Type externalFaceContainer = 0 
)

Builds faces.

This is a major function. It may be used to build or partially build faces. So it may operate also on a mesh where not all boundary faces are set. Function may alternatively be used to build the compulsory boundary faces, all the mesh faces, or just add to an existing list of just boundary faces the internal ones. It will not destroy the basic info (marker id, etc) contained in the faces list already stored in the meash. So if you want to build everything from scratch you need to clear it first. It (re)build the adjacent volume info, sets the boundary flags and ensures that boundary faces are stored first.

Parameters
meshA mesh
logStreamLog stream for information on the newly created markers
errorStreamError stream
numBoundaryFacesIt returns the number of boundary faces
numInternalFacesIt returns the number of internal faces (only if externalFaceContainer is not provided!)
buildBoundaryFacesif true the function builds boundary faces
buildInternalFacesif true the function builds internal faces
verboseIf true markerFlags info is written on logStream.
externalFaceContainer.If not NULL it is a pointer to an external map of boundary faces, already produced by a call to findBoundaryFaces(). This parameter may be used to save a lot of computational work, since findBoundaryFaces() is rather expensive.
Precondition
If buildInternalFaces=true and buildBoundaryFaces=false the mesh must contain a proper list of boundary faces
Note
By setting buildInternalFaces=true and buildBoundaryFaces=true the function just fixes the counters with the number of faces in the mesh
Returns
true if successful

Definition at line 1588 of file MeshUtility.hpp.

◆ buildEdges()

bool LifeV::MeshUtility::buildEdges ( MeshType mesh,
std::ostream &  logStream,
std::ostream &  errorStream,
UInt numBoundaryEdgesFound,
UInt numInternalEdgesFound,
bool  buildBoundaryEdges = true,
bool  buildInternalEdges = false,
bool  verbose = false,
temporaryEdgeContainer_Type externalEdgeContainer = 0 
)

It builds edges.

This function may alternatively be used to build the boundary edges, all the mesh edges, or just add the internal edges to an existing list of just boundary edges.

Parameters
meshA mesh
logStreamLog stream for information on the newly created markers for boundary edges
errorStreamError stream
numBoundaryEdgesFoundReturns the number of boundary edges
numInternalEdgesFoundReturns the number of internal edges
buildBoundaryEdgesif true the function builds boundary edges
buildInternalEdgesif true the function builds internal edges
verbose.If true markerFlags info is written on logStream.
externalEdgeContainer.If not NULL it is a pointer to an external map of bondary edges, already produced by a call to findBoundaryEdges(). This parameter may be used to save al lot of computational work, since findBoundaryEdges() is rather expensive.
Returns
true if successful
Precondition
If buildInternalEdges=true and buildBoundaryEdges=false the mesh must contain a proper list of boundary edges
The mesh must contain a proper list of boundary faces
Note
By setting buildInternalEdges=true and buildBoundaryEdges=true the function just fixes the counters with the number of edges in the mesh

Definition at line 1956 of file MeshUtility.hpp.

◆ p2MeshFromP1Data()

void LifeV::MeshUtility::p2MeshFromP1Data ( MeshType mesh,
std::ostream &  logStream = std::cout 
)

It builds a P2 mesh from P1 data.

Author
L.Formaggia.
Version
Version 1.0
Precondition
All compulsory structures in mesh must have been already set: volumes and boundary faces.
Points list MUST have been dimensioned correctly!!!
Note
the function takes advantage of the fact that vertex are stored first
Parameters
mesh[out]A mesh
logStream[out]Log stream for information on the newly created markers for boundary edges

Definition at line 2197 of file MeshUtility.hpp.

◆ assignRegionMarkerID()

void LifeV::MeshUtility::assignRegionMarkerID ( RegionMeshType &  mesh,
const RegionFunctorType &  fun 
)

Definition at line 2715 of file MeshUtility.hpp.

◆ printMeshInfos()

void LifeV::MeshUtility::printMeshInfos ( std::shared_ptr< RegionMeshType >  mesh)

Print informations about the mesh.

Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 76 of file MeshLoadingUtility.hpp.

◆ getMeshData()

MeshData LifeV::MeshUtility::getMeshData ( const std::string &  meshName,
const std::string &  resourcesPath = "./",
const std::string &  meshOrder = "P1" 
)
inline

setup and get the mesh data

Parameters
meshNamename of the mesh file
resourcesPathpath to the mesh folder
meshOrderorder of the mesh elements
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 100 of file MeshLoadingUtility.hpp.

◆ loadMesh() [1/3]

void LifeV::MeshUtility::loadMesh ( std::shared_ptr< RegionMeshType > &  meshLocal,
std::shared_ptr< RegionMeshType > &  meshFull,
const std::string &  meshName,
const std::string &  resourcesPath,
const std::string &  meshOrder 
)

Read and partitioned a *.mesh file.

Parameters
meshLocalThe partitioned mesh that we want to generate
meshFullThe non partitioned mesh that we want to keep
meshNamename of the mesh file
resourcesPathpath to the mesh folder
meshOrderorder of the mesh
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 126 of file MeshLoadingUtility.hpp.

◆ loadPartitionedMesh()

void LifeV::MeshUtility::loadPartitionedMesh ( std::shared_ptr< RegionMeshType > &  meshLocal,
const std::string &  meshName,
const std::string &  resourcesPath 
)

Read and partitioned a *.mesh file.

Parameters
meshLocalThe partitioned mesh that we want to generate
meshNamename of the mesh file
resourcesPathpath to the mesh folder
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 173 of file MeshLoadingUtility.hpp.

◆ loadMesh() [2/3]

void LifeV::MeshUtility::loadMesh ( std::shared_ptr< RegionMeshType > &  meshLocal,
std::shared_ptr< RegionMeshType > &  meshFull,
const std::string &  meshName,
const std::string &  resourcesPath = "./",
bool  isPartitioned = false,
const std::string &  meshOrder = "P1" 
)

Read and partitioned a *.mesh file.

Parameters
meshLocalThe partitioned mesh that we want to generate
meshFullThe non partitioned mesh that we want to keep
isPartitionedboolean to say if the mesh should be partitioned or just loaded
meshNamename of the mesh file
resourcesPathpath to the mesh folder
meshOrderorder of the mesh
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 209 of file MeshLoadingUtility.hpp.

◆ loadMesh() [3/3]

void LifeV::MeshUtility::loadMesh ( std::shared_ptr< RegionMeshType > &  meshLocal,
const std::string &  meshName,
const std::string &  resourcesPath = "./",
bool  isPartitioned = false,
const std::string &  meshOrder = "P1" 
)

Read and partitioned a *.mesh file.

Parameters
meshLocalThe partitioned mesh that we want to generate
isPartitionedboolean to say if the mesh should be partitioned or just loaded
meshNamename of the mesh file
resourcesPathpath to the mesh folder
meshOrderorder of the mesh
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 239 of file MeshLoadingUtility.hpp.

◆ loadStructuredMesh() [1/2]

void LifeV::MeshUtility::loadStructuredMesh ( std::shared_ptr< RegionMeshType > &  mesh,
std::shared_ptr< RegionMeshType > &  meshFull,
markerID_Type  regionFlag,
const std::vector< UInt > &  m,
bool  verbose = false,
const std::vector< Real > &  l = std::vector<Real> (3, 1),
const std::vector< Real > &  t = std::vector<Real> (3, 0) 
)

Build a mesh from a partitioned mesh.

Parameters
meshThe mesh that we want to generate
regionFlagFlag of the region
mNumber of elements along the ( length, width, height )
llength of the mesh ( length, width, height )
ttranslation of the mesh along the (x,y,z)-axis
verboseVerbose mode enabled/disabled
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 262 of file MeshLoadingUtility.hpp.

◆ loadStructuredMesh() [2/2]

void LifeV::MeshUtility::loadStructuredMesh ( std::shared_ptr< RegionMeshType > &  mesh,
markerID_Type  regionFlag,
const std::vector< UInt m,
bool  verbose = false,
const std::vector< Real > &  l = std::vector<Real> (3, 1),
const std::vector< Real > &  t = std::vector<Real> (3, 0) 
)

Build a mesh from a partitioned mesh.

Parameters
meshThe mesh that we want to generate
regionFlagFlag of the region
mNumber of elements along the ( length, width, height )
llength of the mesh ( length, width, height )
ttranslation of the mesh along the (x,y,z)-axis
verboseVerbose mode enabled/disabled
Author
Gwenol Grandperrin gweno.nosp@m.l.gr.nosp@m.andpe.nosp@m.rrin.nosp@m.@epfl.nosp@m..ch

Definition at line 330 of file MeshLoadingUtility.hpp.