#define PRECICE_ASSERT(...)
This class provides a lightweight logger.
An axis-aligned bounding box around a (partition of a) mesh.
Linear edge of a mesh, defined by two Vertex objects.
Container and creator for meshes.
void expandBoundingBox(const BoundingBox &bounding_box)
Triangle & createTriangle(Edge &edgeOne, Edge &edgeTwo, Edge &edgeThree)
Creates and initializes a Triangle object.
void setGlobalNumberOfVertices(int num)
const VertexDistribution & getVertexDistribution() const
Returns a mapping from rank to used (not necessarily owned) vertex IDs.
MeshID _id
The ID of this mesh.
MeshID getID() const
Returns the base ID of the mesh.
int getGlobalNumberOfVertices() const
std::string _name
Name of the mesh.
std::map< Rank, std::vector< VertexID > > CommunicationMap
A mapping from remote local ranks to the IDs that must be communicated.
std::deque< Triangle > TriangleContainer
bool hasTetrahedra() const
void setVertexDistribution(VertexDistribution vd)
int _globalNumberOfVertices
Number of unique vertices for complete distributed mesh.
int getDimensions() const
VertexContainer & vertices()
Returns modifieable container holding all vertices.
std::vector< PtrData > DataContainer
bool hasDataID(DataID dataID) const
Returns whether Mesh has Data with the matchingID.
Eigen::VectorXd getOwnedVertexData(const Eigen::VectorXd &values)
void clear()
Removes all mesh elements and data values (does not remove data or the bounding boxes).
DataContainer _data
Data hold by the vertices of the mesh.
void addMesh(Mesh &deltaMesh)
bool operator!=(const Mesh &other) const
std::vector< std::string > availableData() const
Returns the names of all available data.
const std::string & getName() const
Returns the name of the mesh, as set in the config file.
void removeDuplicates()
Removes all duplicate connectivity.
static constexpr MeshID MESH_ID_UNDEFINED
Use if the id of the mesh is not necessary.
std::size_t nVertices() const
Returns the number of vertices.
bool hasConnectivity() const
VertexDistribution _vertexDistribution
Vertex distribution for the primary rank, holding for each secondary rank all vertex IDs it owns.
CommunicationMap & getCommunicationMap()
Returns a mapping from remote local connected ranks to the corresponding vertex IDs.
TetraContainer & tetrahedra()
Returns modifiable container holding all tetrahedra.
std::deque< Tetrahedron > TetraContainer
bool operator==(const Mesh &other) const
std::vector< Rank > _connectedRanks
each rank stores list of connected remote ranks. In the m2n package, this is used to create the initi...
TetraContainer _tetrahedra
Vertex & vertex(VertexID id)
Mutable access to a vertex by VertexID.
Mesh(std::string name, int dimensions, MeshID id)
Constructor.
const query::Index & index() const
Call preprocess() before index() to ensure correct projection handling.
VertexContainer _vertices
Holds vertices, edges, triangles and tetrahedra.
bool hasDataName(std::string_view dataName) const
Returns whether Mesh has Data with the dataName.
std::deque< Edge > EdgeContainer
PtrData & createData(const std::string &name, int dimension, DataID id, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Create only data for vertex.
CommunicationMap _communicationMap
each rank stores list of connected ranks and corresponding vertex IDs here. In the m2n package,...
bool empty() const
Does the mesh contain any vertices?
void generateImplictPrimitives()
const std::vector< Rank > & getConnectedRanks() const
Returns a vector of connected ranks.
const VertexOffsets & getVertexOffsets() const
void clearPartitioning()
Clears the partitioning information.
void computeBoundingBox()
Computes the boundingBox for the vertices.
TriangleContainer _triangles
Tetrahedron & createTetrahedron(Vertex &vertexOne, Vertex &vertexTwo, Vertex &vertexThree, Vertex &vertexFour)
Creates and initializes a Tetrahedron object.
VertexOffsets _vertexOffsets
Holds the index of the last vertex for each rank.
void setVertexOffsets(VertexOffsets vertexOffsets)
Only used for tests.
bool isValidVertexID(VertexID vertexID) const
Returns true if the given vertexID is valid.
void setConnectedRanks(std::vector< Rank > ranks)
Returns a vector of connected ranks.
const DataContainer & data() const
Allows access to all data.
TriangleContainer & triangles()
Returns modifiable container holding all triangles.
const BoundingBox & getBoundingBox() const
Returns the bounding box of the mesh.
query::Index & index()
Call preprocess() before index() to ensure correct projection handling.
std::deque< Vertex > VertexContainer
Edge & createEdge(Vertex &vertexOne, Vertex &vertexTwo)
Creates and initializes an Edge object.
EdgeContainer & edges()
Returns modifiable container holding all edges.
Vertex & createVertex(const Eigen::VectorXd &coords)
Creates and initializes a Vertex object.
void allocateDataValues()
Allocates memory for the vertex data values and corresponding gradient values.
bool hasTriangles() const
int _dimensions
Dimension of mesh.
Tetrahedron of a mesh, defined by 4 vertices.
Triangle of a mesh, defined by three vertices.
Class to query the index trees of the mesh.
static const int DEFAULT_WAVEFORM_DEGREE
To be used, when the interpolation degree is not defined.
std::ostream & operator<<(std::ostream &os, const BoundingBox &bb)
Main namespace of the precice library.