OGS
FileIO::GMSH::GMSHPoint Class Referencefinal

Detailed Description

Definition at line 20 of file GMSHPoint.h.

#include <GMSHPoint.h>

Inheritance diagram for FileIO::GMSH::GMSHPoint:
[legend]
Collaboration diagram for FileIO::GMSH::GMSHPoint:
[legend]

Public Member Functions

 GMSHPoint (GeoLib::Point const &pnt, std::size_t id, double mesh_density)
 
void write (std::ostream &os) const override
 
- Public Member Functions inherited from GeoLib::Point
 Point ()=default
 
 Point (double x1, double x2, double x3, std::size_t id=std::numeric_limits< std::size_t >::max())
 
 Point (MathLib::Point3d const &x, std::size_t id)
 
 Point (std::array< double, 3 > const &x, std::size_t id=std::numeric_limits< std::size_t >::max())
 
GEOTYPE getGeoType () const override
 return a geometry type 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 read (std::istream &is)
 
- Public Member Functions inherited from GeoLib::GeoObject
virtual ~GeoObject ()=default
 

Private Attributes

double _mesh_density
 

Additional Inherited Members

- Protected Member Functions inherited from MathLib::Point3dWithID
void setID (std::size_t id)
 Sets the ID of a node to the given value. More...
 
- Protected Attributes inherited from GeoLib::Point
friend PointVec
 

Constructor & Destructor Documentation

◆ GMSHPoint()

FileIO::GMSH::GMSHPoint::GMSHPoint ( GeoLib::Point const &  pnt,
std::size_t  id,
double  mesh_density 
)

Definition at line 20 of file GMSHPoint.cpp.

22  : GeoLib::Point(pnt, id), _mesh_density(mesh_density)
23 {
24 }
TemplateElement< PointRule1 > Point
Definition: Point.h:20

Member Function Documentation

◆ write()

void FileIO::GMSH::GMSHPoint::write ( std::ostream &  os) const
overridevirtual

write point coordinates into stream (used from operator<<)

Parameters
osa standard output stream

Reimplemented from MathLib::TemplatePoint< double, 3 >.

Definition at line 26 of file GMSHPoint.cpp.

27 {
28  os << "Point(" << getID() << ") = {" << (*this)[0] << ", " << (*this)[1]
29  << ", " << (*this)[2];
30  if (fabs(_mesh_density) > std::numeric_limits<double>::epsilon())
31  {
32  os << ", " << _mesh_density << "};";
33  }
34  else
35  {
36  os << "};";
37  }
38 }
std::size_t getID() const
Definition: Point3dWithID.h:62

References _mesh_density, and MathLib::Point3dWithID::getID().

Member Data Documentation

◆ _mesh_density

double FileIO::GMSH::GMSHPoint::_mesh_density
private

Definition at line 27 of file GMSHPoint.h.

Referenced by write().


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