43 namespace NekMeshUtils
49 "Generates a surface mesh");
65 cout << endl <<
"Surface meshing" << endl;
68 cout << endl <<
"\tCurve meshing:" << endl << endl;
73 for (
int i = 1; i <=
m_mesh->m_cad->GetNumCurve(); i++)
78 i,
m_mesh->m_cad->GetNumCurve(),
"Curve progress");
83 m_curvemeshes[i]->Mesh();
87 cout << endl <<
"\tFace meshing:" << endl << endl;
89 bool validError =
false;
90 for (
int i = 1; i <=
m_mesh->m_cad->GetNumSurf(); i++)
95 i,
m_mesh->m_cad->GetNumSurf(),
"Validating curve meshes");
101 validError = validError ? true : face->ValidateCurves();
103 face->ValidateLoops();
106 ASSERTL0(!validError,
"valdity error in curve meshes");
109 for (
int i = 1; i <=
m_mesh->m_cad->GetNumSurf(); i++)
114 i,
m_mesh->m_cad->GetNumSurf(),
"Face progress");
120 m_facemeshes[i]->Mesh();
131 EdgeSet::iterator it;
132 for(it =
m_mesh->m_edgeSet.begin(); it !=
m_mesh->m_edgeSet.end(); it++)
134 if((*it)->m_elLink.size() != 2)
136 ASSERTL0(
false,
"surface mesh connectivity error");
146 int ns =
m_mesh->m_vertexSet.size();
147 int es =
m_mesh->m_edgeSet.size();
148 int ts =
m_mesh->m_element[2].size();
149 int ep = ns - es + ts;
150 cout << endl <<
"\tSurface mesh statistics" << endl;
151 cout <<
"\t\tNodes: " << ns << endl;
152 cout <<
"\t\tEdges: " << es << endl;
153 cout <<
"\t\tTriangles " << ts << endl;
154 cout <<
"\t\tEuler-Poincaré characteristic: " << ep << endl;
#define ASSERTL0(condition, msg)
int PrintProgressbar(const int position, const int goal, const std::string message, int lastprogress=-1)
Prints a progressbar.
MeshSharedPtr m_mesh
Mesh object.
std::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
std::pair< ModuleType, std::string > ModuleKey
virtual NEKMESHUTILS_EXPORT void ProcessFaces(bool ReprocessFaces=true)
Extract element faces.
std::map< int, CurveMeshSharedPtr > m_curvemeshes
map of individual curve meshes of the curves in the domain
virtual NEKMESHUTILS_EXPORT void ProcessElements()
Generate element IDs.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Abstract base class for processing modules.
virtual NEKMESHUTILS_EXPORT void ProcessVertices()
Extract element vertices.
std::shared_ptr< FaceMesh > FaceMeshSharedPtr
virtual NEKMESHUTILS_EXPORT void ProcessEdges(bool ReprocessEdges=true)
Extract element edges.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::map< int, FaceMeshSharedPtr > m_facemeshes
map of individual surface meshes from parametric surfaces
virtual NEKMESHUTILS_EXPORT void ProcessComposites()
Generate composites.
ModuleFactory & GetModuleFactory()