OGS
Node.cpp
Go to the documentation of this file.
1 
15 #include "MeshLib/Node.h"
16 
17 #include "Elements/Element.h"
18 
19 namespace MeshLib
20 {
21 Node::Node(const double coords[3], std::size_t id)
22  : MathLib::Point3dWithID(
23  std::array<double, 3>{{coords[0], coords[1], coords[2]}}, id)
24 {
25 }
26 
27 Node::Node(std::array<double, 3> const& coords, std::size_t id)
28  : MathLib::Point3dWithID(coords, id)
29 {
30 }
31 
32 Node::Node(double x, double y, double z, std::size_t id)
33  : MathLib::Point3dWithID(std::array<double, 3>({{x, y, z}}), id)
34 {
35 }
36 
37 Node::Node(const Node& node) : MathLib::Point3dWithID(node, node.getID()) {}
38 
39 void Node::updateCoordinates(double x, double y, double z)
40 {
41  (*this)[0] = x;
42  (*this)[1] = y;
43  (*this)[2] = z;
44 }
45 } // namespace MeshLib
Definition of the Element class.
Definition of the Node class.
void updateCoordinates(double x, double y, double z)
Definition: Node.cpp:39
Node(const double coords[3], std::size_t id=std::numeric_limits< std::size_t >::max())
Constructor using a coordinate array.
Definition: Node.cpp:21