preCICE v3.1.1
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
precice::mesh Namespace Reference

provides Mesh, Data and primitives. More...

Classes

class  BoundingBox
 An axis-aligned bounding box around a (partition of a) mesh. More...
 
struct  Chain
 
class  Data
 Describes a set of data values belonging to the vertices of a mesh. More...
 
class  DataConfiguration
 Performs and provides configuration for Data objects from XML files. More...
 
class  Edge
 Linear edge of a mesh, defined by two Vertex objects. More...
 
class  IndexRangeIterator
 
class  Mesh
 Container and creator for meshes. More...
 
class  MeshConfiguration
 
class  Tetrahedron
 Tetrahedron of a mesh, defined by 4 vertices. More...
 
class  Triangle
 Triangle of a mesh, defined by three vertices. More...
 
class  Vertex
 Vertex of a mesh. More...
 

Typedefs

using PtrData = std::shared_ptr<Data>
 
using PtrGroup = std::shared_ptr<Group>
 
using PtrMesh = std::shared_ptr<Mesh>
 
using PtrDataConfiguration = std::shared_ptr<DataConfiguration>
 
using PtrMeshConfiguration = std::shared_ptr<MeshConfiguration>
 

Functions

std::ostreamoperator<< (std::ostream &os, const BoundingBox &bb)
 
std::ostreamoperator<< (std::ostream &stream, const Edge &edge)
 
template<typename UnaryPredicate >
void filterMesh (Mesh &destination, const Mesh &source, UnaryPredicate p)
 
std::ostreamoperator<< (std::ostream &os, const Mesh &m)
 
std::ostreamoperator<< (std::ostream &os, const Tetrahedron &t)
 
 BOOST_CONCEPT_ASSERT ((boost::RandomAccessIteratorConcept< Triangle::iterator >))
 
 BOOST_CONCEPT_ASSERT ((boost::RandomAccessIteratorConcept< Triangle::const_iterator >))
 
 BOOST_CONCEPT_ASSERT ((boost::RandomAccessRangeConcept< Triangle >))
 
std::ostreamoperator<< (std::ostream &os, const Triangle &t)
 
Eigen::VectorXd integrateSurface (const PtrMesh &mesh, const Eigen::VectorXd &input)
 Given the data and the mesh, this function returns the surface integral. Assumes no overlap exists for the mesh.
 
Eigen::VectorXd integrateVolume (const PtrMesh &mesh, const Eigen::VectorXd &input)
 Given the data and the mesh, this function returns the volume integral. Assumes no overlap exists for the mesh.
 
VertexsharedVertex (Edge &a, Edge &b)
 
double edgeLength (const Edge &e)
 
template<std::size_t n>
Chain< n > asChain (std::array< mesh::Edge *, n > edges)
 
template<std::size_t n>
std::array< Vertex *, n > vertexPtrsFor (Mesh &mesh, const std::array< int, n > &vertexIDs)
 Given a mesh and an array of vertexIDS, this function returns an array of pointers to vertices.
 
template<std::size_t n>
std::array< Eigen::VectorXd, n > coordsFor (const Mesh &mesh, const std::array< int, n > &vertexIDs)
 Given a mesh and an array of vertexIDS, this function returns an array of coordinates of the vertices.
 
template<std::size_t n>
std::array< Eigen::VectorXd, n > coordsFor (const std::array< Vertex *, n > &vertexPtrs)
 Given an array of vertex pointers, this function returns an array of coordinates of the vertices.
 
template<typename Container >
std::optional< std::size_tlocateInvalidVertexID (const Mesh &mesh, const Container &container)
 
std::ostreamoperator<< (std::ostream &os, const Vertex &v)
 Make Vertex printable.
 

Detailed Description

provides Mesh, Data and primitives.

Typedef Documentation

◆ PtrData

Definition at line 14 of file SharedPointer.hpp.

◆ PtrDataConfiguration

Definition at line 17 of file SharedPointer.hpp.

◆ PtrGroup

Definition at line 15 of file SharedPointer.hpp.

◆ PtrMesh

Definition at line 16 of file SharedPointer.hpp.

◆ PtrMeshConfiguration

Definition at line 18 of file SharedPointer.hpp.

Function Documentation

◆ asChain()

template<std::size_t n>
Chain< n > precice::mesh::asChain ( std::array< mesh::Edge *, n > edges)

Generates a chain for an array of edges.

The resulting verices and edges are undefined if the chain is not connected. If the edges form a chain, then the first edge of the resulting chain is the first edge of the argument. Also, the first and last vertex of the chain will be the vertices of the first edge of the argument.

Parameters
[in]edgesan array of pointers to edges to chain together
Returns
A Chain of the input

Definition at line 73 of file Utils.hpp.

Here is the call graph for this function:

◆ BOOST_CONCEPT_ASSERT() [1/3]

precice::mesh::BOOST_CONCEPT_ASSERT ( (boost::RandomAccessIteratorConcept< Triangle::const_iterator >) )

◆ BOOST_CONCEPT_ASSERT() [2/3]

precice::mesh::BOOST_CONCEPT_ASSERT ( (boost::RandomAccessIteratorConcept< Triangle::iterator >) )

◆ BOOST_CONCEPT_ASSERT() [3/3]

precice::mesh::BOOST_CONCEPT_ASSERT ( (boost::RandomAccessRangeConcept< Triangle >) )

◆ coordsFor() [1/2]

template<std::size_t n>
std::array< Eigen::VectorXd, n > precice::mesh::coordsFor ( const Mesh & mesh,
const std::array< int, n > & vertexIDs )

Given a mesh and an array of vertexIDS, this function returns an array of coordinates of the vertices.

Definition at line 123 of file Utils.hpp.

Here is the call graph for this function:

◆ coordsFor() [2/2]

template<std::size_t n>
std::array< Eigen::VectorXd, n > precice::mesh::coordsFor ( const std::array< Vertex *, n > & vertexPtrs)

Given an array of vertex pointers, this function returns an array of coordinates of the vertices.

Definition at line 133 of file Utils.hpp.

Here is the call graph for this function:

◆ edgeLength()

double precice::mesh::edgeLength ( const Edge & e)
inline

Calculates the length of an Edge

Parameters
[in]ethe edge
Returns
the distance between both vertices of e

Definition at line 47 of file Utils.hpp.

Here is the call graph for this function:

◆ filterMesh()

template<typename UnaryPredicate >
void precice::mesh::filterMesh ( Mesh & destination,
const Mesh & source,
UnaryPredicate p )

filters the source Mesh and adds it to the destination Mesh

Parameters
[in,out]destinationthe destination mesh to append the filtered Mesh to
[in]sourcethe source Mesh to filter
[in]pthe filter as a UnaryPredicate on mesh::Vertex

Definition at line 17 of file Filter.hpp.

Here is the call graph for this function:

◆ integrateSurface()

Eigen::VectorXd precice::mesh::integrateSurface ( const PtrMesh & mesh,
const Eigen::VectorXd & input )

Given the data and the mesh, this function returns the surface integral. Assumes no overlap exists for the mesh.

Definition at line 11 of file Utils.cpp.

Here is the call graph for this function:

◆ integrateVolume()

Eigen::VectorXd precice::mesh::integrateVolume ( const PtrMesh & mesh,
const Eigen::VectorXd & input )

Given the data and the mesh, this function returns the volume integral. Assumes no overlap exists for the mesh.

Definition at line 41 of file Utils.cpp.

Here is the call graph for this function:

◆ locateInvalidVertexID()

template<typename Container >
std::optional< std::size_t > precice::mesh::locateInvalidVertexID ( const Mesh & mesh,
const Container & container )

Definition at line 148 of file Utils.hpp.

Here is the call graph for this function:

◆ operator<<() [1/6]

std::ostream & precice::mesh::operator<< ( std::ostream & os,
const BoundingBox & bb )

Definition at line 192 of file BoundingBox.cpp.

Here is the call graph for this function:

◆ operator<<() [2/6]

std::ostream & precice::mesh::operator<< ( std::ostream & os,
const Mesh & m )

Definition at line 514 of file Mesh.cpp.

Here is the call graph for this function:

◆ operator<<() [3/6]

std::ostream & precice::mesh::operator<< ( std::ostream & os,
const Tetrahedron & t )

Definition at line 75 of file Tetrahedron.cpp.

Here is the call graph for this function:

◆ operator<<() [4/6]

std::ostream & precice::mesh::operator<< ( std::ostream & os,
const Triangle & t )

Definition at line 113 of file Triangle.cpp.

Here is the call graph for this function:

◆ operator<<() [5/6]

std::ostream & precice::mesh::operator<< ( std::ostream & os,
Vertex const & v )

Make Vertex printable.

Definition at line 42 of file Vertex.cpp.

Here is the call graph for this function:

◆ operator<<() [6/6]

std::ostream & precice::mesh::operator<< ( std::ostream & stream,
const Edge & edge )

Definition at line 54 of file Edge.cpp.

Here is the call graph for this function:

◆ sharedVertex()

Vertex * precice::mesh::sharedVertex ( Edge & a,
Edge & b )
inline

return a pointer to the shared vertex of 2 edges

If a and b connect the same vertices, then this will simply return one vertex.

Parameters
[in]apointer to Edge a
[in]bpointer to Edge b
Returns
a pointer to a Vertex shared by a and b or nullptr otherwise.

Definition at line 26 of file Utils.hpp.

Here is the call graph for this function:

◆ vertexPtrsFor()

template<std::size_t n>
std::array< Vertex *, n > precice::mesh::vertexPtrsFor ( Mesh & mesh,
const std::array< int, n > & vertexIDs )

Given a mesh and an array of vertexIDS, this function returns an array of pointers to vertices.

Definition at line 112 of file Utils.hpp.

Here is the call graph for this function: