Template Numerical Library version main:1655e92
|
Namespace for numerical meshes and related objects. More...
Namespaces | |
namespace | BuildConfigTags |
Namespace for the configuration of the GridTypeResolver and MeshTypeResolver using so-called build config tags and partial class template specializations. | |
namespace | Readers |
Namespace for mesh readers. | |
namespace | Topologies |
Namespace for unstructured mesh entity topologies. | |
namespace | Writers |
Namespace for mesh writers. | |
Functions | |
template<EntityDecomposerVersion DecomposerVersion, EntityDecomposerVersion SubdecomposerVersion = EntityDecomposerVersion::ConnectEdgesToPoint, typename MeshConfig , std::enable_if_t< std::is_same< typename MeshConfig::CellTopology, Topologies::Polygon >::value, bool > = true> | |
auto | decomposeMesh (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<EntityDecomposerVersion DecomposerVersion, EntityDecomposerVersion SubdecomposerVersion = EntityDecomposerVersion::ConnectEdgesToPoint, typename MeshConfig , std::enable_if_t< std::is_same< typename MeshConfig::CellTopology, Topologies::Polygon >::value, bool > = true> | |
auto | getDecomposedMesh (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<typename Grid , int EntityDimension, typename Config > | |
__cuda_callable__ Grid::PointType | getEntityCenter (const Grid &grid, const GridEntity< Grid, EntityDimension, Config > &entity) |
template<typename MeshConfig , typename Device , typename EntityTopology > | |
__cuda_callable__ MeshTraits< MeshConfig >::PointType | getEntityCenter (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, EntityTopology > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshTraits< MeshConfig >::PointType | getEntityCenter (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Vertex > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityCircumradius (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Edge > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityCircumradius (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Tetrahedron > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityCircumradius (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Triangle > &entity) |
template<typename MeshConfig , typename Device , typename Topology > | |
__cuda_callable__ MeshConfig::RealType | getEntityCircumradius (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topology > &entity) |
template<typename Grid , typename Config > | |
__cuda_callable__ Grid::RealType | getEntityMeasure (const Grid &grid, const GridEntity< Grid, 0, Config > &entity) |
template<typename Grid , int EntityDimension, typename Config > | |
__cuda_callable__ Grid::RealType | getEntityMeasure (const Grid &grid, const GridEntity< Grid, EntityDimension, Config > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Edge > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Hexahedron > &entity) |
template<typename MeshConfig , typename Device , std::enable_if_t< MeshConfig::spaceDimension==2, bool > = true> | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Polygon > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Polyhedron > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Pyramid > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Quadrangle > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Tetrahedron > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Triangle > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Vertex > &entity) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getEntityMeasure (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Wedge > &entity) |
template<typename MeshConfig , typename Device , typename EntityTopology > | |
__cuda_callable__ MeshTraits< MeshConfig >::PointType | getNormalVector (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, EntityTopology > &entity) |
template<typename Grid , typename Config > | |
__cuda_callable__ Grid::PointType | getOutwardNormalVector (const Grid &grid, const GridEntity< Grid, 0, Config > &face, const typename Grid::PointType cellCenter) |
template<typename Grid , typename Config > | |
__cuda_callable__ Grid::PointType | getOutwardNormalVector (const Grid &grid, const GridEntity< Grid, 1, Config > &face, const typename Grid::PointType cellCenter) |
template<typename Grid , typename Config > | |
__cuda_callable__ Grid::PointType | getOutwardNormalVector (const Grid &grid, const GridEntity< Grid, 2, Config > &face, const typename Grid::PointType cellCenter) |
template<typename MeshConfig , typename Device , typename EntityTopology > | |
__cuda_callable__ MeshTraits< MeshConfig >::PointType | getOutwardNormalVector (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, EntityTopology > &face, typename MeshTraits< MeshConfig >::PointType cellCenter) |
template<typename MeshConfig , typename Device > | |
__cuda_callable__ MeshTraits< MeshConfig >::PointType | getOutwardNormalVector (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Edge > &face, typename MeshTraits< MeshConfig >::PointType cellCenter) |
template<EntityDecomposerVersion DecomposerVersion, typename MeshConfig , std::enable_if_t< MeshConfig::spaceDimension==3 &&(std::is_same< typename MeshConfig::CellTopology, Topologies::Polygon >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Polyhedron >::value), bool > = true> | |
auto | getPlanarMesh (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<int Coord1, int Coord2, typename MeshConfig , typename Device > | |
__cuda_callable__ MeshConfig::RealType | getPolygon2DArea (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Polygon > &entity) |
template<EntityRefinerVersion RefinerVersion, typename MeshConfig , std::enable_if_t< std::is_same< typename MeshConfig::CellTopology, Topologies::Triangle >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Quadrangle >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Tetrahedron >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Hexahedron >::value, bool > = true> | |
auto | getRefinedMesh (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<typename VectorExpression > | |
__cuda_callable__ VectorExpression::RealType | getTetrahedronVolume (const VectorExpression &v1, const VectorExpression &v2, const VectorExpression &v3) |
template<typename VectorExpression , std::enable_if_t< VectorExpression::getSize()==2, bool > = true> | |
__cuda_callable__ VectorExpression::RealType | getTriangleArea (const VectorExpression &v1, const VectorExpression &v2) |
template<typename MeshConfig , typename Device , std::enable_if_t< MeshConfig::spaceDimension==3, bool > = true> | |
__cuda_callable__ bool | isPlanar (const Mesh< MeshConfig, Device > &mesh, const MeshEntity< MeshConfig, Device, Topologies::Polygon > &entity, const typename MeshConfig::RealType precision) |
template<typename Mesh > | |
bool | loadDistributedMesh (DistributedMeshes::DistributedMesh< Mesh > &distributedMesh, const std::string &fileName, const std::string &fileFormat="auto", const MPI::Comm &communicator=MPI_COMM_WORLD) |
template<typename Mesh > | |
bool | loadMesh (Mesh &mesh, const std::string &fileName, const std::string &fileFormat="auto") |
template<typename MeshConfig > | |
bool | loadMesh (Mesh< MeshConfig, Devices::Cuda > &mesh, const std::string &fileName, const std::string &fileFormat="auto") |
template<int Dimension, typename Real , typename Device , typename Index > | |
bool | operator!= (const Grid< Dimension, Real, Device, Index > &lhs, const Grid< Dimension, Real, Device, Index > &rhs) |
template<int Dimension, typename Real , typename Device , typename Index > | |
std::ostream & | operator<< (std::ostream &str, const Grid< Dimension, Real, Device, Index > &grid) |
template<typename MeshConfig , typename Device > | |
std::ostream & | operator<< (std::ostream &str, const Mesh< MeshConfig, Device > &mesh) |
template<typename MeshConfig , typename Device , typename EntityTopology > | |
std::ostream & | operator<< (std::ostream &str, const MeshEntity< MeshConfig, Device, EntityTopology > &entity) |
template<int Dimension, typename Real , typename Device , typename Index > | |
bool | operator== (const Grid< Dimension, Real, Device, Index > &lhs, const Grid< Dimension, Real, Device, Index > &rhs) |
template<EntityDecomposerVersion DecomposerVersion, typename MeshConfig , std::enable_if_t< std::is_same< typename MeshConfig::CellTopology, Topologies::Polygon >::value, bool > = true, std::enable_if_t< MeshConfig::spaceDimension==3, bool > = true> | |
auto | planarCorrection (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<EntityDecomposerVersion DecomposerVersion, typename MeshConfig , std::enable_if_t< std::is_same< typename MeshConfig::CellTopology, Topologies::Polyhedron >::value, bool > = true> | |
auto | planarCorrection (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<EntityRefinerVersion RefinerVersion, typename MeshConfig , std::enable_if_t< std::is_same< typename MeshConfig::CellTopology, Topologies::Triangle >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Quadrangle >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Tetrahedron >::value||std::is_same< typename MeshConfig::CellTopology, Topologies::Hexahedron >::value, bool > = true> | |
auto | refineMesh (const Mesh< MeshConfig, Devices::Host > &inMesh) |
template<typename ConfigTag , typename Device , typename Functor > | |
bool | resolveAndLoadDistributedMesh (Functor &&functor, const std::string &fileName, const std::string &fileFormat="auto", const MPI::Comm &communicator=MPI_COMM_WORLD) |
template<typename ConfigTag , typename Device , typename Functor > | |
bool | resolveAndLoadMesh (Functor &&functor, const std::string &fileName, const std::string &fileFormat="auto", const std::string &realType="auto", const std::string &globalIndexType="auto") |
template<typename ConfigTag , typename Device , typename Functor > | |
bool | resolveDistributedMeshType (Functor &&functor, const std::string &fileName, const std::string &fileFormat="auto") |
template<typename ConfigTag , typename Device , typename Functor > | |
bool | resolveMeshType (Functor &&functor, const std::string &fileName, const std::string &fileFormat="auto", const std::string &realType="auto", const std::string &globalIndexType="auto") |
Namespace for numerical meshes and related objects.
bool TNL::Meshes::loadMesh | ( | Mesh & | mesh, |
const std::string & | fileName, | ||
const std::string & | fileFormat = "auto" |
||
) |
This function takes a file name and a mesh instance and attempts to load the mesh from the file into the object.
bool TNL::Meshes::resolveAndLoadMesh | ( | Functor && | functor, |
const std::string & | fileName, | ||
const std::string & | fileFormat = "auto" , |
||
const std::string & | realType = "auto" , |
||
const std::string & | globalIndexType = "auto" |
||
) |
This function dues the same as resolveMeshType, but also reuses the mesh reader instance to load the mesh before passing it to the functor. In pseudo-code:
bool TNL::Meshes::resolveMeshType | ( | Functor && | functor, |
const std::string & | fileName, | ||
const std::string & | fileFormat = "auto" , |
||
const std::string & | realType = "auto" , |
||
const std::string & | globalIndexType = "auto" |
||
) |
This function does the following (in pseudo-code):
The functor should be a generic lambda expression with the following signature (or an equivalent functor):