OGS
Node.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
MeshLib/Node.h
"
5
6
#include "
Elements/Element.h
"
7
8
namespace
MeshLib
9
{
10
Node::Node
(
const
double
coords[3], std::size_t
id
)
11
:
MathLib
::
Point3dWithID
(
12
std::array<double, 3>{{coords[0], coords[1], coords[2]}}, id)
13
{
14
}
15
16
Node::Node
(std::array<double, 3>
const
& coords, std::size_t
id
)
17
:
MathLib
::
Point3dWithID
(coords, id)
18
{
19
}
20
21
Node::Node
(
double
x,
double
y,
double
z, std::size_t
id
)
22
:
MathLib
::
Point3dWithID
(std::array<double, 3>({{x, y, z}}),
id
)
23
{
24
}
25
26
std::ostream&
operator<<
(std::ostream& os,
MeshLib::Node
const
& n)
27
{
28
return
os <<
"node #"
<< n.
getID
() <<
" { "
29
<<
static_cast<
MathLib::Point3d
const&
>
(n) <<
"}"
;
30
}
31
}
// namespace MeshLib
Element.h
Node.h
MathLib::Point3dWithID::getID
std::size_t getID() const
Definition
Point3dWithID.h:53
MathLib::Point3dWithID::Point3dWithID
Point3dWithID(double x0, double x1, double x2, std::size_t id=std::numeric_limits< std::size_t >::max())
Definition
Point3dWithID.h:24
MathLib::Point3d
Definition
Point3d.h:15
MeshLib::Node
Definition
Node.h:21
MeshLib::Node::Node
Node(const double coords[3], std::size_t id=std::numeric_limits< std::size_t >::max())
Constructor using a coordinate array.
Definition
Node.cpp:10
MathLib
Definition
CreateComponent.h:23
MeshLib
Definition
ProjectData.h:30
MeshLib::operator<<
std::ostream & operator<<(std::ostream &os, Element const &e)
Definition
Element.cpp:97
MeshLib
Node.cpp
Generated by
1.14.0