Nektar++
|
#include <MeshGraph2D.h>
Public Member Functions | |
MeshGraph2D () | |
MeshGraph2D (const LibUtilities::SessionReaderSharedPtr &pSession, const DomainRangeShPtr &rng=NullDomainRangeShPtr) | |
virtual | ~MeshGraph2D () |
void | ReadGeometry (const std::string &infilename) |
Read will read the meshgraph vertices given a filename. More... | |
void | ReadGeometry (TiXmlDocument &doc) |
Read will read the meshgraph vertices given a TiXmlDocument. More... | |
SegGeomSharedPtr | GetSegGeom (int eID) |
int | GetCoordim (void) |
const TriGeomMap & | GetTrigeoms (void) const |
const QuadGeomMap & | GetQuadgeoms (void) const |
void | GenXGeoFac () |
int | GetNseggeoms () const |
int | GetVidFromElmt (LibUtilities::ShapeType shape, const int vert, const int elmt) const |
int | GetEidFromElmt (LibUtilities::ShapeType shape, const int edge, const int elmt) const |
StdRegions::Orientation | GetEorientFromElmt (LibUtilities::ShapeType shape, const int edge, const int elmt) const |
StdRegions::Orientation | GetCartesianEorientFromElmt (LibUtilities::ShapeType shape, const int edge, const int elmt) const |
int | GetNumComposites (void) |
int | GetNumCompositeItems (int whichComposite) |
ElementEdgeVectorSharedPtr | GetElementsFromEdge (SegGeomSharedPtr edge) |
Return the elements (shared ptrs) that have this edge. More... | |
ElementEdgeVectorSharedPtr | GetElementsFromEdge (Geometry1DSharedPtr edge) |
LibUtilities::BasisKey | GetEdgeBasisKey (SegGeomSharedPtr edge, const std::string variable="DefaultVar") |
Return the BasisKey corresponding to an edge of an element If the expansion is a triangle the Modified_B direction is modified to be one-dimensional Modified_A,GaussLobattoLegendre. More... | |
Public Member Functions inherited from Nektar::SpatialDomains::MeshGraph | |
MeshGraph () | |
MeshGraph (unsigned int meshDimension, unsigned int spaceDimension) | |
MeshGraph (const LibUtilities::SessionReaderSharedPtr &pSession, const DomainRangeShPtr &rng=NullDomainRangeShPtr) | |
virtual | ~MeshGraph () |
void | ReadGeometryInfo (const std::string &infilename) |
Read geometric information from a file. More... | |
void | ReadGeometryInfo (TiXmlDocument &doc) |
Read geometric information from an XML document. More... | |
void | ReadExpansions (const std::string &infilename) |
Read the expansions given the XML file path. More... | |
void | ReadExpansions (TiXmlDocument &doc) |
Read the expansions given the XML document reference. More... | |
void | ReadDomain (TiXmlDocument &doc) |
void | ReadCurves (TiXmlDocument &doc) |
void | ReadCurves (std::string &infilename) |
void | WriteGeometry (std::string &outfilename) |
Write out an XML file containing the GEOMETRY block representing this MeshGraph instance inside a NEKTAR tag. More... | |
void | WriteGeometry (TiXmlDocument &doc) |
Populate a TinyXML document with a GEOMETRY tag inside the NEKTAR tag. More... | |
int | GetMeshDimension () const |
Dimension of the mesh (can be a 1D curve in 3D space). More... | |
int | GetSpaceDimension () const |
Dimension of the space (can be a 1D curve in 3D space). More... | |
void | SetDomainRange (NekDouble xmin, NekDouble xmax, NekDouble ymin=NekConstants::kNekUnsetDouble, NekDouble ymax=NekConstants::kNekUnsetDouble, NekDouble zmin=NekConstants::kNekUnsetDouble, NekDouble zmax=NekConstants::kNekUnsetDouble) |
bool | CheckRange (Geometry2D &geom) |
Check if goemetry is in range definition if activated. More... | |
bool | CheckRange (Geometry3D &geom) |
Check if goemetry is in range definition if activated. More... | |
Composite | GetComposite (int whichComposite) const |
GeometrySharedPtr | GetCompositeItem (int whichComposite, int whichItem) |
void | GetCompositeList (const std::string &compositeStr, CompositeMap &compositeVector) const |
const CompositeMap & | GetComposites () const |
const std::vector< CompositeMap > & | GetDomain (void) const |
const CompositeMap & | GetDomain (int domain) const |
const ExpansionMap & | GetExpansions () |
const ExpansionMap & | GetExpansions (const std::string variable) |
ExpansionShPtr | GetExpansion (GeometrySharedPtr geom, const std::string variable="DefaultVar") |
void | SetExpansions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef) |
Sets expansions given field definitions. More... | |
void | SetExpansions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, std::vector< std::vector< LibUtilities::PointsType > > &pointstype) |
Sets expansions given field definition, quadrature points. More... | |
void | SetExpansionsToEvenlySpacedPoints (int npoints=0) |
Sets expansions to have equispaced points. More... | |
void | SetExpansionsToPolyOrder (int nmodes) |
Reset expansion to have specified polynomial order nmodes. More... | |
void | SetExpansions (const std::string variable, ExpansionMapShPtr &exp) |
This function sets the expansion #exp in map with entry #variable. More... | |
void | SetBasisKey (LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys, std::string var="DefaultVar") |
Sets the basis key for all expansions of the given shape. More... | |
bool | SameExpansions (const std::string var1, const std::string var2) |
bool | CheckForGeomInfo (std::string parameter) |
const std::string | GetGeomInfo (std::string parameter) |
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) |
int | GetNvertices () const |
PointGeomSharedPtr | GetVertex (int id) |
PointGeomSharedPtr | AddVertex (NekDouble x, NekDouble y, NekDouble z) |
Adds a vertex to the with the next available ID. More... | |
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. More... | |
SegGeomSharedPtr | GetEdge (unsigned int id) |
TriGeomSharedPtr | AddTriangle (SegGeomSharedPtr edges[], StdRegions::Orientation orient[]) |
QuadGeomSharedPtr | AddQuadrilateral (SegGeomSharedPtr edges[], StdRegions::Orientation orient[]) |
TetGeomSharedPtr | AddTetrahedron (TriGeomSharedPtr tfaces[TetGeom::kNtfaces]) |
PyrGeomSharedPtr | AddPyramid (TriGeomSharedPtr tfaces[PyrGeom::kNtfaces], QuadGeomSharedPtr qfaces[PyrGeom::kNqfaces]) |
PrismGeomSharedPtr | AddPrism (TriGeomSharedPtr tfaces[PrismGeom::kNtfaces], QuadGeomSharedPtr qfaces[PrismGeom::kNqfaces]) |
HexGeomSharedPtr | AddHexahedron (QuadGeomSharedPtr qfaces[HexGeom::kNqfaces]) |
const PointGeomMap & | GetVertSet () const |
CurveMap & | GetCurvedEdges () |
CurveMap & | GetCurvedFaces () |
const SegGeomMap & | GetAllSegGeoms () const |
const TriGeomMap & | GetAllTriGeoms () const |
const QuadGeomMap & | GetAllQuadGeoms () const |
const TetGeomMap & | GetAllTetGeoms () const |
const PyrGeomMap & | GetAllPyrGeoms () const |
const PrismGeomMap & | GetAllPrismGeoms () const |
const HexGeomMap & | GetAllHexGeoms () const |
template<typename ElementType > | |
const std::map< int, boost::shared_ptr< ElementType > > & | GetAllElementsOfType () const |
Convenience method for ElVis. More... | |
template<> | |
const std::map< int, boost::shared_ptr< HexGeom > > & | GetAllElementsOfType () const |
template<> | |
const std::map< int, boost::shared_ptr< PrismGeom > > & | GetAllElementsOfType () const |
template<> | |
const std::map< int, boost::shared_ptr< TetGeom > > & | GetAllElementsOfType () const |
template<> | |
const std::map< int, boost::shared_ptr< PyrGeom > > & | GetAllElementsOfType () const |
Protected Member Functions | |
void | ReadEdges (TiXmlDocument &doc) |
void | ReadElements (TiXmlDocument &doc) |
void | ReadComposites (TiXmlDocument &doc) |
void | ResolveGeomRef (const std::string &prevToken, const std::string &token, Composite &composite) |
Protected Member Functions inherited from Nektar::SpatialDomains::MeshGraph | |
ExpansionMapShPtr | SetUpExpansionMap (void) |
Definition at line 54 of file MeshGraph2D.h.
Nektar::SpatialDomains::MeshGraph2D::MeshGraph2D | ( | ) |
Definition at line 46 of file MeshGraph2D.cpp.
Nektar::SpatialDomains::MeshGraph2D::MeshGraph2D | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const DomainRangeShPtr & | rng = NullDomainRangeShPtr |
||
) |
Definition at line 54 of file MeshGraph2D.cpp.
References Nektar::SpatialDomains::MeshGraph::ReadExpansions(), and ReadGeometry().
|
virtual |
Definition at line 50 of file MeshGraph2D.cpp.
void Nektar::SpatialDomains::MeshGraph2D::GenXGeoFac | ( | ) |
|
inline |
Definition at line 154 of file MeshGraph2D.h.
References ASSERTL2, Nektar::StdRegions::eBackwards, Nektar::StdRegions::eForwards, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
|
inline |
Definition at line 69 of file MeshGraph2D.h.
References Nektar::SpatialDomains::MeshGraph::GetSpaceDimension().
LibUtilities::BasisKey Nektar::SpatialDomains::MeshGraph2D::GetEdgeBasisKey | ( | SegGeomSharedPtr | edge, |
const std::string | variable = "DefaultVar" |
||
) |
Return the BasisKey corresponding to an edge of an element If the expansion is a triangle the Modified_B direction is modified to be one-dimensional Modified_A,GaussLobattoLegendre.
Definition at line 643 of file MeshGraph2D.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eOrtho_B, Nektar::LibUtilities::eTriangle, GetElementsFromEdge(), Nektar::SpatialDomains::MeshGraph::GetExpansion(), and Nektar::LibUtilities::NullBasisKey().
|
inline |
Definition at line 116 of file MeshGraph2D.h.
References ASSERTL2, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
ElementEdgeVectorSharedPtr Nektar::SpatialDomains::MeshGraph2D::GetElementsFromEdge | ( | SegGeomSharedPtr | edge | ) |
Return the elements (shared ptrs) that have this edge.
Definition at line 587 of file MeshGraph2D.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::SpatialDomains::MeshGraph::m_domain.
Referenced by GetEdgeBasisKey(), and GetElementsFromEdge().
ElementEdgeVectorSharedPtr Nektar::SpatialDomains::MeshGraph2D::GetElementsFromEdge | ( | Geometry1DSharedPtr | edge | ) |
Definition at line 575 of file MeshGraph2D.cpp.
References ASSERTL0, and GetElementsFromEdge().
|
inline |
Definition at line 135 of file MeshGraph2D.h.
References ASSERTL2, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
|
inline |
Definition at line 92 of file MeshGraph2D.h.
References Nektar::SpatialDomains::MeshGraph::m_segGeoms.
|
inline |
Definition at line 193 of file MeshGraph2D.h.
References ErrorUtil::efatal, Nektar::SpatialDomains::MeshGraph::m_meshComposites, and NEKERROR.
|
inline |
Definition at line 188 of file MeshGraph2D.h.
References Nektar::SpatialDomains::MeshGraph::m_meshComposites.
|
inline |
Definition at line 78 of file MeshGraph2D.h.
References Nektar::SpatialDomains::MeshGraph::m_quadGeoms.
SegGeomSharedPtr Nektar::SpatialDomains::MeshGraph2D::GetSegGeom | ( | int | eID | ) |
Definition at line 433 of file MeshGraph2D.cpp.
References ASSERTL0, Nektar::iterator, and Nektar::SpatialDomains::MeshGraph::m_segGeoms.
Referenced by ReadElements().
|
inline |
Definition at line 73 of file MeshGraph2D.h.
References Nektar::SpatialDomains::MeshGraph::m_triGeoms.
|
inline |
Definition at line 97 of file MeshGraph2D.h.
References ASSERTL2, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
|
protected |
We know we have it since we made it this far.
Look for elements in ELEMENT block.
All elements are of the form: "<C ID = "N"> ... </C>". Read the ID field first.
Parse out the element components corresponding to type of element.
Keep looking
Definition at line 346 of file MeshGraph2D.cpp.
References ASSERTL0, ErrorUtil::efatal, Nektar::SpatialDomains::MeshGraph::m_meshComposites, NEKERROR, and ResolveGeomRef().
Referenced by ReadGeometry().
|
protected |
We know we have it since we made it this far.
Look for elements in ELEMENT block.
All elements are of the form: "<E ID="#"> ... </E>", with ? being the element type. Read the ID field first.
Since all edge data is one big text block, we need to accumulate all TINYXML_TEXT data and then parse it. This approach effectively skips all comments or other node types since we only care about the edge list. We cannot handle missing edge numbers as we could with missing element numbers due to the text block format.
Now parse out the edges, three fields at a time.
Definition at line 97 of file MeshGraph2D.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ErrorUtil::efatal, Nektar::SpatialDomains::MeshGraph::GetVertex(), Nektar::iterator, Nektar::SpatialDomains::MeshGraph::m_curvedEdges, Nektar::SpatialDomains::MeshGraph::m_segGeoms, Nektar::SpatialDomains::MeshGraph::m_spaceDimension, and NEKERROR.
Referenced by ReadGeometry().
|
protected |
We know we have it since we made it this far.
Look for elements in ELEMENT block.
All elements are of the form: "<? ID="#"> ... </?>", with ? being the element type.
Read id attribute.
Read text element description.
Parse out the element components corresponding to type of element.
Create a TriGeom to hold the new definition.
Create a QuadGeom to hold the new definition.
Keep looking
Definition at line 183 of file MeshGraph2D.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ErrorUtil::efatal, Nektar::SpatialDomains::SegGeom::GetEdgeOrientation(), GetSegGeom(), Nektar::iterator, Nektar::SpatialDomains::TriGeom::kNedges, Nektar::SpatialDomains::QuadGeom::kNedges, Nektar::SpatialDomains::MeshGraph::m_curvedFaces, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, Nektar::SpatialDomains::MeshGraph::m_triGeoms, and NEKERROR.
Referenced by ReadGeometry().
|
virtual |
Read will read the meshgraph vertices given a filename.
Reimplemented from Nektar::SpatialDomains::MeshGraph.
Definition at line 62 of file MeshGraph2D.cpp.
References ASSERTL0.
Referenced by MeshGraph2D().
|
virtual |
Read will read the meshgraph vertices given a TiXmlDocument.
Look for all geometry related data in GEOMETRY block.
Error value returned by TinyXML.
Reimplemented from Nektar::SpatialDomains::MeshGraph.
Definition at line 77 of file MeshGraph2D.cpp.
References ASSERTL0, ReadComposites(), Nektar::SpatialDomains::MeshGraph::ReadCurves(), Nektar::SpatialDomains::MeshGraph::ReadDomain(), ReadEdges(), ReadElements(), and Nektar::SpatialDomains::MeshGraph::ReadGeometry().
|
protected |
Definition at line 448 of file MeshGraph2D.cpp.
References ASSERTL0, Nektar::SpatialDomains::MeshGraph::CheckRange(), ErrorUtil::efatal, ErrorUtil::ewarning, Nektar::ParseUtils::GenerateSeqVector(), Nektar::iterator, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, Nektar::SpatialDomains::MeshGraph::m_segGeoms, Nektar::SpatialDomains::MeshGraph::m_triGeoms, Nektar::SpatialDomains::MeshGraph::m_vertSet, and NEKERROR.
Referenced by ReadComposites().