walberla::mesh Namespace Reference

Namespaces

 distance_octree
 
 pe
 

Classes

struct  AABBFaceFilter
 
class  AreaFaceDataSource
 
class  BoundaryInfo
 
class  BoundaryLocation
 
class  BoundarySetup
 
class  BoundaryUIDFaceDataSource
 
class  ColorFaceDataSource
 
class  ColorToBoundaryMapper
 
class  ColorVertexDataSource
 
class  ComplexGeometryBlockforestCreator
 
class  ComplexGeometryStructuredBlockforestCreator
 
struct  DistanceProperties
 
class  DistributedVTKMeshWriter
 
class  ExcludeMeshExterior
 
class  ExcludeMeshInterior
 
struct  FloatTraits
 
class  IndexFaceDataSource
 
class  IndexVertexDataSource
 
class  MeshWorkloadMemory
 
class  NormalsFaceDataSource
 
class  NormalsVertexDataSource
 
class  QHull
 
class  QHullFaceSorter
 
class  QHullPointDataSource
 
class  RankFaceDataSource
 
class  RankVertexDataSource
 
struct  RealTraits
 
class  RefinementSelection
 
class  StatusBitFaceDataSource
 
class  StatusBitVertexDataSource
 
struct  StatusFaceFilter
 
struct  SubsetFaceFilter
 
class  TriangleDistance
 Adds information required to compute signed distances from a point to a triangle. More...
 
class  VTKMeshWriter
 

Typedefs

typedef OpenMesh::PolyMesh_ArrayKernelT< OpenMesh::Python::MeshTraitsPythonPolyMesh
 
typedef OpenMesh::PolyMesh_ArrayKernelT< RealTraitsPolyMesh
 
typedef OpenMesh::PolyMesh_ArrayKernelT< FloatTraitsFloatPolyMesh
 
typedef OpenMesh::TriMesh_ArrayKernelT< OpenMesh::Python::MeshTraitsPythonTriangleMesh
 
typedef OpenMesh::TriMesh_ArrayKernelT< RealTraitsTriangleMesh
 
typedef OpenMesh::TriMesh_ArrayKernelT< FloatTraitsFloatTriangleMesh
 

Functions

template<typename DistanceObject >
ExcludeMeshExterior< DistanceObject > makeExcludeMeshExterior (const shared_ptr< DistanceObject > &distanceObject, const real_t maxError)
 
template<typename DistanceObject >
ExcludeMeshInterior< DistanceObject > makeExcludeMeshInterior (const shared_ptr< DistanceObject > &distanceObject, const real_t maxError)
 
static uint_t uintAbsDiff (const uint_t x, const uint_t y)
 
template<typename MeshType >
shared_ptr< StructuredBlockForest > createStructuredBlockStorageInsideMesh (const shared_ptr< mesh::DistanceOctree< MeshType > > &distanceOctree, const real_t dx, const Vector3< uint_t > &blockSize)
 
template<typename MeshType >
shared_ptr< StructuredBlockForest > createStructuredBlockStorageOutsideMesh (const AABB &aabb, const shared_ptr< mesh::DistanceOctree< MeshType > > &distanceOctree, const real_t dx, const Vector3< uint_t > &blockSize)
 
template<typename MeshType >
shared_ptr< StructuredBlockForest > createStructuredBlockStorageInsideMesh (const shared_ptr< mesh::DistanceOctree< MeshType > > &distanceOctree, const real_t dx, const uint_t targetNumRootBlocks)
 
template<typename MeshType >
shared_ptr< StructuredBlockForest > createStructuredBlockStorageOutsideMesh (const AABB &aabb, const shared_ptr< mesh::DistanceOctree< MeshType > > &distanceOctree, const real_t dx, const uint_t targetNumRootBlocks)
 
template<typename DistanceObject >
MeshWorkloadMemory< DistanceObject > makeMeshWorkloadMemory (const shared_ptr< DistanceObject > &distanceObject, const Vector3< typename DistanceObject::Scalar > &cellSize)
 
template<typename DistanceObject >
MeshWorkloadMemory< DistanceObject > makeMeshWorkloadMemory (const shared_ptr< DistanceObject > &distanceObject, const typename DistanceObject::Scalar cellSize)
 
template<typename DistanceObject >
RefinementSelection< DistanceObject > makeRefinementSelection (const shared_ptr< DistanceObject > &distanceObject, const uint_t level, const real_t distance, real_t maxError)
 
template<typename S >
OpenMesh::VectorT< S, 3 > operator* (const math::Matrix3< S > &lhs, const OpenMesh::VectorT< S, 3 > &rhs)
 
template<typename S >
math::Vector3< S > toWalberla (const OpenMesh::VectorT< S, 3 > &v)
 
template<typename S >
OpenMesh::VectorT< S, 3 > toOpenMesh (const math::Vector3< S > &v)
 
template<typename SWB , typename SOM >
math::Vector3< SWB > toWalberlaNumericCast (const OpenMesh::VectorT< SOM, 3 > &v)
 
template<typename SOM , typename SWB >
OpenMesh::VectorT< SOM, 3 > toOpenMeshNumericCast (const math::Vector3< SWB > &v)
 
template<typename OpenMeshType >
void convertOpenMeshToWalberla (const OpenMeshType &omMesh, geometry::TriangleMesh &wbMesh, bool clear=false)
 Converts an OpenMesh to a geometry::TriangleMesh. More...
 
template<typename OpenMeshType >
void convertWalberlaToOpenMesh (const geometry::TriangleMesh &wbMesh, OpenMeshType &omMesh, bool clear=false)
 Converts a geometry::TriangleMesh to an OpenMesh. More...
 
template<typename MeshType >
void readAndBroadcast (const std::string &filename, MeshType &mesh)
 Loads an OpenMesh in parallel. More...
 
template<typename MeshType >
math::GenericAABB< typename MeshType::Scalar > computeAABB (const MeshType &mesh)
 
template<typename MeshType , typename InputIterator >
math::GenericAABB< typename MeshType::Scalar > computeAABBForVertices (const MeshType &mesh, InputIterator beginVh, InputIterator endVh)
 
template<typename MeshType , typename InputIterator >
math::GenericAABB< typename MeshType::Scalar > computeAABBForFaces (const MeshType &mesh, InputIterator beginFh, InputIterator endFh)
 
template<typename MeshType >
void translate (MeshType &mesh, const Vector3< typename MeshType::Scalar > &offset)
 
template<typename MeshType >
void scale (MeshType &mesh, const Vector3< typename MeshType::Scalar > &scaleFactors)
 
template<typename MeshType >
MeshType::Scalar computeVolume (const MeshType &mesh)
 
template<typename MeshType >
MeshType::Scalar computeSurfaceArea (const MeshType &mesh)
 
template<typename MeshType >
MeshType::Point computeCentroid (const MeshType &mesh)
 
template<typename MeshType >
Matrix3< typename MeshType::Scalar > computeInertiaTensor (const MeshType &mesh)
 
template<typename MeshType >
MeshType::Point computeCentroid (const MeshType &mesh, const typename MeshType::FaceHandle fh)
 
template<typename MeshType , typename InputIterator >
std::vector< typename MeshType::VertexHandle > findConnectedVertices (const MeshType &mesh, InputIterator facesBegin, InputIterator facesEnd)
 
template<typename MeshType >
void findConnectedVertices (const MeshType &mesh, const typename MeshType::FaceHandle &face, std::vector< typename MeshType::VertexHandle > &outVertices)
 
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > isIntersecting (const DistanceObject &distanceObject, const math::GenericAABB< T > &aabb, const T &maxError)
 
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > fullyCoversAABB (const DistanceObject &distanceObject, const math::GenericAABB< T > &aabb, const T &maxError)
 
template<typename DistanceObject , typename T , typename U , typename V >
walberla::optional< bool > intersectsSurface (const DistanceObject &distanceObject, const math::GenericAABB< T > &aabb, const U &maxError, const V &surfaceDistance)
 
template<typename MeshType , typename InputIterator >
MeshType::Point principalComponent (const MeshType &mesh, InputIterator beginFh, InputIterator endFh, const uint_t iterations=uint_t(10))
 
template<typename MeshType >
MeshType::Point principalComponent (const MeshType &mesh, const uint_t iterations=uint_t(10))
 
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > isIntersecting (const DistanceObject &distanceObject, const math::GenericAABB< T > &aabb, const U &maxError)
 
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > fullyCoversAABB (const DistanceObject &distanceObject, const math::GenericAABB< T > &aabb, const U &maxError)
 
template<typename MeshType >
shared_ptr< MeshTypeconvexHull (const Vector3< real_t > &points)
 
template<typename MeshType >
shared_ptr< MeshTypeconvexHull (const MeshType &mesh)
 
template<typename MeshType >
void getVertexHandles (const MeshType &mesh, const typename MeshType::FaceHandle fh, typename MeshType::VertexHandle &vh0, typename MeshType::VertexHandle &vh1, typename MeshType::VertexHandle &vh2)
 
template<typename MeshType >
void getVertexPositions (const MeshType &mesh, const typename MeshType::FaceHandle fh, typename MeshType::Point &v0, typename MeshType::Point &v1, typename MeshType::Point &v2)
 
template<typename MeshType >
MeshType::VertexHandle getVertexHandle (const MeshType &mesh, const typename MeshType::FaceHandle fh, const unsigned int vertexIdx)
 
template<typename MeshType >
MeshType::HalfedgeHandle getHalfedgeHandle (const MeshType &mesh, const typename MeshType::FaceHandle fh, const unsigned int fromVertexIdx, const unsigned int toVertexIdx)
 

Typedef Documentation

typedef OpenMesh::PolyMesh_ArrayKernelT<FloatTraits> walberla::mesh::FloatPolyMesh
typedef OpenMesh::TriMesh_ArrayKernelT<FloatTraits> walberla::mesh::FloatTriangleMesh
typedef OpenMesh::PolyMesh_ArrayKernelT<RealTraits> walberla::mesh::PolyMesh
typedef OpenMesh::PolyMesh_ArrayKernelT<OpenMesh::Python::MeshTraits> walberla::mesh::PythonPolyMesh
typedef OpenMesh::TriMesh_ArrayKernelT<OpenMesh::Python::MeshTraits> walberla::mesh::PythonTriangleMesh
typedef OpenMesh::TriMesh_ArrayKernelT<RealTraits> walberla::mesh::TriangleMesh

Function Documentation

template<typename MeshType >
math::GenericAABB< typename MeshType::Scalar > walberla::mesh::computeAABB ( const MeshType mesh)
template<typename MeshType , typename InputIterator >
math::GenericAABB< typename MeshType::Scalar > walberla::mesh::computeAABBForFaces ( const MeshType mesh,
InputIterator  beginFh,
InputIterator  endFh 
)
template<typename MeshType , typename InputIterator >
math::GenericAABB< typename MeshType::Scalar > walberla::mesh::computeAABBForVertices ( const MeshType mesh,
InputIterator  beginVh,
InputIterator  endVh 
)
template<typename MeshType >
MeshType::Point walberla::mesh::computeCentroid ( const MeshType mesh)
template<typename MeshType >
MeshType::Point walberla::mesh::computeCentroid ( const MeshType mesh,
const typename MeshType::FaceHandle  fh 
)
template<typename MeshType >
Matrix3< typename MeshType::Scalar > walberla::mesh::computeInertiaTensor ( const MeshType mesh)
template<typename MeshType >
MeshType::Scalar walberla::mesh::computeSurfaceArea ( const MeshType mesh)
template<typename MeshType >
MeshType::Scalar walberla::mesh::computeVolume ( const MeshType mesh)
template<typename OpenMeshType >
void walberla::mesh::convertOpenMeshToWalberla ( const OpenMeshType &  omMesh,
geometry::TriangleMesh wbMesh,
bool  clear = false 
)

Converts an OpenMesh to a geometry::TriangleMesh.

Only the basic topology is converted. Additional mesh attributes like normals are ignored.

Template Parameters
MeshTypeThe type of the OpenMesh
Parameters
omMeshThe OpenMesh source mesh
wbMeshThe waLBerla target mesh
clearIf true, the waLBerla mesh is cleared before data from omMesh is added
template<typename OpenMeshType >
void walberla::mesh::convertWalberlaToOpenMesh ( const geometry::TriangleMesh wbMesh,
OpenMeshType &  omMesh,
bool  clear = false 
)

Converts a geometry::TriangleMesh to an OpenMesh.

Only the basic topology is converted. Additional mesh attributes like normals are ignored.

Template Parameters
MeshTypeThe type of the OpenMesh
Parameters
wbMeshThe waLBerla source mesh
omMeshThe OpenMesh target mesh
clearIf true, the OpenMesh is cleared before data from wbMesh is added
template<typename MeshType >
shared_ptr< MeshType > walberla::mesh::convexHull ( const Vector3< real_t > &  points)
inline
template<typename MeshType >
shared_ptr< MeshType > walberla::mesh::convexHull ( const MeshType mesh)
inline
template<typename MeshType >
shared_ptr<StructuredBlockForest> walberla::mesh::createStructuredBlockStorageInsideMesh ( const shared_ptr< mesh::DistanceOctree< MeshType > > &  distanceOctree,
const real_t  dx,
const Vector3< uint_t > &  blockSize 
)
template<typename MeshType >
shared_ptr<StructuredBlockForest> walberla::mesh::createStructuredBlockStorageInsideMesh ( const shared_ptr< mesh::DistanceOctree< MeshType > > &  distanceOctree,
const real_t  dx,
const uint_t  targetNumRootBlocks 
)
template<typename MeshType >
shared_ptr<StructuredBlockForest> walberla::mesh::createStructuredBlockStorageOutsideMesh ( const AABB &  aabb,
const shared_ptr< mesh::DistanceOctree< MeshType > > &  distanceOctree,
const real_t  dx,
const Vector3< uint_t > &  blockSize 
)
template<typename MeshType >
shared_ptr<StructuredBlockForest> walberla::mesh::createStructuredBlockStorageOutsideMesh ( const AABB &  aabb,
const shared_ptr< mesh::DistanceOctree< MeshType > > &  distanceOctree,
const real_t  dx,
const uint_t  targetNumRootBlocks 
)
template<typename MeshType , typename InputIterator >
std::vector< typename MeshType::VertexHandle > walberla::mesh::findConnectedVertices ( const MeshType mesh,
InputIterator  facesBegin,
InputIterator  facesEnd 
)
template<typename MeshType >
void walberla::mesh::findConnectedVertices ( const MeshType mesh,
const typename MeshType::FaceHandle &  face,
std::vector< typename MeshType::VertexHandle > &  outVertices 
)
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > walberla::mesh::fullyCoversAABB ( const DistanceObject &  distanceObject,
const math::GenericAABB< T > &  aabb,
const T &  maxError 
)
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > walberla::mesh::fullyCoversAABB ( const DistanceObject &  distanceObject,
const math::GenericAABB< T > &  aabb,
const U &  maxError 
)
template<typename MeshType >
MeshType::HalfedgeHandle walberla::mesh::getHalfedgeHandle ( const MeshType mesh,
const typename MeshType::FaceHandle  fh,
const unsigned int  fromVertexIdx,
const unsigned int  toVertexIdx 
)
inline
template<typename MeshType >
MeshType::VertexHandle walberla::mesh::getVertexHandle ( const MeshType mesh,
const typename MeshType::FaceHandle  fh,
const unsigned int  vertexIdx 
)
inline
template<typename MeshType >
void walberla::mesh::getVertexHandles ( const MeshType mesh,
const typename MeshType::FaceHandle  fh,
typename MeshType::VertexHandle &  vh0,
typename MeshType::VertexHandle &  vh1,
typename MeshType::VertexHandle &  vh2 
)
inline
template<typename MeshType >
void walberla::mesh::getVertexPositions ( const MeshType mesh,
const typename MeshType::FaceHandle  fh,
typename MeshType::Point &  v0,
typename MeshType::Point &  v1,
typename MeshType::Point &  v2 
)
inline
template<typename DistanceObject , typename T , typename U , typename V >
walberla::optional< bool > walberla::mesh::intersectsSurface ( const DistanceObject &  distanceObject,
const math::GenericAABB< T > &  aabb,
const U &  maxError,
const V &  surfaceDistance 
)
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > walberla::mesh::isIntersecting ( const DistanceObject &  distanceObject,
const math::GenericAABB< T > &  aabb,
const T &  maxError 
)
template<typename DistanceObject , typename T , typename U >
walberla::optional< bool > walberla::mesh::isIntersecting ( const DistanceObject &  distanceObject,
const math::GenericAABB< T > &  aabb,
const U &  maxError 
)
template<typename DistanceObject >
ExcludeMeshExterior<DistanceObject> walberla::mesh::makeExcludeMeshExterior ( const shared_ptr< DistanceObject > &  distanceObject,
const real_t  maxError 
)
template<typename DistanceObject >
ExcludeMeshInterior<DistanceObject> walberla::mesh::makeExcludeMeshInterior ( const shared_ptr< DistanceObject > &  distanceObject,
const real_t  maxError 
)
template<typename DistanceObject >
MeshWorkloadMemory< DistanceObject > walberla::mesh::makeMeshWorkloadMemory ( const shared_ptr< DistanceObject > &  distanceObject,
const Vector3< typename DistanceObject::Scalar > &  cellSize 
)
template<typename DistanceObject >
MeshWorkloadMemory< DistanceObject > walberla::mesh::makeMeshWorkloadMemory ( const shared_ptr< DistanceObject > &  distanceObject,
const typename DistanceObject::Scalar  cellSize 
)
template<typename DistanceObject >
RefinementSelection< DistanceObject > walberla::mesh::makeRefinementSelection ( const shared_ptr< DistanceObject > &  distanceObject,
const uint_t  level,
const real_t  distance,
real_t  maxError 
)
inline
template<typename S >
OpenMesh::VectorT<S, 3> walberla::mesh::operator* ( const math::Matrix3< S > &  lhs,
const OpenMesh::VectorT< S, 3 > &  rhs 
)
inline
template<typename MeshType , typename InputIterator >
MeshType::Point walberla::mesh::principalComponent ( const MeshType mesh,
InputIterator  beginFh,
InputIterator  endFh,
const uint_t  iterations = uint_t(10) 
)
template<typename MeshType >
MeshType::Point walberla::mesh::principalComponent ( const MeshType mesh,
const uint_t  iterations = uint_t( 10 ) 
)
template<typename MeshType >
void walberla::mesh::readAndBroadcast ( const std::string &  filename,
MeshType mesh 
)

Loads an OpenMesh in parallel.

The mesh is read from disk by a single process and then broadcasted. This ensures a scalable load process that does not put to much pressure on the file system at large scale.

Template Parameters
MeshTypeThe type of the OpenMesh
Parameters
filenamefilename of the mesh to be loaded
meshThe mesh data structure to be written to
template<typename MeshType >
void walberla::mesh::scale ( MeshType mesh,
const Vector3< typename MeshType::Scalar > &  scaleFactors 
)
template<typename S >
OpenMesh::VectorT<S, 3> walberla::mesh::toOpenMesh ( const math::Vector3< S > &  v)
inline
template<typename SOM , typename SWB >
OpenMesh::VectorT<SOM, 3> walberla::mesh::toOpenMeshNumericCast ( const math::Vector3< SWB > &  v)
inline
template<typename S >
math::Vector3<S> walberla::mesh::toWalberla ( const OpenMesh::VectorT< S, 3 > &  v)
inline
template<typename SWB , typename SOM >
math::Vector3<SWB> walberla::mesh::toWalberlaNumericCast ( const OpenMesh::VectorT< SOM, 3 > &  v)
inline
template<typename MeshType >
void walberla::mesh::translate ( MeshType mesh,
const Vector3< typename MeshType::Scalar > &  offset 
)
static uint_t walberla::mesh::uintAbsDiff ( const uint_t  x,
const uint_t  y 
)
inlinestatic