OGS
GMSHPoint.cpp
Go to the documentation of this file.
1
12
#include "
GMSHPoint.h
"
13
14
#include <cmath>
15
#include <limits>
16
17
namespace
FileIO
18
{
19
namespace
GMSH
20
{
21
GMSHPoint::GMSHPoint
(
GeoLib::Point
const
& pnt, std::size_t
id
,
22
double
mesh_density)
23
:
GeoLib
::Point(pnt, id), _mesh_density(mesh_density)
24
{
25
}
26
27
void
GMSHPoint::write
(std::ostream& os)
const
28
{
29
os <<
"Point("
<<
getID
() <<
") = {"
<< (*this)[0] <<
", "
<< (*this)[1]
30
<<
", "
<< (*this)[2];
31
if
(fabs(
_mesh_density
) > std::numeric_limits<double>::epsilon())
32
{
33
os <<
", "
<<
_mesh_density
<<
"};"
;
34
}
35
else
36
{
37
os <<
"};"
;
38
}
39
}
40
41
std::ostream&
operator<<
(std::ostream& os,
GMSHPoint
const
& p)
42
{
43
p.write(os);
44
return
os;
45
}
46
47
}
// end namespace GMSH
48
}
// end namespace FileIO
GMSHPoint.h
FileIO::GMSH::GMSHPoint
Definition
GMSHPoint.h:22
FileIO::GMSH::GMSHPoint::GMSHPoint
GMSHPoint(GeoLib::Point const &pnt, std::size_t id, double mesh_density)
Definition
GMSHPoint.cpp:21
FileIO::GMSH::GMSHPoint::_mesh_density
double _mesh_density
Definition
GMSHPoint.h:28
FileIO::GMSH::GMSHPoint::write
void write(std::ostream &os) const
Definition
GMSHPoint.cpp:27
GeoLib::Point
Definition
Point.h:31
MathLib::Point3dWithID::getID
std::size_t getID() const
Definition
Point3dWithID.h:62
FileIO::GMSH::operator<<
static std::ostream & operator<<(std::ostream &os, std::vector< GMSHPoint * > const &points)
Definition
GMSHInterface.cpp:37
FileIO
Definition
SHPImportDialog.h:19
GeoLib
Definition
ProjectData.h:36
Applications
FileIO
Gmsh
GMSHPoint.cpp
Generated by
1.11.0