MathLib::Point3dWithID Class Reference

Detailed Description

Class Point3dWithID is derived from class Point3d in order to extend the class Point3d with an id.

Definition at line 25 of file Point3dWithID.h.

#include <Point3dWithID.h>

Inheritance diagram for MathLib::Point3dWithID:
Collaboration diagram for MathLib::Point3dWithID:

Public Member Functions

 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::Point3d
 Point3d ()
 Point3d (std::array< double, 3 > x)
virtual ~Point3d ()=default
 Point3d (Point3d const &)=default
Point3doperator= (Point3d 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:
double & operator[] (std::size_t idx)
 access operator (see book Effektiv C++ programmieren - subsection 1.3.2 ).
const double * data () const
double * data ()
Eigen::Vector3d const & asEigenVector3d () const
Eigen::Vector3d & asEigenVector3d ()

Protected Member Functions

void setID (std::size_t id)
 Sets the ID of a node to the given value.

Private Attributes

std::size_t id_

Constructor & Destructor Documentation

◆ Point3dWithID() [1/4]

MathLib::Point3dWithID::Point3dWithID ( double x0,
double x1,
double x2,
std::size_t id = std::numeric_limits<std::size_t>::max() )

Constructs a point with the coordinates x0, x1 and x2 and the provided id.

x0x coordinate of point
x1y coordinate of point
x2z coordinate of point
idthe id of the object [default: max of std::size_t]

Definition at line 33 of file Point3dWithID.h.

35 : Point3d(std::array<double, 3>({{x0, x1, x2}})), id_(id)
36 {}

◆ Point3dWithID() [2/4]

MathLib::Point3dWithID::Point3dWithID ( std::array< double, 3 > const & coords,
std::size_t id = std::numeric_limits<std::size_t>::max() )

Constructs a point using std::array<double,3> as coordinates and the provided id.

coordscoordinates of the point
idthe id of the object [default: max of std::size_t]

Definition at line 42 of file Point3dWithID.h.

45 : Point3d(coords), id_(id)
46 {}

◆ Point3dWithID() [3/4]

MathLib::Point3dWithID::Point3dWithID ( MathLib::Point3d const & pnt,
std::size_t id = std::numeric_limits<std::size_t>::max() )

Constructs a point with the same coordinates as the given Point3d pnt and the provided id.

pnta MathLib::Point3d object containing the coordinates
idthe id of the object [default: max of std::size_t]

Definition at line 52 of file Point3dWithID.h.

55 : MathLib::Point3d(pnt), id_(id)
56 {}

◆ Point3dWithID() [4/4]

MathLib::Point3dWithID::Point3dWithID ( )

Default constructor that initializes the id with max of std::size_t the default constructor of class Point3d.

Definition at line 60 of file Point3dWithID.h.

60: id_(std::numeric_limits<std::size_t>::max()) {}

Member Function Documentation

◆ getID()

std::size_t MathLib::Point3dWithID::getID ( ) const

Definition at line 62 of file Point3dWithID.h.

62{ return id_; }

References id_.

Referenced by MeshGeoToolsLib::BoundaryElementsAtPoint::BoundaryElementsAtPoint(), GeoLib::PointVec::PointVec(), FileIO::Gocad::GocadSGridReader::addFaceSetQuad(), MeshToolsLib::MeshRevision::collapseNodeIndices(), anonymous_namespace{CollectAndInterpolateNodalDof.cpp}::collectDofsToMatrixSingleComponentForSomeNodes(), ProcessLib::PythonBoundaryCondition::collectPrimaryVariables(), anonymous_namespace{MeshRevision.cpp}::constructFourNodeElement(), anonymous_namespace{MeshRevision.cpp}::constructLine(), anonymous_namespace{MeshRevision.cpp}::constructTri(), MeshLib::copyElement(), MeshLib::copyNodesAndElements(), GeoLib::DuplicateGeometry::copySurfacesVector(), MeshToolsLib::createFlippedElement(), MeshLib::createMeshFromElementSelection(), MeshToolsLib::createNodesAndIDMapFromElements(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), MeshToolsLib::extrudeElement(), anonymous_namespace{MeshRevision.cpp}::findPyramidTopNode(), MeshLib::Mesh::getElementsConnectedToNode(), getExistingNodeFromOctTree(), FileIO::Gocad::GocadNode::getFaceDirection(), MeshGeoToolsLib::GeoMapper::getMeshElevation(), MeshLib::getNodeIndex(), getNodes(), anonymous_namespace{MeshRevision.cpp}::getNumberOfUniqueNodes(), ProcessLib::PythonBoundaryCondition::interpolateToHigherOrderNode(), MeshLib::ElementStatus::isActiveNode(), main(), ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::operator()(), anonymous_namespace{MeshRevision.cpp}::reduceHex(), anonymous_namespace{MeshRevision.cpp}::reducePrism(), ElementTreeModel::setElement(), MeshLib::ElementStatus::setElementStatus(), MeshLib::IO::transformToXDMFTopology(), GeoLib::PointVec::uniqueInsert(), and FileIO::GMSH::GMSHPoint::write().

◆ setID()

void MathLib::Point3dWithID::setID ( std::size_t id)

Sets the ID of a node to the given value.

Definition at line 66 of file Point3dWithID.h.

66{ id_ = id; }

References id_.

Referenced by FileIO::Gocad::GocadNode::resetID(), and GeoLib::PointVec::uniqueInsert().

Member Data Documentation

◆ id_

std::size_t MathLib::Point3dWithID::id_

Definition at line 69 of file Point3dWithID.h.

Referenced by getID(), and setID().

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