46 namespace NekMeshUtils
49 void SurfaceMesh::Mesh()
51 if (m_mesh->m_verbose)
52 cout << endl <<
"Surface meshing" << endl;
54 if (m_mesh->m_verbose)
55 cout << endl <<
"\tCurve meshing:" << endl << endl;
57 m_mesh->m_numNodes = m_cad->GetNumVerts();
60 for (
int i = 1; i <= m_cad->GetNumCurve(); i++)
62 if (m_mesh->m_verbose)
65 i, m_cad->GetNumCurve(),
"Curve progress");
69 i, m_mesh, m_cad->GetCurve(i), m_octree);
71 m_curvemeshes[i]->Mesh();
74 if (m_mesh->m_verbose)
75 cout << endl <<
"\tFace meshing:" << endl << endl;
78 for (
int i = 1; i <= m_cad->GetNumSurf(); i++)
80 if (m_mesh->m_verbose)
83 i, m_cad->GetNumSurf(),
"Face progress");
88 it =
find(m_symsurfs.begin(), m_symsurfs.end(), i);
89 if (it == m_symsurfs.end())
92 i, m_mesh, m_cad->GetSurf(i), m_octree, m_curvemeshes);
97 i, m_mesh, m_cad->GetSurf(i), m_octree, m_curvemeshes, m_bl);
100 m_facemeshes[i]->Mesh();
105 void SurfaceMesh::Validate()
107 if (m_mesh->m_verbose)
108 cout << endl <<
"\tVerifying surface mesh" << endl;
112 for (it = m_mesh->m_edgeSet.begin(); it != m_mesh->m_edgeSet.end(); it++)
114 if ((*it)->m_elLink.size() != 2)
116 if (m_mesh->m_verbose)
117 cout <<
"\t\tFailed" << endl;
118 ASSERTL0(
false,
"edge not listed twice");
122 if (m_mesh->m_verbose)
123 cout <<
"\t\tPassed" << endl;
126 void SurfaceMesh::Report()
128 if (m_mesh->m_verbose)
130 int ns = m_mesh->m_vertexSet.size();
131 int es = m_mesh->m_edgeSet.size();
132 int ts = m_mesh->m_element[2].size();
133 int ep = ns - es + ts;
134 cout << endl <<
"\tSurface mesh statistics" << endl;
135 cout <<
"\t\tNodes: " << ns << endl;
136 cout <<
"\t\tEdges: " << es << endl;
137 cout <<
"\t\tTriangles " << ts << endl;
138 cout <<
"\t\tEuler-Poincaré characteristic: " << ep << endl;
#define ASSERTL0(condition, msg)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
void PrintProgressbar(const int position, const int goal, const string message)
Prints a progressbar.