Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeshGraph.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: MeshGraph.h
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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description:
33 //
34 ////////////////////////////////////////////////////////////////////////////////
35 #ifndef NEKTAR_SPATIALDOMAINS_MESHGRAPH_H
36 #define NEKTAR_SPATIALDOMAINS_MESHGRAPH_H
37 
38 #include <boost/unordered_map.hpp>
39 
43 
44 #include <SpatialDomains/SegGeom.h>
45 #include <SpatialDomains/TriGeom.h>
47 #include <SpatialDomains/TetGeom.h>
48 #include <SpatialDomains/PyrGeom.h>
50 #include <SpatialDomains/HexGeom.h>
51 
52 #include <SpatialDomains/Curve.hpp>
54 
55 class TiXmlDocument;
56 
57 namespace Nektar
58 {
59  namespace SpatialDomains
60  {
62  {
82  };
83 
84  // Keep this consistent with the enums in ExpansionType.
85  // This is used in the BC file to specify the expansion type.
86  const std::string kExpansionTypeStr[] =
87  {
88  "NOTYPE",
89  "MODIFIED",
90  "MODIFIEDQUADPLUS1",
91  "MODIFIEDQUADPLUS2",
92  "MODIFIEDGLLRADAU10",
93  "ORTHOGONAL",
94  "GLL_LAGRANGE",
95  "GLL_LAGRANGE_SEM",
96  "GAUSS_LAGRANGE",
97  "GAUSS_LAGRANGE_SEM",
98  "FOURIER",
99  "FOURIERSINGLEMODE",
100  "FOURIERHALFMODERE",
101  "FOURIERHALFMODEIM",
102  "CHEBYSHEV",
103  "FOURIER-CHEBYSHEV",
104  "CHEBYSHEV-FOURIER",
105  "FOURIER-MODIFIED"
106  };
107 
109  typedef boost::shared_ptr< InterfaceComponent > SharedInterfaceCompPtr;
110  typedef std::vector< PointGeomSharedPtr > PointGeomVector;
111  typedef std::map<int, PointGeomSharedPtr> PointGeomMap;
112  typedef std::list< SharedInterfaceCompPtr > InterfaceCompList;
113 
114  typedef boost::shared_ptr< GeometryVector > Composite;
115  typedef std::map<int, Composite> CompositeMap;
117  typedef std::map<int, Composite>::const_iterator CompositeMapConstIter;
118 
119  struct ElementEdge
120  {
123  };
124 
125  struct ElementFace
126  {
129  };
130 
131 
132  typedef boost::shared_ptr<ElementEdge> ElementEdgeSharedPtr;
133  typedef std::vector<ElementEdgeSharedPtr> ElementEdgeVector;
134  typedef boost::shared_ptr<ElementEdgeVector> ElementEdgeVectorSharedPtr;
135 
136  typedef boost::shared_ptr<ElementFace> ElementFaceSharedPtr;
137  typedef std::vector<ElementFaceSharedPtr> ElementFaceVector;
138  typedef boost::shared_ptr<ElementFaceVector> ElementFaceVectorSharedPtr;
139 
140  // set restriction on domain range for post-processing.
141  struct DomainRange
142  {
152 
155  };
156 
157  typedef boost::shared_ptr<DomainRange> DomainRangeShPtr;
158  static DomainRangeShPtr NullDomainRangeShPtr;
159 
160  struct Expansion
161  {
163  const LibUtilities::BasisKeyVector basiskeyvec):
164  m_geomShPtr(geomShPtr),
165  m_basisKeyVector(basiskeyvec)
166  {
167  }
168 
171  };
172 
173  typedef boost::shared_ptr<Expansion> ExpansionShPtr;
174  typedef std::map<int, ExpansionShPtr> ExpansionMap;
176  typedef std::map<int, ExpansionShPtr>::const_iterator ExpansionMapConstIter;
177 
178  typedef boost::shared_ptr<ExpansionMap> ExpansionMapShPtr;
179  typedef std::map<std::string, ExpansionMapShPtr> ExpansionMapShPtrMap;
181 
182 
183  typedef std::map<std::string, std::string> GeomInfoMap;
184 
185  /// Base class for a spectral/hp element mesh.
186  class MeshGraph
187  {
188  public:
190 
192  unsigned int meshDimension,
193  unsigned int spaceDimension);
194 
196  const LibUtilities::SessionReaderSharedPtr &pSession,
197  const DomainRangeShPtr &rng = NullDomainRangeShPtr);
198 
199 
201 
202 
203  /* ---- Mesh Reading routines ---- */
204  SPATIAL_DOMAINS_EXPORT static boost::shared_ptr<MeshGraph> Read(
205  const LibUtilities::SessionReaderSharedPtr &pSession,
206  DomainRangeShPtr &rng = NullDomainRangeShPtr);
207 
208  /// \todo Remove updated routine
209  SPATIAL_DOMAINS_EXPORT static boost::shared_ptr<MeshGraph> Read(
210  const std::string& infilename,
211  bool pReadExpansions = true);
212 
213 
214  /// Read will read the meshgraph vertices given a filename.
216  const std::string& infilename);
217 
218  /// Read will read the meshgraph vertices given a TiXmlDocument.
220  TiXmlDocument &doc);
221 
222  /// Read geometric information from a file.
224  const std::string &infilename);
225 
226  /// Read geometric information from an XML document.
228  TiXmlDocument &doc);
229 
230  /// Read the expansions given the XML file path.
232  const std::string &infilename);
233 
234  /// Read the expansions given the XML document reference.
236  TiXmlDocument &doc);
237 
239  TiXmlDocument &doc);
240 
242  TiXmlDocument &doc);
243 
245  std::string &infilename);
246 
248  std::string &outfilename);
249 
251  TiXmlDocument &doc);
252 
253  /* ---- Helper functions ---- */
254  /// Dimension of the mesh (can be a 1D curve in 3D space).
255  inline int GetMeshDimension() const;
256 
257  /// Dimension of the space (can be a 1D curve in 3D space).
258  inline int GetSpaceDimension() const;
259 
260 
261  /* Range definitions for postprorcessing */
263  (NekDouble xmin, NekDouble xmax,
268 
269  /// Check if goemetry is in range definition if activated
270  bool CheckRange(Geometry2D &geom);
271 
272  /// Check if goemetry is in range definition if activated
273  bool CheckRange(Geometry3D &geom);
274 
275  /* ---- Composites and Domain ---- */
276  inline Composite GetComposite(int whichComposite) const;
277 
279  int whichComposite,
280  int whichItem);
281 
283  const std::string &compositeStr,
284  CompositeMap &compositeVector) const;
285 
286  inline const CompositeMap &GetComposites() const;
287  inline const std::map<int, std::string> &GetCompositesLabels() const;
288 
289  inline const std::vector<CompositeMap> &GetDomain(void) const;
290 
291  inline const CompositeMap &GetDomain(int domain) const;
292 
293 
294  /* ---- Expansions ---- */
295  inline const ExpansionMap &GetExpansions();
296 
297  SPATIAL_DOMAINS_EXPORT const ExpansionMap &GetExpansions(
298  const std::string variable);
299 
300  SPATIAL_DOMAINS_EXPORT ExpansionShPtr GetExpansion(
301  GeometrySharedPtr geom, const std::string variable = "DefaultVar");
302 
303  /// Sets expansions given field definitions
305  std::vector<LibUtilities::FieldDefinitionsSharedPtr>
306  &fielddef);
307 
308  /// Sets expansions given field definition, quadrature points.
310  std::vector<LibUtilities::FieldDefinitionsSharedPtr>
311  &fielddef,
312  std::vector< std::vector<LibUtilities::PointsType> >
313  &pointstype );
314 
315  /// Sets expansions to have equispaced points
317  int npoints = 0);
318 
319  /// Reset expansion to have specified polynomial order \a nmodes
321 
322  /// Reset expansion to have specified point order \a
323  /// npts
325  /// This function sets the expansion #exp in map with
326  /// entry #variable
327 
328  inline void SetExpansions(
329  const std::string variable,
330  ExpansionMapShPtr &exp);
331 
332  /// Sets the basis key for all expansions of the given shape.
336  std::string var = "DefaultVar");
337 
338  inline bool SameExpansions(
339  const std::string var1,
340  const std::string var2);
341 
342  inline bool CheckForGeomInfo(std::string parameter);
343 
344  inline const std::string GetGeomInfo(std::string parameter);
345 
349  ExpansionType type,
350  const int order);
351 
355  ExpansionType type_x,
356  ExpansionType type_y,
357  ExpansionType type_z,
358  const int nummodes_x,
359  const int nummodes_y,
360  const int nummodes_z);
361 
362 
363  /* ---- Manipulation of mesh ---- */
364  inline int GetNvertices() const;
365 
366  inline PointGeomSharedPtr GetVertex(int id);
367  /// Adds a vertex to the with the next available ID.
369  NekDouble x,
370  NekDouble y,
371  NekDouble z);
372 
373  /// \brief Adds an edge between two points. If curveDefinition is
374  /// null, then the edge is straight, otherwise it is curved according
375  /// to the curveDefinition.
377  CurveSharedPtr curveDefinition = CurveSharedPtr());
379 
388 
389  SPATIAL_DOMAINS_EXPORT const PointGeomMap& GetVertSet() const { return m_vertSet; }
390 
393 
394  // void AddExpansion(ExpansionShPtr expansion) { m_expansions[expansion->m_geomShPtr->GetGlobalID()] = expansion; }
395  SPATIAL_DOMAINS_EXPORT const PointGeomMap& GetAllPointGeoms() const { return m_vertSet; }
403 
404  /// Convenience method for ElVis.
405  template<typename ElementType>
406  const std::map<int, boost::shared_ptr<ElementType> >& GetAllElementsOfType() const;
407 
408  protected:
410  PointGeomMap m_vertSet;
411  InterfaceCompList m_iComps;
412 
415 
417 
424 
429 
430  CompositeMap m_meshComposites;
431  std::map<int, std::string> m_compositesLabels;
432  std::vector<CompositeMap> m_domain;
433  DomainRangeShPtr m_domainRange;
434 
435  ExpansionMapShPtrMap m_expansionMapShPtrMap;
436 
437  GeomInfoMap m_geomInfo;
438 
439 
440  ExpansionMapShPtr SetUpExpansionMap(void);
441  };
442  typedef boost::shared_ptr<MeshGraph> MeshGraphSharedPtr;
443 
444 
445  /**
446  *
447  */
448  inline int MeshGraph::GetMeshDimension(void) const
449  {
450  return m_meshDimension;
451  }
452 
453 
454  /**
455  *
456  */
457  inline int MeshGraph::GetSpaceDimension(void) const
458  {
459  return m_spaceDimension;
460  }
461 
462 
463  /**
464  *
465  */
466  inline Composite MeshGraph::GetComposite(int whichComposite) const
467  {
468  Composite returnval;
469  ASSERTL0(m_meshComposites.find(whichComposite) != m_meshComposites.end(),
470  "Composite not found.");
471  return m_meshComposites.find(whichComposite)->second;
472  }
473 
474 
475  /**
476  *
477  */
478  inline const CompositeMap &MeshGraph::GetComposites() const
479  {
480  return m_meshComposites;
481  }
482 
483 
484  /**
485  * \brief Return a map of integers and strings containing the
486  * labels of each composite
487  */
488  inline const std::map<int, std::string> &MeshGraph::GetCompositesLabels() const
489  {
490  return m_compositesLabels;
491  }
492 
493 
494  /**
495  *
496  */
497  inline const std::vector<CompositeMap> &MeshGraph::GetDomain(void) const
498  {
499  return m_domain;
500  }
501 
502  /**
503  *
504  */
505  inline const CompositeMap &MeshGraph::GetDomain(const int domain) const
506  {
507  ASSERTL1(domain < m_domain.size(),"Request for domain which does not exist");
508  return m_domain[domain];
509  }
510 
511 
512  /**
513  *
514  */
515  inline const ExpansionMap &MeshGraph::GetExpansions()
516  {
517  std::string defstr = "DefaultVar";
518  return GetExpansions(defstr);
519  }
520 
521 
522  /**
523  *
524  */
525  void MeshGraph::SetExpansions(const std::string variable, ExpansionMapShPtr &exp)
526  {
527  if(m_expansionMapShPtrMap.count(variable) != 0)
528  {
529  ASSERTL0(false,(std::string("Expansion field is already set for variable ") + variable).c_str());
530  }
531  else
532  {
533  m_expansionMapShPtrMap[variable] = exp;
534  }
535  }
536 
537 
538  /**
539  *
540  */
541  inline bool MeshGraph::SameExpansions(const std::string var1, const std::string var2)
542  {
543  ExpansionMapShPtr expVec1 = m_expansionMapShPtrMap.find(var1)->second;
544  ExpansionMapShPtr expVec2 = m_expansionMapShPtrMap.find(var2)->second;
545 
546  if(expVec1.get() == expVec2.get())
547  {
548  return true;
549  }
550 
551  return false;
552  }
553 
554 
555  /**
556  *
557  */
558  inline bool MeshGraph::CheckForGeomInfo(std::string parameter)
559  {
560  return m_geomInfo.find(parameter) != m_geomInfo.end();
561  }
562 
563 
564  /**
565  *
566  */
567  inline const std::string MeshGraph::GetGeomInfo(std::string parameter)
568  {
569  ASSERTL1(m_geomInfo.find(parameter) != m_geomInfo.end(),
570  "Parameter " + parameter + " does not exist.");
571  return m_geomInfo[parameter];
572  }
573 
574 
575  /**
576  *
577  */
578  inline int MeshGraph::GetNvertices() const
579  {
580  return int(m_vertSet.size());
581  }
582 
583 
584  /**
585  *
586  */
588  {
589  PointGeomSharedPtr returnval;
590  PointGeomMap::iterator x = m_vertSet.find(id);
591  ASSERTL0(x != m_vertSet.end(),
592  "Vertex " + boost::lexical_cast<std::string>(id)
593  + " not found.");
594  return x->second;
595  }
596 
597 
598  /**
599  *
600  */
601  template<>
602  inline const std::map<int, boost::shared_ptr<SegGeom> >& MeshGraph::GetAllElementsOfType() const
603  {
604  return GetAllSegGeoms();
605  }
606 
607  /**
608  *
609  */
610  template<>
611  inline const std::map<int, boost::shared_ptr<TriGeom> >& MeshGraph::GetAllElementsOfType() const
612  {
613  return GetAllTriGeoms();
614  }
615 
616  /**
617  *
618  */
619  template<>
620  inline const std::map<int, boost::shared_ptr<QuadGeom> >& MeshGraph::GetAllElementsOfType() const
621  {
622  return GetAllQuadGeoms();
623  }
624 
625  /**
626  *
627  */
628  template<>
629  inline const std::map<int, boost::shared_ptr<HexGeom> >& MeshGraph::GetAllElementsOfType() const
630  {
631  return GetAllHexGeoms();
632  }
633 
634 
635  /**
636  *
637  */
638  template<>
639  inline const std::map<int, boost::shared_ptr<PrismGeom> >& MeshGraph::GetAllElementsOfType() const
640  {
641  return GetAllPrismGeoms();
642  }
643 
644 
645  /**
646  *
647  */
648  template<>
649  inline const std::map<int, boost::shared_ptr<TetGeom> >& MeshGraph::GetAllElementsOfType() const
650  {
651  return GetAllTetGeoms();
652  }
653 
654 
655  /**
656  *
657  */
658  template<>
659  inline const std::map<int, boost::shared_ptr<PyrGeom> >& MeshGraph::GetAllElementsOfType() const
660  {
661  return GetAllPyrGeoms();
662  }
663  };
664 };
665 
666 #endif
const std::map< int, boost::shared_ptr< ElementType > > & GetAllElementsOfType() const
Convenience method for ElVis.
std::map< std::string, std::string > GeomInfoMap
Definition: MeshGraph.h:183
void SetExpansions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
Sets expansions given field definitions.
Definition: MeshGraph.cpp:2369
boost::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:84
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
const std::vector< CompositeMap > & GetDomain(void) const
Definition: MeshGraph.h:497
LibUtilities::ShapeType m_shapeType
Definition: MeshGraph.h:154
LibUtilities::SessionReaderSharedPtr m_session
Definition: MeshGraph.h:409
int GetSpaceDimension() const
Dimension of the space (can be a 1D curve in 3D space).
Definition: MeshGraph.h:457
boost::shared_ptr< ElementFaceVector > ElementFaceVectorSharedPtr
Definition: MeshGraph.h:138
std::map< int, std::string > m_compositesLabels
Definition: MeshGraph.h:431
std::map< int, ExpansionShPtr >::const_iterator ExpansionMapConstIter
Definition: MeshGraph.h:176
const PrismGeomMap & GetAllPrismGeoms() const
Definition: MeshGraph.h:401
void SetExpansionsToPolyOrder(int nmodes)
Reset expansion to have specified polynomial order nmodes.
Definition: MeshGraph.cpp:3111
static boost::shared_ptr< MeshGraph > Read(const LibUtilities::SessionReaderSharedPtr &pSession, DomainRangeShPtr &rng=NullDomainRangeShPtr)
Definition: MeshGraph.cpp:124
void ReadCurves(TiXmlDocument &doc)
Definition: MeshGraph.cpp:1181
std::vector< PointGeomSharedPtr > PointGeomVector
Definition: Geometry3D.h:61
PrismGeomSharedPtr AddPrism(TriGeomSharedPtr tfaces[PrismGeom::kNtfaces], QuadGeomSharedPtr qfaces[PrismGeom::kNqfaces])
Definition: MeshGraph.cpp:4074
boost::shared_ptr< QuadGeom > QuadGeomSharedPtr
Definition: QuadGeom.h:54
int GetMeshDimension() const
Dimension of the mesh (can be a 1D curve in 3D space).
Definition: MeshGraph.h:448
PointGeomSharedPtr GetVertex(int id)
Definition: MeshGraph.h:587
boost::shared_ptr< InterfaceComponent > SharedInterfaceCompPtr
Definition: MeshGraph.h:108
std::map< int, PrismGeomSharedPtr > PrismGeomMap
Definition: PrismGeom.h:112
std::vector< ElementFaceSharedPtr > ElementFaceVector
Definition: MeshGraph.h:137
bool SameExpansions(const std::string var1, const std::string var2)
Definition: MeshGraph.h:541
const SegGeomMap & GetAllSegGeoms() const
Definition: MeshGraph.h:396
static const int kNtfaces
Definition: TetGeom.h:59
boost::shared_ptr< HexGeom > HexGeomSharedPtr
Definition: HexGeom.h:110
PointGeomSharedPtr AddVertex(NekDouble x, NekDouble y, NekDouble z)
Adds a vertex to the with the next available ID.
Definition: MeshGraph.cpp:4011
std::map< int, PyrGeomSharedPtr > PyrGeomMap
Definition: PyrGeom.h:87
Expansion(GeometrySharedPtr geomShPtr, const LibUtilities::BasisKeyVector basiskeyvec)
Definition: MeshGraph.h:162
QuadGeomSharedPtr AddQuadrilateral(SegGeomSharedPtr edges[], StdRegions::Orientation orient[])
Definition: MeshGraph.cpp:4060
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
virtual void ReadGeometry(const std::string &infilename)
Read will read the meshgraph vertices given a filename.
Definition: MeshGraph.cpp:235
boost::shared_ptr< Curve > CurveSharedPtr
Definition: Curve.hpp:62
const ExpansionMap & GetExpansions()
Definition: MeshGraph.h:515
static LibUtilities::BasisKeyVector DefineBasisKeyFromExpansionType(GeometrySharedPtr in, ExpansionType type, const int order)
Definition: MeshGraph.cpp:3212
std::map< int, TetGeomSharedPtr > TetGeomMap
Definition: TetGeom.h:109
bool CheckForGeomInfo(std::string parameter)
Definition: MeshGraph.h:558
std::map< int, TriGeomSharedPtr > TriGeomMap
Definition: TriGeom.h:62
const PyrGeomMap & GetAllPyrGeoms() const
Definition: MeshGraph.h:400
void SetExpansionsToPointOrder(int npts)
Reset expansion to have specified point order npts.
Definition: MeshGraph.cpp:3144
TriGeomSharedPtr AddTriangle(SegGeomSharedPtr edges[], StdRegions::Orientation orient[])
Definition: MeshGraph.cpp:4045
DomainRangeShPtr m_domainRange
Definition: MeshGraph.h:433
boost::shared_ptr< ElementEdge > ElementEdgeSharedPtr
Definition: MeshGraph.h:132
void WriteGeometry(std::string &outfilename)
Write out an XML file containing the GEOMETRY block representing this MeshGraph instance inside a NEK...
Definition: MeshGraph.cpp:1977
std::map< int, PointGeomSharedPtr > PointGeomMap
Definition: MeshGraph.h:111
GeometrySharedPtr GetCompositeItem(int whichComposite, int whichItem)
Definition: MeshGraph.cpp:2239
boost::shared_ptr< ExpansionMap > ExpansionMapShPtr
Definition: MeshGraph.h:178
SegGeomSharedPtr AddEdge(PointGeomSharedPtr v0, PointGeomSharedPtr v1, CurveSharedPtr curveDefinition=CurveSharedPtr())
Adds an edge between two points. If curveDefinition is null, then the edge is straight, otherwise it is curved according to the curveDefinition.
Definition: MeshGraph.cpp:4022
Composite GetComposite(int whichComposite) const
Definition: MeshGraph.h:466
boost::shared_ptr< SegGeom > SegGeomSharedPtr
Definition: Geometry2D.h:60
const PointGeomMap & GetAllPointGeoms() const
Definition: MeshGraph.h:395
std::map< std::string, ExpansionMapShPtr >::iterator ExpansionMapShPtrMapIter
Definition: MeshGraph.h:180
const HexGeomMap & GetAllHexGeoms() const
Definition: MeshGraph.h:402
std::map< int, Composite >::const_iterator CompositeMapConstIter
Definition: MeshGraph.h:117
std::map< int, SegGeomSharedPtr > SegGeomMap
Definition: SegGeom.h:54
static std::string npts
Definition: InputFld.cpp:43
boost::shared_ptr< DomainRange > DomainRangeShPtr
Definition: MeshGraph.h:157
PyrGeomSharedPtr AddPyramid(TriGeomSharedPtr tfaces[PyrGeom::kNtfaces], QuadGeomSharedPtr qfaces[PyrGeom::kNqfaces])
Definition: MeshGraph.cpp:4105
std::map< int, Composite >::iterator CompositeMapIter
Definition: MeshGraph.h:116
GeometrySharedPtr m_geomShPtr
Definition: MeshGraph.h:169
double NekDouble
LibUtilities::BasisKeyVector DefineBasisKeyFromExpansionTypeHomo(GeometrySharedPtr in, ExpansionType type_x, ExpansionType type_y, ExpansionType type_z, const int nummodes_x, const int nummodes_y, const int nummodes_z)
Definition: MeshGraph.cpp:3804
std::vector< BasisKey > BasisKeyVector
Name for a vector of BasisKeys.
std::map< std::string, ExpansionMapShPtr > ExpansionMapShPtrMap
Definition: MeshGraph.h:179
boost::shared_ptr< GeometryVector > Composite
Definition: MeshGraph.h:114
static const NekDouble kNekUnsetDouble
boost::shared_ptr< ElementFace > ElementFaceSharedPtr
Definition: MeshGraph.h:136
std::map< int, Composite > CompositeMap
Definition: MeshGraph.h:115
const std::string GetGeomInfo(std::string parameter)
Definition: MeshGraph.h:567
const PointGeomMap & GetVertSet() const
Definition: MeshGraph.h:389
static const int kNtfaces
Definition: PyrGeom.h:59
SegGeomSharedPtr GetEdge(unsigned int id)
Definition: MeshGraph.h:378
const QuadGeomMap & GetAllQuadGeoms() const
Definition: MeshGraph.h:398
boost::shared_ptr< ElementEdgeVector > ElementEdgeVectorSharedPtr
Definition: MeshGraph.h:134
void ReadGeometryInfo(const std::string &infilename)
Read geometric information from a file.
Definition: MeshGraph.cpp:530
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::map< int, QuadGeomSharedPtr > QuadGeomMap
Definition: QuadGeom.h:57
static const int kNqfaces
Definition: PyrGeom.h:58
3D geometry information
Definition: Geometry3D.h:70
std::vector< CompositeMap > m_domain
Definition: MeshGraph.h:432
void GetCompositeList(const std::string &compositeStr, CompositeMap &compositeVector) const
Definition: MeshGraph.cpp:2277
static DomainRangeShPtr NullDomainRangeShPtr
Definition: MeshGraph.h:158
2D geometry information
Definition: Geometry2D.h:65
boost::shared_ptr< Expansion > ExpansionShPtr
Definition: MeshGraph.h:173
ExpansionMapShPtrMap m_expansionMapShPtrMap
Definition: MeshGraph.h:435
Base class for a spectral/hp element mesh.
Definition: MeshGraph.h:186
std::list< SharedInterfaceCompPtr > InterfaceCompList
Definition: MeshGraph.h:112
void ReadDomain(TiXmlDocument &doc)
Definition: MeshGraph.cpp:1087
boost::shared_ptr< PrismGeom > PrismGeomSharedPtr
Definition: PrismGeom.h:109
void SetDomainRange(NekDouble xmin, NekDouble xmax, NekDouble ymin=NekConstants::kNekUnsetDouble, NekDouble ymax=NekConstants::kNekUnsetDouble, NekDouble zmin=NekConstants::kNekUnsetDouble, NekDouble zmax=NekConstants::kNekUnsetDouble)
Definition: MeshGraph.cpp:1991
bool CheckRange(Geometry2D &geom)
Check if goemetry is in range definition if activated.
Definition: MeshGraph.cpp:2029
void SetBasisKey(LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys, std::string var="DefaultVar")
Sets the basis key for all expansions of the given shape.
Definition: MeshGraph.cpp:3191
ExpansionShPtr GetExpansion(GeometrySharedPtr geom, const std::string variable="DefaultVar")
Definition: MeshGraph.cpp:2352
boost::shared_ptr< TetGeom > TetGeomSharedPtr
Definition: TetGeom.h:106
boost::shared_ptr< TriGeom > TriGeomSharedPtr
Definition: TriGeom.h:58
HexGeomSharedPtr AddHexahedron(QuadGeomSharedPtr qfaces[HexGeom::kNqfaces])
Definition: MeshGraph.cpp:4122
ExpansionMapShPtr SetUpExpansionMap(void)
Definition: MeshGraph.cpp:4139
void ReadExpansions(const std::string &infilename)
Read the expansions given the XML file path.
Definition: MeshGraph.cpp:585
boost::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:63
static const int kNqfaces
Definition: HexGeom.h:62
const CompositeMap & GetComposites() const
Definition: MeshGraph.h:478
const std::string kExpansionTypeStr[]
Definition: MeshGraph.h:86
const TetGeomMap & GetAllTetGeoms() const
Definition: MeshGraph.h:399
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:442
std::map< int, HexGeomSharedPtr > HexGeomMap
Definition: HexGeom.h:113
boost::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:53
void SetExpansionsToEvenlySpacedPoints(int npoints=0)
Sets expansions to have equispaced points.
Definition: MeshGraph.cpp:3069
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
#define SPATIAL_DOMAINS_EXPORT
LibUtilities::BasisKeyVector m_basisKeyVector
Definition: MeshGraph.h:170
std::map< int, ExpansionShPtr > ExpansionMap
Definition: MeshGraph.h:174
TetGeomSharedPtr AddTetrahedron(TriGeomSharedPtr tfaces[TetGeom::kNtfaces])
Definition: MeshGraph.cpp:4091
const std::map< int, std::string > & GetCompositesLabels() const
Return a map of integers and strings containing the labels of each composite.
Definition: MeshGraph.h:488
std::map< int, ExpansionShPtr >::iterator ExpansionMapIter
Definition: MeshGraph.h:175
std::vector< ElementEdgeSharedPtr > ElementEdgeVector
Definition: MeshGraph.h:133
const TriGeomMap & GetAllTriGeoms() const
Definition: MeshGraph.h:397