OGS
MeshLib::Node Class Reference

Detailed Description

A mesh node with coordinates in 3D space.

Definition at line 33 of file Node.h.

#include <Node.h>

Inheritance diagram for MeshLib::Node:
[legend]
Collaboration diagram for MeshLib::Node:
[legend]

Public Member Functions

 Node (const double coords[3], std::size_t id=std::numeric_limits< std::size_t >::max())
 Constructor using a coordinate array. More...
 
 Node (std::array< double, 3 > const &coords, std::size_t id=std::numeric_limits< std::size_t >::max())
 Constructor using a coordinate array. More...
 
 Node (double x, double y, double z, std::size_t id=std::numeric_limits< std::size_t >::max())
 Constructor using single coordinates. More...
 
 Node (const Node &node)
 Copy constructor. More...
 
- Public Member Functions inherited from MathLib::Point3dWithID
 Point3dWithID (double x0, double x1, double x2, std::size_t id=std::numeric_limits< std::size_t >::max())
 
 Point3dWithID (std::array< double, 3 > const &coords, std::size_t id=std::numeric_limits< std::size_t >::max())
 
 Point3dWithID (MathLib::Point3d const &pnt, std::size_t id=std::numeric_limits< std::size_t >::max())
 
 Point3dWithID ()
 
std::size_t getID () const
 
- Public Member Functions inherited from MathLib::TemplatePoint< double, 3 >
 TemplatePoint ()
 
 TemplatePoint (std::array< double, DIM > x)
 
 TemplatePoint (TemplatePoint const &)=default
 
virtual ~TemplatePoint ()=default
 
TemplatePointoperator= (TemplatePoint const &)=default
 
const double & operator[] (std::size_t idx) const
 const access operator The access to the point coordinates is like the access to a field. Code example: More...
 
double & operator[] (std::size_t idx)
 access operator (see book Effektiv C++ programmieren - subsection 1.3.2 ). More...
 
const double * getCoords () const
 
double * getCoords ()
 
virtual void write (std::ostream &os) const
 
virtual void read (std::istream &is)
 

Protected Member Functions

void updateCoordinates (double x, double y, double z)
 
- Protected Member Functions inherited from MathLib::Point3dWithID
void setID (std::size_t id)
 Sets the ID of a node to the given value. More...
 

Friends

class Mesh
 
class NodePartitionedMesh
 
class MeshRevision
 
class MeshLayerMapper
 
class ApplicationUtils::NodeWiseMeshPartitioner
 

Constructor & Destructor Documentation

◆ Node() [1/4]

MeshLib::Node::Node ( const double  coords[3],
std::size_t  id = std::numeric_limits<std::size_t>::max() 
)
explicit

Constructor using a coordinate array.

Definition at line 21 of file Node.cpp.

23  std::array<double, 3>{{coords[0], coords[1], coords[2]}}, id)
24 {
25 }

◆ Node() [2/4]

MeshLib::Node::Node ( std::array< double, 3 > const &  coords,
std::size_t  id = std::numeric_limits<std::size_t>::max() 
)
explicit

Constructor using a coordinate array.

Definition at line 27 of file Node.cpp.

28  : MathLib::Point3dWithID(coords, id)
29 {
30 }

◆ Node() [3/4]

MeshLib::Node::Node ( double  x,
double  y,
double  z,
std::size_t  id = std::numeric_limits<std::size_t>::max() 
)

Constructor using single coordinates.

Definition at line 32 of file Node.cpp.

33  : MathLib::Point3dWithID(std::array<double, 3>({{x, y, z}}), id)
34 {
35 }

◆ Node() [4/4]

MeshLib::Node::Node ( const Node node)

Copy constructor.

Definition at line 37 of file Node.cpp.

37 : MathLib::Point3dWithID(node, node.getID()) {}

Member Function Documentation

◆ updateCoordinates()

void MeshLib::Node::updateCoordinates ( double  x,
double  y,
double  z 
)
protected

Update coordinates of a node. This method automatically also updates the areas/volumes of all connected elements.

Definition at line 39 of file Node.cpp.

40 {
41  (*this)[0] = x;
42  (*this)[1] = y;
43  (*this)[2] = z;
44 }

Friends And Related Function Documentation

◆ ApplicationUtils::NodeWiseMeshPartitioner

Definition at line 40 of file Node.h.

◆ Mesh

friend class Mesh
friend

Definition at line 36 of file Node.h.

◆ MeshLayerMapper

friend class MeshLayerMapper
friend

Definition at line 39 of file Node.h.

◆ MeshRevision

friend class MeshRevision
friend

Definition at line 38 of file Node.h.

◆ NodePartitionedMesh

friend class NodePartitionedMesh
friend

Definition at line 37 of file Node.h.


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