preCICE
Loading...
Searching...
No Matches
Vertex Class Reference

Vertex of a mesh. More...

#include <Vertex.hpp>

Collaboration diagram for Vertex:
[legend]

Public Types

using RawCoords = std::array<double, 3>

Public Member Functions

template<typename VECTOR_T>
 Vertex (const VECTOR_T &coordinates, VertexID id)
 Constructor for vertex.
int getDimensions () const
 Returns spatial dimensionality of vertex.
template<typename VECTOR_T>
void setCoords (const VECTOR_T &coordinates)
 Sets the coordinates of the vertex.
VertexID getID () const
 Returns the unique (among vertices of one mesh on one processor) ID of the vertex.
Eigen::VectorXd getCoords () const
 Returns the coordinates of the vertex.
const RawCoordsrawCoords () const
 Direct access to the coordinates.
int getGlobalIndex () const
 Globally unique index.
void setGlobalIndex (int globalIndex)
bool isOwner () const
void setOwner (bool owner)
bool isTagged () const
void setTagged (bool tagged)
void tag ()
double coord (int index) const
 Returns a coordinate of a vertex.
bool operator== (const Vertex &rhs) const
bool operator!= (const Vertex &rhs) const
bool operator< (const Vertex &rhs) const
 Implements partial ordering by ID.

Private Attributes

std::array< double, 3 > _coords
 Coordinates of the vertex.
short _dim
 Dimension of the coordinates. 3D or 2D.
VertexID _id
 Unique (among vertices in one mesh) ID of the vertex.
int _globalIndex = -1
 global (unique) index for parallel simulations
bool _owner = true
 true if this processors is the owner of the vertex (for parallel simulations)
bool _tagged = false
 true if this vertex is tagged for partition

Detailed Description

Vertex of a mesh.

Definition at line 16 of file Vertex.hpp.

Member Typedef Documentation

◆ RawCoords

using precice::mesh::Vertex::RawCoords = std::array<double, 3>

Definition at line 19 of file Vertex.hpp.

Constructor & Destructor Documentation

◆ Vertex()

template<typename VECTOR_T>
precice::mesh::Vertex::Vertex ( const VECTOR_T & coordinates,
VertexID id )

Constructor for vertex.

Definition at line 91 of file Vertex.hpp.

Member Function Documentation

◆ coord()

double precice::mesh::Vertex::coord ( int index) const
inline

Returns a coordinate of a vertex.

Definition at line 128 of file Vertex.hpp.

◆ getCoords()

Eigen::VectorXd precice::mesh::Vertex::getCoords ( ) const
inline

Returns the coordinates of the vertex.

Definition at line 116 of file Vertex.hpp.

◆ getDimensions()

Returns spatial dimensionality of vertex.

Definition at line 7 of file Vertex.cpp.

◆ getGlobalIndex()

Globally unique index.

Definition at line 12 of file Vertex.cpp.

◆ getID()

VertexID precice::mesh::Vertex::getID ( ) const
inline

Returns the unique (among vertices of one mesh on one processor) ID of the vertex.

Definition at line 111 of file Vertex.hpp.

◆ isOwner()

Definition at line 22 of file Vertex.cpp.

◆ isTagged()

Definition at line 32 of file Vertex.cpp.

◆ operator!=()

bool precice::mesh::Vertex::operator!= ( const Vertex & rhs) const
inline

Definition at line 139 of file Vertex.hpp.

◆ operator<()

bool precice::mesh::Vertex::operator< ( const Vertex & rhs) const
inline

Implements partial ordering by ID.

Definition at line 144 of file Vertex.hpp.

◆ operator==()

bool precice::mesh::Vertex::operator== ( const Vertex & rhs) const
inline

Definition at line 134 of file Vertex.hpp.

◆ rawCoords()

Direct access to the coordinates.

Definition at line 123 of file Vertex.hpp.

◆ setCoords()

template<typename VECTOR_T>
void precice::mesh::Vertex::setCoords ( const VECTOR_T & coordinates)

Sets the coordinates of the vertex.

Definition at line 103 of file Vertex.hpp.

◆ setGlobalIndex()

void precice::mesh::Vertex::setGlobalIndex ( int globalIndex)

Definition at line 17 of file Vertex.cpp.

◆ setOwner()

void precice::mesh::Vertex::setOwner ( bool owner)

Definition at line 27 of file Vertex.cpp.

◆ setTagged()

void precice::mesh::Vertex::setTagged ( bool tagged)

Definition at line 37 of file Vertex.cpp.

◆ tag()

Definition at line 42 of file Vertex.cpp.

Member Data Documentation

◆ _coords

std::array<double, 3> precice::mesh::Vertex::_coords
private

Coordinates of the vertex.

Definition at line 70 of file Vertex.hpp.

◆ _dim

Dimension of the coordinates. 3D or 2D.

Definition at line 73 of file Vertex.hpp.

◆ _globalIndex

global (unique) index for parallel simulations

Definition at line 79 of file Vertex.hpp.

◆ _id

VertexID precice::mesh::Vertex::_id
private

Unique (among vertices in one mesh) ID of the vertex.

Definition at line 76 of file Vertex.hpp.

◆ _owner

bool precice::mesh::Vertex::_owner = true
private

true if this processors is the owner of the vertex (for parallel simulations)

Definition at line 82 of file Vertex.hpp.

◆ _tagged

bool precice::mesh::Vertex::_tagged = false
private

true if this vertex is tagged for partition

Definition at line 85 of file Vertex.hpp.


The documentation for this class was generated from the following files: