Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Friends | List of all members
Nektar::NekMeshUtils::SurfaceMesh Class Reference

class containing all surface meshing routines methods and classes More...

#include <SurfaceMesh.h>

Collaboration diagram for Nektar::NekMeshUtils::SurfaceMesh:
Collaboration graph
[legend]

Public Member Functions

 SurfaceMesh (MeshSharedPtr m, CADSystemSharedPtr cad, OctreeSharedPtr octree, std::vector< unsigned int > sy, NekDouble b)
 Default constructor, requires the cad and octree objects to begin. More...
 
void Mesh ()
 Run all linear meshing routines. More...
 
void HOSurf ()
 run all high-order surface meshing routines More...
 
void Validate ()
 Validate the linear surface mesh. More...
 
void Report ()
 Print brief information to screen. More...
 

Private Attributes

MeshSharedPtr m_mesh
 mesh object More...
 
CADSystemSharedPtr m_cad
 CAD object. More...
 
OctreeSharedPtr m_octree
 Octree object. More...
 
std::map< int, FaceMeshSharedPtrm_facemeshes
 map of individual surface meshes from parametric surfaces More...
 
std::map< int, CurveMeshSharedPtrm_curvemeshes
 map of individual curve meshes of the curves in the domain More...
 
std::vector< unsigned int > m_symsurfs
 list of sysmetry plane surfaces to build quads onto More...
 
NekDouble m_bl
 thickness of the boundary layer if needed More...
 

Friends

class MemoryManager< SurfaceMesh >
 

Detailed Description

class containing all surface meshing routines methods and classes

Definition at line 53 of file SurfaceMesh.h.

Constructor & Destructor Documentation

Nektar::NekMeshUtils::SurfaceMesh::SurfaceMesh ( MeshSharedPtr  m,
CADSystemSharedPtr  cad,
OctreeSharedPtr  octree,
std::vector< unsigned int >  sy,
NekDouble  b 
)
inline

Default constructor, requires the cad and octree objects to begin.

Definition at line 62 of file SurfaceMesh.h.

67  : m_mesh(m), m_cad(cad), m_octree(octree), m_symsurfs(sy), m_bl(b){};
CADSystemSharedPtr m_cad
CAD object.
Definition: SurfaceMesh.h:93
OctreeSharedPtr m_octree
Octree object.
Definition: SurfaceMesh.h:95
std::vector< unsigned int > m_symsurfs
list of sysmetry plane surfaces to build quads onto
Definition: SurfaceMesh.h:101
NekDouble m_bl
thickness of the boundary layer if needed
Definition: SurfaceMesh.h:103
MeshSharedPtr m_mesh
mesh object
Definition: SurfaceMesh.h:91

Member Function Documentation

void Nektar::NekMeshUtils::SurfaceMesh::HOSurf ( )

run all high-order surface meshing routines

Definition at line 241 of file SurfaceMeshHOMesh.cpp.

References ASSERTL0, Nektar::NekMeshUtils::BGFSUpdate(), Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eNodalTriFekete, Nektar::LibUtilities::eQuadrilateral, Nektar::iterator, Nektar::NekMeshUtils::ListOfFaceSpings(), Nektar::LibUtilities::PointsManager(), Nektar::LibUtilities::PrintProgressbar(), Nektar::NekMeshUtils::surf, and Nektar::NekMeshUtils::weights().

242 {
243  if (m_mesh->m_verbose)
244  cout << endl << "\tHigh-Order Surface meshing" << endl;
245 
246  // this bit of code sets up information for the standard edge and face.
247  // and a mapping for node ordering for spring optimistaion
248 
249  LibUtilities::PointsKey ekey(m_mesh->m_nummode,
251  Array<OneD, NekDouble> gll;
252 
253  LibUtilities::PointsManager()[ekey]->GetPoints(gll);
254 
255  LibUtilities::PointsKey pkey(m_mesh->m_nummode,
257  Array<OneD, NekDouble> u, v;
258 
259  int nq = m_mesh->m_nummode;
260 
261  LibUtilities::PointsManager()[pkey]->GetPoints(u, v);
262 
263  set<pair<int, int> > springs = ListOfFaceSpings(nq);
264  map<pair<int, int>, NekDouble> z = weights(springs, u, v);
265 
266  // because edges are listed twice need a method to not repeat over them
267  EdgeSet completedEdges;
268 
269  // loop over all the faces in the surface mesh, check all three edges for
270  // high order info, if nothing high-order the edge.
271 
272  for (int i = 0; i < m_mesh->m_element[2].size(); i++)
273  {
274  if (m_mesh->m_verbose)
275  {
277  i, m_mesh->m_element[2].size(), "\t\tSurface elements");
278  }
279 
280  if (m_mesh->m_element[2][i]->GetConf().m_e ==
282  {
283  // not setup for high-order quads yet
284  continue;
285  }
286 
287  int surf = m_mesh->m_element[2][i]->CADSurfId;
288  CADSurfSharedPtr s = m_cad->GetSurf(surf);
289 
290  FaceSharedPtr f = m_mesh->m_element[2][i]->GetFaceLink();
291  vector<EdgeSharedPtr> surfedges =
292  m_mesh->m_element[2][i]->GetEdgeList();
293 
294  vector<EdgeSharedPtr> edges = f->m_edgeList;
295  for (int j = 0; j < edges.size(); j++)
296  {
297  // test insert the edge into completedEdges
298  // if the edge already exists move on
299  // if not figure out its high-order information
300 
301  EdgeSet::iterator test = completedEdges.find(edges[j]);
302 
303  if (test != completedEdges.end())
304  {
305  continue;
306  }
307 
308  EdgeSharedPtr e = edges[j];
309 
310  // the edges in the element are different to those in the face
311  // the cad information is stored in the element edges which are not
312  // in the m_mesh->m_edgeSet group.
313  // need to link them together and copy the cad information to be
314  // able to identify how to make it high-order
315  bool foundsurfaceedge = false;
316  for (int k = 0; k < surfedges.size(); k++)
317  {
318  if (surfedges[k] == e)
319  {
320  e->onCurve = surfedges[k]->onCurve;
321  e->CADCurveId = surfedges[k]->CADCurveId;
322  e->CADCurve = surfedges[k]->CADCurve;
323  foundsurfaceedge = true;
324  }
325  }
326  ASSERTL0(foundsurfaceedge,
327  "cannot find corresponding surface edge");
328 
329  if (e->onCurve)
330  {
331  int cid = e->CADCurveId;
332  CADCurveSharedPtr c = e->CADCurve;
333  NekDouble tb = e->m_n1->GetCADCurveInfo(cid);
334  NekDouble te = e->m_n2->GetCADCurveInfo(cid);
335 
336  // distrobute points along curve as inital guess
337  Array<OneD, NekDouble> ti(m_mesh->m_nummode);
338  for (int k = 0; k < m_mesh->m_nummode; k++)
339  {
340  ti[k] =
341  tb * (1.0 - gll[k]) / 2.0 + te * (1.0 + gll[k]) / 2.0;
342  }
343 
344  Array<OneD, NekDouble> xi(nq - 2);
345  for (int k = 1; k < nq - 1; k++)
346  {
347  xi[k - 1] = ti[k];
348  }
349 
350  OptiEdgeSharedPtr opti =
352 
353  DNekMat B(
354  nq - 2, nq - 2, 0.0); // approximate hessian (I to start)
355  for (int k = 0; k < nq - 2; k++)
356  {
357  B(k, k) = 1.0;
358  }
359  DNekMat H(nq - 2,
360  nq - 2,
361  0.0); // approximate inverse hessian (I to start)
362  for (int k = 0; k < nq - 2; k++)
363  {
364  H(k, k) = 1.0;
365  }
366 
367  DNekMat J = opti->dF(xi);
368 
369  Array<OneD, NekDouble> bnds = c->Bounds();
370 
371  bool repeat = true;
372  int itct = 0;
373  while (repeat)
374  {
375  NekDouble Norm = 0;
376  for (int k = 0; k < nq - 2; k++)
377  {
378  Norm += J(k, 0) * J(k, 0) / (bnds[1] - bnds[0]) /
379  (bnds[1] - bnds[0]);
380  }
381  Norm = sqrt(Norm);
382 
383  if (Norm < 1E-5)
384  {
385  repeat = false;
386  break;
387  }
388  if (itct > 100)
389  {
390  cout << "failed to optimise on curve" << endl;
391  for (int k = 0; k < nq; k++)
392  {
393  ti[k] = tb * (1.0 - gll[k]) / 2.0 +
394  te * (1.0 + gll[k]) / 2.0;
395  }
396  exit(-1);
397  break;
398  }
399  itct++;
400 
401  if (!BGFSUpdate(opti, J, B, H))
402  {
403  cout << "BFGS reported no update, curve on "
404  << c->GetId() << endl;
405  break;
406  }
407  }
408  // need to pull the solution out of opti
409  ti = opti->GetSolution();
410 
411  vector<CADSurfSharedPtr> s = c->GetAdjSurf();
412 
413  ASSERTL0(s.size() == 2, "Number of common surfs should be 2");
414 
415  vector<NodeSharedPtr> honodes(m_mesh->m_nummode - 2);
416  for (int k = 1; k < m_mesh->m_nummode - 1; k++)
417  {
418  Array<OneD, NekDouble> loc = c->P(ti[k]);
419  NodeSharedPtr nn = boost::shared_ptr<Node>(
420  new Node(0, loc[0], loc[1], loc[2]));
421 
422  nn->SetCADCurve(cid, c, ti[k]);
423  Array<OneD, NekDouble> uv = s[0]->locuv(loc);
424  nn->SetCADSurf(s[0]->GetId(), s[0], uv);
425  uv = s[1]->locuv(loc);
426  nn->SetCADSurf(s[1]->GetId(), s[1], uv);
427  honodes[k - 1] = nn;
428  }
429 
430  e->m_edgeNodes = honodes;
431  e->m_curveType = LibUtilities::eGaussLobattoLegendre;
432  completedEdges.insert(e);
433  }
434  else
435  {
436  // edge is on surface and needs 2d optimisation
437  CADSurfSharedPtr s = m_cad->GetSurf(surf);
438  Array<OneD, NekDouble> uvb, uve;
439  uvb = e->m_n1->GetCADSurfInfo(surf);
440  uve = e->m_n2->GetCADSurfInfo(surf);
441  Array<OneD, Array<OneD, NekDouble> > uvi(nq);
442  for (int k = 0; k < nq; k++)
443  {
444  Array<OneD, NekDouble> uv(2);
445  uv[0] = uvb[0] * (1.0 - gll[k]) / 2.0 +
446  uve[0] * (1.0 + gll[k]) / 2.0;
447  uv[1] = uvb[1] * (1.0 - gll[k]) / 2.0 +
448  uve[1] * (1.0 + gll[k]) / 2.0;
449  uvi[k] = uv;
450  }
451 
452  Array<OneD, NekDouble> bnds = s->GetBounds();
453  Array<OneD, NekDouble> all(2 * nq);
454  for (int k = 0; k < nq; k++)
455  {
456  all[k * 2 + 0] = uvi[k][0];
457  all[k * 2 + 1] = uvi[k][1];
458  }
459 
460  Array<OneD, NekDouble> xi(2 * (nq - 2));
461  for (int k = 1; k < nq - 1; k++)
462  {
463  xi[(k - 1) * 2 + 0] = all[k * 2 + 0];
464  xi[(k - 1) * 2 + 1] = all[k * 2 + 1];
465  }
466 
467  OptiEdgeSharedPtr opti =
469 
470  DNekMat B(2 * (nq - 2),
471  2 * (nq - 2),
472  0.0); // approximate hessian (I to start)
473  for (int k = 0; k < 2 * (nq - 2); k++)
474  {
475  B(k, k) = 1.0;
476  }
477  DNekMat H(2 * (nq - 2),
478  2 * (nq - 2),
479  0.0); // approximate inverse hessian (I to start)
480  for (int k = 0; k < 2 * (nq - 2); k++)
481  {
482  H(k, k) = 1.0;
483  }
484 
485  DNekMat J = opti->dF(xi);
486 
487  bool repeat = true;
488  int itct = 0;
489  while (repeat)
490  {
491  NekDouble Norm = 0;
492  for (int k = 0; k < 2 * (nq - 2); k++)
493  {
494  if (k % 2 == 0)
495  {
496  Norm += J(k, 0) * J(k, 0) / (bnds[1] - bnds[0]) /
497  (bnds[1] - bnds[0]);
498  }
499  else
500  {
501  Norm += J(k, 0) * J(k, 0) / (bnds[3] - bnds[2]) /
502  (bnds[3] - bnds[2]);
503  }
504  }
505  Norm = sqrt(Norm);
506 
507  if (Norm < 1E-5)
508  {
509  repeat = false;
510  break;
511  }
512 
513  if (itct > 100)
514  {
515  cout << "failed to optimise on edge" << endl;
516  for (int k = 0; k < nq; k++)
517  {
518  Array<OneD, NekDouble> uv(2);
519  uv[0] = uvb[0] * (1.0 - gll[k]) / 2.0 +
520  uve[0] * (1.0 + gll[k]) / 2.0;
521  uv[1] = uvb[1] * (1.0 - gll[k]) / 2.0 +
522  uve[1] * (1.0 + gll[k]) / 2.0;
523  uvi[k] = uv;
524  }
525  exit(-1);
526  break;
527  }
528  itct++;
529 
530  if (!BGFSUpdate(opti, J, B, H))
531  {
532  cout << "BFGS reported no update, edge on " << surf
533  << endl;
534  // exit(-1);
535  break;
536  }
537  }
538 
539  all = opti->GetSolution();
540 
541  // need to put all backinto uv
542  for (int k = 0; k < nq; k++)
543  {
544  uvi[k][0] = all[k * 2 + 0];
545  uvi[k][1] = all[k * 2 + 1];
546  }
547 
548  vector<NodeSharedPtr> honodes(nq - 2);
549  for (int k = 1; k < nq - 1; k++)
550  {
551  Array<OneD, NekDouble> loc;
552  loc = s->P(uvi[k]);
553  NodeSharedPtr nn = boost::shared_ptr<Node>(
554  new Node(0, loc[0], loc[1], loc[2]));
555  nn->SetCADSurf(s->GetId(), s, uvi[k]);
556  honodes[k - 1] = nn;
557  }
558 
559  e->m_edgeNodes = honodes;
560  e->m_curveType = LibUtilities::eGaussLobattoLegendre;
561  completedEdges.insert(e);
562  }
563  }
564 
565  ASSERTL0(nq <= 5, "not setup for high-orders yet");
566 
567  /*vector<NodeSharedPtr> vertices = f->m_vertexList;
568 
569  SpatialDomains::Geometry2DSharedPtr geom = f->GetGeom(3);
570  geom->FillGeom();
571  StdRegions::StdExpansionSharedPtr xmap = geom->GetXmap();
572  Array<OneD, NekDouble> coeffs0 = geom->GetCoeffs(0);
573  Array<OneD, NekDouble> coeffs1 = geom->GetCoeffs(1);
574  Array<OneD, NekDouble> coeffs2 = geom->GetCoeffs(2);
575 
576  Array<OneD, NekDouble> xc(nq*nq);
577  Array<OneD, NekDouble> yc(nq*nq);
578  Array<OneD, NekDouble> zc(nq*nq);
579 
580  xmap->BwdTrans(coeffs0,xc);
581  xmap->BwdTrans(coeffs1,yc);
582  xmap->BwdTrans(coeffs2,zc);
583 
584 
585  //build an array of all uvs
586  Array<OneD, Array<OneD, NekDouble> > uvi(np);
587  int ctr = 0;
588  for(int j = 0; j < vertices.size(); j++)
589  {
590  uvi[ctr++] = vertices[j]->GetCADSurfInfo(surf);
591  }
592  for(int j = 0; j < edges.size(); j++)
593  {
594  vector<NodeSharedPtr> ns = edges[j]->m_edgeNodes;
595  if(!(edges[j]->m_n1 == vertices[j]))
596  {
597  reverse(ns.begin(),ns.end());
598  }
599  for(int k = 0; k < ns.size(); k++)
600  {
601  uvi[ctr++] = ns[k]->GetCADSurfInfo(surf);
602  }
603  }
604  for(int j = np-ni; j < np; j++)
605  {
606  Array<OneD, NekDouble> xp(2);
607  xp[0] = u[j];
608  xp[1] = v[j];
609 
610  Array<OneD, NekDouble> xyz(3);
611  xyz[0] = xmap->PhysEvaluate(xp, xc);
612  xyz[1] = xmap->PhysEvaluate(xp, yc);
613  xyz[2] = xmap->PhysEvaluate(xp, zc);
614 
615  Array<OneD, NekDouble> uv(2);
616  s->ProjectTo(xyz,uv);
617  uvi[ctr++] = uv;
618  }
619 
620  OptiFaceSharedPtr opti = MemoryManager<OptiFace>::
621  AllocateSharedPtr(uvi, z, springs, s);
622 
623  DNekMat B(2*ni,2*ni,0.0); //approximate hessian (I to start)
624  for(int k = 0; k < 2*ni; k++)
625  {
626  B(k,k) = 1.0;
627  }
628  DNekMat H(2*ni,2*ni,0.0); //approximate inverse hessian (I to start)
629  for(int k = 0; k < 2*ni; k++)
630  {
631  H(k,k) = 1.0;
632  }
633 
634  Array<OneD,NekDouble> xi(ni*2);
635  for(int k = np - ni; k < np; k++)
636  {
637  xi[(k-np+ni)*2+0] = uvi[k][0];
638  xi[(k-np+ni)*2+1] = uvi[k][1];
639  }
640 
641  DNekMat J = opti->dF(xi);
642 
643  bool repeat = true;
644  int itct = 0;
645  while(repeat)
646  {
647  NekDouble Norm = 0;
648  for(int k = 0; k < nq - 2; k++)
649  {
650  Norm += J(k,0)*J(k,0);
651  }
652  Norm = sqrt(Norm);
653 
654  if(Norm < 1E-8)
655  {
656  repeat = false;
657  break;
658  }
659  if(itct > 100)
660  {
661  cout << "failed to optimise on face " << s->GetId() << endl;
662  exit(-1);
663  break;
664  }
665  itct++;
666  cout << "Norm " << Norm << endl;
667 
668  BGFSUpdate(opti, J, B, H); //all will be updated
669  }
670 
671  uvi = opti->GetSolution();
672 
673  vector<NodeSharedPtr> honodes;
674  for(int j = np - ni; j < np; j++)
675  {
676  Array<OneD, NekDouble> loc;
677  loc = s->P(uvi[j]);
678  NodeSharedPtr nn = boost::shared_ptr<Node>(new
679  Node(0,loc[0],loc[1],loc[2]));
680  nn->SetCADSurf(surf, s, uvi[j]);
681  honodes.push_back(nn);
682  }
683 
684  f->m_faceNodes = honodes;
685  f->m_curveType = LibUtilities::eNodalTriFekete;*/
686  }
687 
688  if (m_mesh->m_verbose)
689  cout << endl;
690 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
boost::shared_ptr< OptiEdge > OptiEdgeSharedPtr
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
CADSystemSharedPtr m_cad
CAD object.
Definition: SurfaceMesh.h:93
map< pair< int, int >, NekDouble > weights(set< pair< int, int > > springs, Array< OneD, NekDouble > u, Array< OneD, NekDouble > v)
set< pair< int, int > > ListOfFaceSpings(int nq)
boost::shared_ptr< Node > NodeSharedPtr
Definition: Node.h:50
PointsManagerT & PointsManager(void)
NekMatrix< NekDouble, StandardMatrixTag > DNekMat
Definition: NekTypeDefs.hpp:52
double NekDouble
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:69
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
Definition: Edge.h:196
boost::shared_ptr< CADSurf > CADSurfSharedPtr
Definition: CADSurf.h:217
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
bool BGFSUpdate(OptiObjSharedPtr opti, DNekMat &J, DNekMat &B, DNekMat &H)
Definition: BGFS-B.cpp:50
boost::unordered_set< EdgeSharedPtr, EdgeHash > EdgeSet
Definition: Edge.h:222
boost::shared_ptr< Face > FaceSharedPtr
Shared pointer to a face.
Definition: Face.h:378
MeshSharedPtr m_mesh
mesh object
Definition: SurfaceMesh.h:91
void PrintProgressbar(const int position, const int goal, const string message)
Prints a progressbar.
Definition: Progressbar.hpp:70
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:50
boost::shared_ptr< CADCurve > CADCurveSharedPtr
Definition: CADCurve.h:168
void Nektar::NekMeshUtils::SurfaceMesh::Mesh ( )

Run all linear meshing routines.

Definition at line 49 of file SurfaceMesh.cpp.

References Nektar::StdRegions::find(), Nektar::iterator, and Nektar::LibUtilities::PrintProgressbar().

50 {
51  if (m_mesh->m_verbose)
52  cout << endl << "Surface meshing" << endl;
53 
54  if (m_mesh->m_verbose)
55  cout << endl << "\tCurve meshing:" << endl << endl;
56 
57  m_mesh->m_numNodes = m_cad->GetNumVerts();
58 
59  // linear mesh all curves
60  for (int i = 1; i <= m_cad->GetNumCurve(); i++)
61  {
62  if (m_mesh->m_verbose)
63  {
65  i, m_cad->GetNumCurve(), "Curve progress");
66  }
67 
69  i, m_mesh, m_cad->GetCurve(i), m_octree);
70 
71  m_curvemeshes[i]->Mesh();
72  }
73 
74  if (m_mesh->m_verbose)
75  cout << endl << "\tFace meshing:" << endl << endl;
76 
77  // linear mesh all surfaces
78  for (int i = 1; i <= m_cad->GetNumSurf(); i++)
79  {
80  if (m_mesh->m_verbose)
81  {
83  i, m_cad->GetNumSurf(), "Face progress");
84  }
85 
87 
88  it = find(m_symsurfs.begin(), m_symsurfs.end(), i);
89  if (it == m_symsurfs.end())
90  {
92  i, m_mesh, m_cad->GetSurf(i), m_octree, m_curvemeshes);
93  }
94  else
95  {
97  i, m_mesh, m_cad->GetSurf(i), m_octree, m_curvemeshes, m_bl);
98  }
99 
100  m_facemeshes[i]->Mesh();
101  }
102 }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
CADSystemSharedPtr m_cad
CAD object.
Definition: SurfaceMesh.h:93
OctreeSharedPtr m_octree
Octree object.
Definition: SurfaceMesh.h:95
std::map< int, CurveMeshSharedPtr > m_curvemeshes
map of individual curve meshes of the curves in the domain
Definition: SurfaceMesh.h:99
std::vector< unsigned int > m_symsurfs
list of sysmetry plane surfaces to build quads onto
Definition: SurfaceMesh.h:101
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
NekDouble m_bl
thickness of the boundary layer if needed
Definition: SurfaceMesh.h:103
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
Definition: StdRegions.hpp:315
std::map< int, FaceMeshSharedPtr > m_facemeshes
map of individual surface meshes from parametric surfaces
Definition: SurfaceMesh.h:97
MeshSharedPtr m_mesh
mesh object
Definition: SurfaceMesh.h:91
void PrintProgressbar(const int position, const int goal, const string message)
Prints a progressbar.
Definition: Progressbar.hpp:70
void Nektar::NekMeshUtils::SurfaceMesh::Report ( )

Print brief information to screen.

Definition at line 126 of file SurfaceMesh.cpp.

127 {
128  if (m_mesh->m_verbose)
129  {
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;
139  }
140 }
MeshSharedPtr m_mesh
mesh object
Definition: SurfaceMesh.h:91
void Nektar::NekMeshUtils::SurfaceMesh::Validate ( )

Validate the linear surface mesh.

Definition at line 105 of file SurfaceMesh.cpp.

References ASSERTL0, and Nektar::iterator.

106 {
107  if (m_mesh->m_verbose)
108  cout << endl << "\tVerifying surface mesh" << endl;
109 
111 
112  for (it = m_mesh->m_edgeSet.begin(); it != m_mesh->m_edgeSet.end(); it++)
113  {
114  if ((*it)->m_elLink.size() != 2)
115  {
116  if (m_mesh->m_verbose)
117  cout << "\t\tFailed" << endl;
118  ASSERTL0(false, "edge not listed twice");
119  }
120  }
121 
122  if (m_mesh->m_verbose)
123  cout << "\t\tPassed" << endl;
124 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
MeshSharedPtr m_mesh
mesh object
Definition: SurfaceMesh.h:91

Friends And Related Function Documentation

friend class MemoryManager< SurfaceMesh >
friend

Definition at line 56 of file SurfaceMesh.h.

Member Data Documentation

NekDouble Nektar::NekMeshUtils::SurfaceMesh::m_bl
private

thickness of the boundary layer if needed

Definition at line 103 of file SurfaceMesh.h.

CADSystemSharedPtr Nektar::NekMeshUtils::SurfaceMesh::m_cad
private

CAD object.

Definition at line 93 of file SurfaceMesh.h.

std::map<int, CurveMeshSharedPtr> Nektar::NekMeshUtils::SurfaceMesh::m_curvemeshes
private

map of individual curve meshes of the curves in the domain

Definition at line 99 of file SurfaceMesh.h.

std::map<int, FaceMeshSharedPtr> Nektar::NekMeshUtils::SurfaceMesh::m_facemeshes
private

map of individual surface meshes from parametric surfaces

Definition at line 97 of file SurfaceMesh.h.

MeshSharedPtr Nektar::NekMeshUtils::SurfaceMesh::m_mesh
private

mesh object

Definition at line 91 of file SurfaceMesh.h.

OctreeSharedPtr Nektar::NekMeshUtils::SurfaceMesh::m_octree
private

Octree object.

Definition at line 95 of file SurfaceMesh.h.

std::vector<unsigned int> Nektar::NekMeshUtils::SurfaceMesh::m_symsurfs
private

list of sysmetry plane surfaces to build quads onto

Definition at line 101 of file SurfaceMesh.h.