23 Vertex(
const std::vector<double>& coords,
24 const double& value=1.,
25 const std::vector<size_t>& indices=std::vector<size_t>());
const size_t GetDimension() const
Returns the dimension of space in which the vertex lives.
Definition: Vertex.hh:61
std::vector< size_t > _indices
n-vector, indices of the point within a grid
Definition: Vertex.hh:75
const std::vector< double > & GetCoordinates() const
Returns the coordinates of the vertex.
Definition: Vertex.hh:49
double _value
Value of the scalar field in the vertex.
Definition: Vertex.hh:74
Vertex()
Default constructor, initilizes everything to 0.
Definition: Vertex.cc:3
const double & GetValue() const
Returns the value of the field at the vertex.
Definition: Vertex.hh:55
std::vector< double > _coords
n-vector, position of the vertex
Definition: Vertex.hh:73
~Vertex()
Destructor.
Definition: Vertex.cc:33
void SetIndices(const std::vector< size_t > &indices)
Returns the value of the field at the vertex.
Definition: Vertex.hh:67
void SetValue(const double &value)
Returns the value of the field at the vertex.
Definition: Vertex.hh:58
void SetCoordinates(const std::vector< double > &coords)
Returns the coordinates of the vertex.
Definition: Vertex.hh:52
const double & operator[](const size_t id) const
Returns the id^th component of the vector field at which the vertex is defined.
Definition: Vertex.hh:40
double & operator[](const size_t id)
Returns the id^th component of the vector field at which the vertex is defined.
Definition: Vertex.hh:37
const size_t size() const
Returns the dimension of the vector field in which the vertex is defined.
Definition: Vertex.hh:46
const std::vector< size_t > & GetIndices() const
Returns the value of the field at the vertex.
Definition: Vertex.hh:64
double GetNorm() const
Returns the L2 vector norm of the position vector.
Definition: Vertex.cc:35
Defines an n-dimensional vertex and its mapping onto a sclar field.
Definition: Vertex.hh:13
Vertex & operator=(const Vertex &vertex)
Equality operator.
Definition: Vertex.cc:22