Nektar++
OutputNekpp.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: OutputNekpp.cpp
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Nektar++ file format output.
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #include <set>
36 #include <string>
37 using namespace std;
38 
39 #include <boost/core/ignore_unused.hpp>
40 #include <boost/algorithm/string/classification.hpp>
41 #include <boost/algorithm/string/split.hpp>
42 #include <boost/algorithm/string/predicate.hpp>
43 #include <boost/iostreams/filtering_streambuf.hpp>
44 #include <boost/iostreams/copy.hpp>
45 #include <boost/iostreams/filter/gzip.hpp>
46 #include <boost/filesystem.hpp>
47 namespace io = boost::iostreams;
48 
49 #include <tinyxml.h>
53 
54 #include "OutputNekpp.h"
55 
56 using namespace Nektar::NekMeshUtils;
57 using namespace Nektar::SpatialDomains;
58 
59 namespace Nektar
60 {
61 namespace Utilities
62 {
63 ModuleKey OutputNekpp::className1 =
65  OutputNekpp::create,
66  "Writes a Nektar++ xml file.");
67 
68 ModuleKey OutputNekpp::className2 =
70  OutputNekpp::create,
71  "Writes a Nektar++ file with hdf5.");
72 
73 OutputNekpp::OutputNekpp(MeshSharedPtr m) : OutputModule(m)
74 {
75  m_config["test"] = ConfigOption(
76  true, "0", "Attempt to load resulting mesh and create meshgraph.");
77  m_config["stats"] = ConfigOption(
78  true, "0", "Print out basic mesh statistics.");
79  m_config["uncompress"] = ConfigOption(true, "0", "Uncompress xml sections");
80  m_config["order"] = ConfigOption(false, "-1", "Enforce a polynomial order");
81  m_config["testcond"] = ConfigOption(
82  false, "", "Test a condition.");
83 }
84 
86 {
87 }
88 
89 template <typename T> void TestElmts(
90  const std::map<int, std::shared_ptr<T> > &geomMap,
93  int exprId)
94 {
95  boost::ignore_unused(graph);
96 
97  for (auto &geomIt : geomMap)
98  {
99  SpatialDomains::GeometrySharedPtr geom = geomIt.second;
100  geom->Setup();
101  geom->FillGeom();
102 
103  if (exprId != -1)
104  {
105  int nq = geom->GetXmap()->GetTotPoints();
106  int dim = geom->GetCoordim();
107 
109 
110  for (int i = 0; i < 3; ++i)
111  {
112  coords[i] = Array<OneD, NekDouble>(nq, 0.0);
113  }
114 
115  for (int i = 0; i < dim; ++i)
116  {
117  geom->GetXmap()->BwdTrans(geom->GetCoeffs(i), coords[i]);
118  }
119 
120  for (int i = 0; i < nq; ++i)
121  {
122  NekDouble output = strEval.Evaluate(
123  exprId, coords[0][i], coords[1][i], coords[2][i], 0.0);
124  ASSERTL0(output == 1.0, "Output mesh failed coordinate test");
125  }
126 
127  // Also evaluate at mid-point to test for deformed vs. regular
128  // elements.
129  Array<OneD, NekDouble> eta(dim, 0.0), evalPt(3, 0.0);
130  for (int i = 0; i < dim; ++i)
131  {
132  evalPt[i] = geom->GetXmap()->PhysEvaluate(eta, coords[i]);
133  }
134 
135  NekDouble output = strEval.Evaluate(
136  exprId, evalPt[0], evalPt[1], evalPt[2], 0.0);
137  ASSERTL0(output == 1.0,
138  "Output mesh failed coordinate midpoint test");
139  }
140  }
141 }
142 
144 {
145  if (m_mesh->m_verbose)
146  {
147  cout << "OutputNekpp: Writing file..." << endl;
148  }
149 
150  int order = m_config["order"].as<int>();
151 
152  if (order != -1)
153  {
154  m_mesh->MakeOrder(order, LibUtilities::ePolyEvenlySpaced);
155  }
156 
157  string file = m_config["outfile"].as<string>();
158  string ext = boost::filesystem::extension(file);
159 
160  if (m_config["stats"].beenSet)
161  {
162  m_mesh->PrintStats(std::cout);
163  }
164 
165  // Default to compressed XML output.
166  std::string type = "XmlCompressed";
167 
168  // Extract the output filename and extension
169  string filename = m_config["outfile"].as<string>();
170 
171  // Compress output and append .gz extension
172  if(boost::iequals(ext, ".xml") && m_config["uncompress"].beenSet)
173  {
174  type = "Xml";
175  }
176  else if(boost::iequals(ext, ".nekg"))
177  {
178  type = "HDF5";
179  }
180 
183  graph->Empty(m_mesh->m_expDim, m_mesh->m_spaceDim);
184 
185  TransferVertices(graph);
186 
187  std::unordered_map<int, SegGeomSharedPtr> segMap;
188  TransferEdges(graph, segMap);
189  TransferFaces(graph, segMap);
190  TransferElements(graph);
191  TransferCurves(graph);
192  TransferComposites(graph);
193  TransferDomain(graph);
194 
195  string out = m_config["outfile"].as<string>();
196  graph->WriteGeometry(out, true, m_mesh->m_metadata);
197 
198  // Test the resulting XML file (with a basic test) by loading it
199  // with the session reader, generating the MeshGraph and testing if
200  // each element is valid.
201  if (m_config["test"].beenSet)
202  {
203  // Create an equation based on the test condition. Should evaluate to 1
204  // or 0 using boolean logic.
205  string testcond = m_config["testcond"].as<string>();
206  int exprId = -1;
207 
208  if (testcond.length() > 0)
209  {
210  exprId = m_strEval.DefineFunction("x y z", testcond);
211  }
212 
213  vector<string> filenames(1);
214 
215  if (type == "HDF5")
216  {
217  vector<string> tmp;
218  boost::split(tmp, filename, boost::is_any_of("."));
219  filenames[0] = tmp[0] + ".xml";
220  }
221  else
222  {
223  filenames[0] = filename;
224  }
225 
226  char *prgname = const_cast<char *>("NekMesh");
228  LibUtilities::SessionReader::CreateInstance(1, &prgname, filenames,
229  m_mesh->m_comm);
232 
233  TestElmts(graph->GetAllSegGeoms(), graph, m_strEval, exprId);
234  TestElmts(graph->GetAllTriGeoms(), graph, m_strEval, exprId);
235  TestElmts(graph->GetAllQuadGeoms(), graph, m_strEval, exprId);
236  TestElmts(graph->GetAllTetGeoms(), graph, m_strEval, exprId);
237  TestElmts(graph->GetAllPrismGeoms(), graph, m_strEval, exprId);
238  TestElmts(graph->GetAllPyrGeoms(), graph, m_strEval, exprId);
239  TestElmts(graph->GetAllHexGeoms(), graph, m_strEval, exprId);
240  }
241 }
242 
244 {
245  PointGeomMap &pointMap = graph->GetAllPointGeoms();
246  for(auto &it : m_mesh->m_vertexSet)
247  {
249  m_mesh->m_spaceDim, it->m_id, it->m_x, it->m_y, it->m_z);
250  vert->SetGlobalID(it->m_id);
251  pointMap[it->m_id] = vert;
252  }
253 }
254 
256  MeshGraphSharedPtr graph,
257  std::unordered_map<int, SegGeomSharedPtr> &edgeMap)
258 {
259  if (m_mesh->m_expDim >= 2)
260  {
261  SegGeomMap &segMap = graph->GetAllSegGeoms();
262  for(auto &it : m_mesh->m_edgeSet)
263  {
264  PointGeomSharedPtr verts[2] = {graph->GetVertex(it->m_n1->m_id),
265  graph->GetVertex(it->m_n2->m_id)};
267  it->m_id, m_mesh->m_spaceDim, verts);
268  segMap [it->m_id] = edge;
269  edgeMap[it->m_id] = edge;
270  }
271  }
272 }
273 
275  MeshGraphSharedPtr graph,
276  std::unordered_map<int, SegGeomSharedPtr> &edgeMap)
277 {
278  if(m_mesh->m_expDim == 3)
279  {
280  TriGeomMap &triMap = graph->GetAllTriGeoms();
281  QuadGeomMap &quadMap = graph->GetAllQuadGeoms();
282  for(auto &it : m_mesh->m_faceSet)
283  {
284  if(it->m_edgeList.size() == 3)
285  {
286  SegGeomSharedPtr edges[TriGeom::kNedges] =
287  {
288  edgeMap[it->m_edgeList[0]->m_id],
289  edgeMap[it->m_edgeList[1]->m_id],
290  edgeMap[it->m_edgeList[2]->m_id]
291  };
292 
294  triMap[it->m_id] = tri;
295  }
296  else
297  {
298  SegGeomSharedPtr edges[QuadGeom::kNedges] =
299  {
300  edgeMap[it->m_edgeList[0]->m_id],
301  edgeMap[it->m_edgeList[1]->m_id],
302  edgeMap[it->m_edgeList[2]->m_id],
303  edgeMap[it->m_edgeList[3]->m_id]
304  };
305 
307  quadMap[it->m_id] = quad;
308  }
309  }
310  }
311 }
312 
314 {
315  vector<ElementSharedPtr> &elmt = m_mesh->m_element[m_mesh->m_expDim];
316 
317  SegGeomMap &segMap = graph->GetAllSegGeoms();
318  TriGeomMap &triMap = graph->GetAllTriGeoms();
319  QuadGeomMap &quadMap = graph->GetAllQuadGeoms();
320  TetGeomMap &tetMap = graph->GetAllTetGeoms();
321  PyrGeomMap &pyrMap = graph->GetAllPyrGeoms();
322  PrismGeomMap &prismMap = graph->GetAllPrismGeoms();
323  HexGeomMap &hexMap = graph->GetAllHexGeoms();
324 
325  for (int i = 0; i < elmt.size(); ++i)
326  {
327  switch (elmt[i]->GetTag()[0])
328  {
329  case 'S':
330  {
331  int id = elmt[i]->GetId();
332  PointGeomSharedPtr vertices[2] = {
333  graph->GetVertex(elmt[i]->GetVertex(0)->m_id),
334  graph->GetVertex(elmt[i]->GetVertex(1)->m_id)};
335  segMap[id] = MemoryManager<SegGeom>::AllocateSharedPtr(id, m_mesh->m_spaceDim, vertices);
336  }
337  break;
338  case 'T':
339  {
340  int id = elmt[i]->GetId();
341  SegGeomSharedPtr edges[TriGeom::kNedges] = {
342  graph->GetSegGeom(elmt[i]->GetEdge(0)->m_id),
343  graph->GetSegGeom(elmt[i]->GetEdge(1)->m_id),
344  graph->GetSegGeom(elmt[i]->GetEdge(2)->m_id)};
345 
346  triMap[id] = MemoryManager<TriGeom>::AllocateSharedPtr(id, edges);
347  }
348  break;
349  case 'Q':
350  {
351  int id = elmt[i]->GetId();
352  SegGeomSharedPtr edges[QuadGeom::kNedges] = {
353  graph->GetSegGeom(elmt[i]->GetEdge(0)->m_id),
354  graph->GetSegGeom(elmt[i]->GetEdge(1)->m_id),
355  graph->GetSegGeom(elmt[i]->GetEdge(2)->m_id),
356  graph->GetSegGeom(elmt[i]->GetEdge(3)->m_id)};
357 
358  quadMap[id] = MemoryManager<QuadGeom>::AllocateSharedPtr(id, edges);
359  }
360  break;
361  case 'A':
362  {
363  int id = elmt[i]->GetId();
364  TriGeomSharedPtr tfaces[4];
365  for(int j = 0; j < 4; ++j)
366  {
367  Geometry2DSharedPtr face =
368  graph->GetGeometry2D(elmt[i]->GetFace(j)->m_id);
369  tfaces[j] = static_pointer_cast<TriGeom>(face);
370  }
371 
372  tetMap[id] = MemoryManager<TetGeom>::AllocateSharedPtr(id, tfaces);
373  }
374  break;
375  case 'P':
376  {
377  Geometry2DSharedPtr faces[5];
378 
379  int id = elmt[i]->GetId();
380  for(int j = 0; j < 5; ++j)
381  {
382  Geometry2DSharedPtr face =
383  graph->GetGeometry2D(elmt[i]->GetFace(j)->m_id);
384 
385  if (face->GetShapeType() ==
387  {
388  faces[j] = static_pointer_cast<TriGeom>(face);
389  }
390  else if (face->GetShapeType() ==
392  {
393  faces[j] = static_pointer_cast<QuadGeom>(face);
394  }
395  }
396  pyrMap[id] = MemoryManager<PyrGeom>::AllocateSharedPtr(id, faces);
397  }
398  break;
399  case 'R':
400  {
401  Geometry2DSharedPtr faces[5];
402 
403  int id = elmt[i]->GetId();
404  for(int j = 0; j < 5; ++j)
405  {
406  Geometry2DSharedPtr face =
407  graph->GetGeometry2D(elmt[i]->GetFace(j)->m_id);
408 
409  if (face->GetShapeType() ==
411  {
412  faces[j] = static_pointer_cast<TriGeom>(face);
413  }
414  else if (face->GetShapeType() ==
416  {
417  faces[j] = static_pointer_cast<QuadGeom>(face);
418  }
419  }
420  prismMap[id] = MemoryManager<PrismGeom>::AllocateSharedPtr(id, faces);
421  }
422  break;
423  case 'H':
424  {
425  QuadGeomSharedPtr faces[6];
426 
427  int id = elmt[i]->GetId();
428  for(int j = 0; j < 6; ++j)
429  {
430  Geometry2DSharedPtr face =
431  graph->GetGeometry2D(elmt[i]->GetFace(j)->m_id);
432  faces[j] = static_pointer_cast<QuadGeom>(face);
433  }
434 
435  hexMap[id] = MemoryManager<HexGeom>::AllocateSharedPtr(id, faces);
436  }
437  break;
438  default:
439  ASSERTL0(false, "Unknown element type");
440  }
441  }
442 }
443 
445 {
446  CurveMap &edges = graph->GetCurvedEdges();
447 
448  int edgecnt = 0;
449 
450  for(auto &it : m_mesh->m_edgeSet)
451  {
452  if(it->m_edgeNodes.size() > 0)
453  {
455  it->m_curveType);
456  vector<NodeSharedPtr> ns;
457  it->GetCurvedNodes(ns);
458  for(int i = 0; i < ns.size(); i++)
459  {
461  m_mesh->m_spaceDim, edgecnt, ns[i]->m_x, ns[i]->m_y, ns[i]->m_z);
462  curve->m_points.push_back(vert);
463  }
464 
465  edges[it->m_id] = curve;
466  edgecnt++;
467  }
468  }
469 
470  if(m_mesh->m_expDim == 1 && m_mesh->m_spaceDim > 1)
471  {
472  for(int e = 0; e < m_mesh->m_element[1].size(); e++)
473  {
474  ElementSharedPtr el = m_mesh->m_element[1][e];
475  vector<NodeSharedPtr> ns;
476  el->GetCurvedNodes(ns);
477  if(ns.size() > 2)
478  {
480  el->GetId(), el->GetCurveType());
481 
482  for(int i = 0; i < ns.size(); i++)
483  {
485  m_mesh->m_spaceDim, edgecnt, ns[i]->m_x, ns[i]->m_y, ns[i]->m_z);
486  curve->m_points.push_back(vert);
487  }
488 
489  edges[el->GetId()] = curve;
490  edgecnt++;
491  }
492  }
493  }
494 
495  CurveMap &faces = graph->GetCurvedFaces();
496 
497  int facecnt = 0;
498 
499  for(auto &it : m_mesh->m_faceSet)
500  {
501  if(it->m_faceNodes.size() > 0)
502  {
503  CurveSharedPtr curve =
505  it->m_curveType);
506  vector<NodeSharedPtr> ns;
507  it->GetCurvedNodes(ns);
508  for(int i = 0; i < ns.size(); i++)
509  {
510  PointGeomSharedPtr vert =
512  (m_mesh->m_spaceDim, facecnt, ns[i]->m_x, ns[i]->m_y,
513  ns[i]->m_z);
514  curve->m_points.push_back(vert);
515  }
516 
517  faces[it->m_id] = curve;
518  facecnt++;
519  }
520  }
521 
522  /*
523  if(m_mesh->m_expDim == 2 && m_mesh->m_spaceDim == 3)
524  {
525  //manifold case
526  for(int e = 0; e < m_mesh->m_element[2].size(); e++)
527  {
528  ElementSharedPtr el = m_mesh->m_element[2][e];
529 
530  if(el->GetVolumeNodes().size() > 0) // needed for extract surf case
531  {
532  vector<NodeSharedPtr> ns;
533  el->GetCurvedNodes(ns);
534  if(ns.size() > 4)
535  {
536  CurveSharedPtr curve =
537  MemoryManager<Curve>::AllocateSharedPtr
538  (el->GetId(), el->GetCurveType());
539 
540  for(int i = 0; i < ns.size(); i++)
541  {
542  PointGeomSharedPtr vert =
543  MemoryManager<PointGeom>::AllocateSharedPtr
544  (m_mesh->m_spaceDim, facecnt, ns[i]->m_x, ns[i]->m_y,
545  ns[i]->m_z);
546  curve->m_points.push_back(vert);
547  }
548 
549  faces[el->GetId()] = curve;
550  facecnt++;
551  }
552  }
553  }
554  }
555  */
556 }
557 
559 {
560  SpatialDomains::CompositeMap &comps = graph->GetComposites();
561  map<int, string> &compLabels = graph->GetCompositesLabels();
562 
563  int j = 0;
564 
565  for(auto &it : m_mesh->m_composite)
566  {
567  if(it.second->m_items.size() > 0)
568  {
569  int indx = it.second->m_id;
572 
573  if(it.second->m_label.size())
574  {
575  compLabels[indx] = it.second->m_label;
576  }
577 
578  switch (it.second->m_tag[0])
579  {
580  case 'V':
581  {
582  PointGeomMap &pointMap = graph->GetAllPointGeoms();
583  for(int i = 0; i < it.second->m_items.size(); i++)
584  {
585  curVector->m_geomVec.push_back(pointMap[it.second->m_items[i]->GetId()]);
586  }
587  }
588  break;
589  case 'S':
590  case 'E':
591  {
592  SegGeomMap &segMap = graph->GetAllSegGeoms();
593  for(int i = 0; i < it.second->m_items.size(); i++)
594  {
595  curVector->m_geomVec.push_back(segMap[it.second->m_items[i]->GetId()]);
596  }
597  }
598  break;
599  case 'Q':
600  {
601  QuadGeomMap &quadMap = graph->GetAllQuadGeoms();
602  for(int i = 0; i < it.second->m_items.size(); i++)
603  {
604  curVector->m_geomVec.push_back(quadMap[it.second->m_items[i]->GetId()]);
605  }
606  }
607  break;
608  case 'T':
609  {
610  TriGeomMap &triMap = graph->GetAllTriGeoms();
611  for(int i = 0; i < it.second->m_items.size(); i++)
612  {
613  curVector->m_geomVec.push_back(triMap[it.second->m_items[i]->GetId()]);
614  }
615  }
616  break;
617  case 'F':
618  {
619  QuadGeomMap &quadMap = graph->GetAllQuadGeoms();
620  TriGeomMap &triMap = graph->GetAllTriGeoms();
621  for(int i = 0; i < it.second->m_items.size(); i++)
622  {
623  auto f = quadMap.find(it.second->m_items[i]->GetId());
624  if(f != quadMap.end())
625  {
626  curVector->m_geomVec.push_back(f->second);
627  }
628  else
629  {
630  auto f2 = triMap.find(it.second->m_items[i]->GetId());
631  curVector->m_geomVec.push_back(f2->second);
632  }
633  }
634  }
635  break;
636  case 'A':
637  {
638  TetGeomMap &tetMap = graph->GetAllTetGeoms();
639  for(int i = 0; i < it.second->m_items.size(); i++)
640  {
641  curVector->m_geomVec.push_back(tetMap[it.second->m_items[i]->GetId()]);
642  };
643  }
644  break;
645  case 'P':
646  {
647  PyrGeomMap &pyrMap = graph->GetAllPyrGeoms();
648  for(int i = 0; i < it.second->m_items.size(); i++)
649  {
650  curVector->m_geomVec.push_back(pyrMap[it.second->m_items[i]->GetId()]);
651  }
652  }
653  break;
654  case 'R':
655  {
656  PrismGeomMap &prismMap = graph->GetAllPrismGeoms();
657  for(int i = 0; i < it.second->m_items.size(); i++)
658  {
659  curVector->m_geomVec.push_back(prismMap[it.second->m_items[i]->GetId()]);
660  }
661  }
662  break;
663  case 'H':
664  {
665  HexGeomMap &hexMap = graph->GetAllHexGeoms();
666  for(int i = 0; i < it.second->m_items.size(); i++)
667  {
668  curVector->m_geomVec.push_back(hexMap[it.second->m_items[i]->GetId()]);
669  }
670  }
671  break;
672  default:
673  ASSERTL0(false, "Unknown element type");
674  }
675 
676  comps[indx] = curVector;
677  }
678  j++;
679  }
680 }
681 
683 {
684  vector<SpatialDomains::CompositeMap> &domain = graph->GetDomain();
685 
686  string list;
687 
688  for(auto &it : m_mesh->m_composite)
689  {
690  if(it.second->m_items[0]->GetDim() == m_mesh->m_expDim)
691  {
692  if(list.length() > 0)
693  {
694  list += ",";
695  }
696  list += boost::lexical_cast<string>(it.second->m_id);
697  }
698  }
699 
700  SpatialDomains::CompositeMap fullDomain;
701  graph->GetCompositeList(list, fullDomain);
702  domain.push_back(fullDomain);
703 }
704 
705 }
706 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:163
void TransferDomain(SpatialDomains::MeshGraphSharedPtr graph)
virtual void Process()
Write mesh to output file.
int DefineFunction(const std::string &vlist, const std::string &expr)
Defines a function for the purposes of evaluation.
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
Definition: Geometry.h:65
void TransferComposites(SpatialDomains::MeshGraphSharedPtr graph)
std::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:62
NekDouble Evaluate(const int id)
Evaluate a function which depends only on constants and/or parameters.
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
Definition: HexGeom.h:46
Abstract base class for output modules.
STL namespace.
std::map< int, CompositeSharedPtr > CompositeMap
Definition: MeshGraph.h:137
std::map< int, PrismGeomSharedPtr > PrismGeomMap
Definition: PrismGeom.h:89
std::shared_ptr< Composite > CompositeSharedPtr
Definition: MeshGraph.h:136
void TransferElements(SpatialDomains::MeshGraphSharedPtr graph)
std::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
Definition: Mesh.h:156
std::map< int, PyrGeomSharedPtr > PyrGeomMap
Definition: PyrGeom.h:81
void TestElmts(const std::map< int, std::shared_ptr< T > > &geomMap, SpatialDomains::MeshGraphSharedPtr &graph, LibUtilities::Interpreter &strEval, int exprId)
Definition: OutputNekpp.cpp:89
std::map< int, TetGeomSharedPtr > TetGeomMap
Definition: TetGeom.h:90
std::map< int, TriGeomSharedPtr > TriGeomMap
Definition: TriGeom.h:59
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:64
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
std::shared_ptr< TriGeom > TriGeomSharedPtr
Definition: TriGeom.h:58
std::pair< ModuleType, std::string > ModuleKey
LibUtilities::Interpreter m_strEval
Definition: OutputNekpp.h:63
void TransferCurves(SpatialDomains::MeshGraphSharedPtr graph)
std::shared_ptr< Element > ElementSharedPtr
Definition: Edge.h:49
MeshGraphFactory & GetMeshGraphFactory()
Definition: MeshGraph.cpp:76
Represents a command-line configuration option.
std::map< int, SegGeomSharedPtr > SegGeomMap
Definition: SegGeom.h:52
std::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:53
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void TransferFaces(SpatialDomains::MeshGraphSharedPtr graph, std::unordered_map< int, SpatialDomains::SegGeomSharedPtr > &edgeMap)
double NekDouble
std::map< std::string, ConfigOption > m_config
List of configuration values.
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:59
Interpreter class for the evaluation of mathematical expressions.
Definition: Interpreter.h:77
std::map< int, QuadGeomSharedPtr > QuadGeomMap
Definition: QuadGeom.h:54
void TransferEdges(SpatialDomains::MeshGraphSharedPtr graph, std::unordered_map< int, SpatialDomains::SegGeomSharedPtr > &edgeMap)
std::shared_ptr< Curve > CurveSharedPtr
Definition: Curve.hpp:61
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:199
std::map< int, PointGeomSharedPtr > PointGeomMap
Definition: PointGeom.h:54
std::pair< ModuleType, std::string > ModuleKey
std::shared_ptr< SegGeom > SegGeomSharedPtr
Definition: Geometry2D.h:62
std::map< int, HexGeomSharedPtr > HexGeomMap
Definition: HexGeom.h:91
std::shared_ptr< SessionReader > SessionReaderSharedPtr
void TransferVertices(SpatialDomains::MeshGraphSharedPtr graph)
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, DomainRangeShPtr rng=NullDomainRangeShPtr, bool fillGraph=true)
Definition: MeshGraph.cpp:113
ModuleFactory & GetModuleFactory()