preCICE v3.1.2
Loading...
Searching...
No Matches
Vertex.cpp
Go to the documentation of this file.
1#include "Vertex.hpp"
2#include <Eigen/Core>
3#include "utils/EigenIO.hpp"
4
5namespace precice::mesh {
6
8{
9 return _dim;
10}
11
13{
14 return _globalIndex;
15}
16
17void Vertex::setGlobalIndex(int globalIndex)
18{
19 _globalIndex = globalIndex;
20}
21
22bool Vertex::isOwner() const
23{
24 return _owner;
25}
26
27void Vertex::setOwner(bool owner)
28{
29 _owner = owner;
30}
31
32bool Vertex::isTagged() const
33{
34 return _tagged;
35}
36
38{
39 _tagged = true;
40}
41
43{
44 return os << "POINT (" << v.getCoords().transpose().format(utils::eigenio::wkt()) << ')';
45}
46
47} // namespace precice::mesh
Vertex of a mesh.
Definition Vertex.hpp:16
short _dim
Dimension of the coordinates. 3D or 2D.
Definition Vertex.hpp:71
bool _tagged
true if this vertex is tagged for partition
Definition Vertex.hpp:83
bool _owner
true if this processors is the owner of the vertex (for parallel simulations)
Definition Vertex.hpp:80
bool isTagged() const
Definition Vertex.cpp:32
void setGlobalIndex(int globalIndex)
Definition Vertex.cpp:17
int _globalIndex
global (unique) index for parallel simulations
Definition Vertex.hpp:77
void setOwner(bool owner)
Definition Vertex.cpp:27
int getDimensions() const
Returns spatial dimensionality of vertex.
Definition Vertex.cpp:7
bool isOwner() const
Definition Vertex.cpp:22
Eigen::VectorXd getCoords() const
Returns the coordinates of the vertex.
Definition Vertex.hpp:116
int getGlobalIndex() const
Globally unique index.
Definition Vertex.cpp:12
provides Mesh, Data and primitives.
std::ostream & operator<<(std::ostream &os, const BoundingBox &bb)
Eigen::IOFormat wkt()
Definition EigenIO.hpp:9