diff --git a/morphMesh/inc/gmds/morphMesh/EllipticMorph.h b/morphMesh/inc/gmds/morphMesh/EllipticMorph.h index 5b294295..66bea210 100644 --- a/morphMesh/inc/gmds/morphMesh/EllipticMorph.h +++ b/morphMesh/inc/gmds/morphMesh/EllipticMorph.h @@ -75,6 +75,8 @@ class LIB_GMDS_MORPHMESH_API EllipticMorph */ void finalize(); + void writeMesh(std::string AFilename) const; + private: /* Mesh mark for locked nodes */ diff --git a/morphMesh/src/EllipticMorph.cpp b/morphMesh/src/EllipticMorph.cpp index e5fc1cc9..cb81baa0 100644 --- a/morphMesh/src/EllipticMorph.cpp +++ b/morphMesh/src/EllipticMorph.cpp @@ -10,7 +10,7 @@ #include "gmds/morphMesh/FastLocalize.h" #include #include - +#include #ifdef WITH_LIMA #include "gmds/io/LimaReader.h" @@ -22,7 +22,7 @@ /*----------------------------------------------------------------------------*/ using namespace gmds; -using namespace morphmesh; +using namespace morphmesh; /*----------------------------------------------------------------------------*/ EllipticMorph::EllipticMorph(const std::string& AFilename, Mesh* AMesh): @@ -130,7 +130,7 @@ EllipticMorph::EllipticMorph(const std::string& AFilename, Mesh* AMesh): m_morphRegions = m_mesh->newMark(); m_lockRegions = m_mesh->newMark(); - m_minEdgeLength = MAXFLOAT; + m_minEdgeLength = std::numeric_limits::max(); for(const auto& e : m_mesh->edges()){ Edge edge = m_mesh->get(e); if(edge.length() < m_minEdgeLength){ @@ -738,7 +738,7 @@ std::vector EllipticMorph::noExteriorLock(){ } if (!intersectedFaces.empty()) { - double distance = MAXFLOAT; + double distance = std::numeric_limits::max(); for (int i_f = 0; i_f < intersectedFaces.size(); i_f++) { if (points[i_f].distance(p) < distance) { distance = points[i_f].distance(p); @@ -1012,3 +1012,15 @@ void EllipticMorph::finalize(){ throw GMDSException("File format not supported, only .vtk or .mli2 supported"); } } +/*----------------------------------------------------------------------------*/ +void EllipticMorph::writeMesh(std::string AFilename) const +{ + std::cout<<"------------- PRINT ------------- "<