Nektar++
|
#include <MeshGraph3D.h>
Public Member Functions | |
MeshGraph3D () | |
MeshGraph3D (const LibUtilities::SessionReaderSharedPtr &pSession, const DomainRangeShPtr &rng=NullDomainRangeShPtr) | |
virtual | ~MeshGraph3D () |
void | ReadGeometry (const std::string &infilename) |
Read will read the meshgraph vertices given a filename. | |
void | ReadGeometry (TiXmlDocument &doc) |
Read will read the meshgraph vertices given a TiXmlDocument. | |
SegGeomSharedPtr | GetSegGeom (int eID) |
Geometry2DSharedPtr | GetGeometry2D (int gID) |
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) |
ElementFaceVectorSharedPtr | GetElementsFromFace (Geometry2DSharedPtr face) |
Return the elements (shared ptrs) that have this face. | |
LibUtilities::BasisKey | GetFaceBasisKey (Geometry2DSharedPtr face, const int flag, const std::string variable="DefaultVar") |
Return the BasisKey corresponding to a face of an element. | |
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. | |
void | ReadGeometryInfo (TiXmlDocument &doc) |
Read geometric information from an XML document. | |
void | ReadExpansions (const std::string &infilename) |
Read the expansions given the XML file path. | |
void | ReadExpansions (TiXmlDocument &doc) |
Read the expansions given the XML document reference. | |
void | ReadDomain (TiXmlDocument &doc) |
void | ReadCurves (TiXmlDocument &doc) |
void | ReadCurves (std::string &infilename) |
int | GetMeshDimension () const |
Dimension of the mesh (can be a 1D curve in 3D space). | |
int | GetSpaceDimension () const |
Dimension of the space (can be a 1D curve in 3D space). | |
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. | |
bool | CheckRange (Geometry3D &geom) |
Check if goemetry is in range definition if activated. | |
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. | |
void | SetExpansions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, std::vector< std::vector< LibUtilities::PointsType > > &pointstype) |
Sets expansions given field definition, quadrature points. | |
void | SetExpansionsToEvenlySpacedPoints (int npoints=0) |
Sets expansions to have equispaced points. | |
void | SetExpansions (const std::string variable, ExpansionMapShPtr &exp) |
This function sets the expansion #exp in map with entry #variable. | |
void | SetBasisKey (LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys, std::string var="DefaultVar") |
Sets the basis key for all expansions of the given shape. | |
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. | |
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. | |
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 CurveVector & | GetCurvedEdges () const |
const CurveVector & | GetCurvedFaces () const |
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. |
Protected Member Functions | |
void | ReadEdges (TiXmlDocument &doc) |
void | ReadFaces (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) |
Private Member Functions | |
void | PopulateFaceToElMap (Geometry3DSharedPtr element, int kNfaces) |
Given a 3D geometry object #element, populate the face to element map m_faceToElMap which maps faces to their corresponding element(s). |
Private Attributes | |
boost::unordered_map< int, ElementFaceVectorSharedPtr > | m_faceToElMap |
Definition at line 55 of file MeshGraph3D.h.
Nektar::SpatialDomains::MeshGraph3D::MeshGraph3D | ( | ) |
Definition at line 46 of file MeshGraph3D.cpp.
Nektar::SpatialDomains::MeshGraph3D::MeshGraph3D | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const DomainRangeShPtr & | rng = NullDomainRangeShPtr |
||
) |
Definition at line 50 of file MeshGraph3D.cpp.
References Nektar::SpatialDomains::MeshGraph::ReadExpansions(), and ReadGeometry().
|
virtual |
Definition at line 58 of file MeshGraph3D.cpp.
void Nektar::SpatialDomains::MeshGraph3D::GenXGeoFac | ( | ) |
|
inline |
Definition at line 147 of file MeshGraph3D.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 MeshGraph3D.h.
References Nektar::SpatialDomains::MeshGraph::GetSpaceDimension().
|
inline |
Definition at line 109 of file MeshGraph3D.h.
References ASSERTL2, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
ElementFaceVectorSharedPtr Nektar::SpatialDomains::MeshGraph3D::GetElementsFromFace | ( | Geometry2DSharedPtr | face | ) |
Return the elements (shared ptrs) that have this face.
Definition at line 986 of file MeshGraph3D.cpp.
References ASSERTL0, Nektar::iterator, and m_faceToElMap.
Referenced by GetFaceBasisKey().
|
inline |
Definition at line 128 of file MeshGraph3D.h.
References ASSERTL2, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
LibUtilities::BasisKey Nektar::SpatialDomains::MeshGraph3D::GetFaceBasisKey | ( | Geometry2DSharedPtr | face, |
const int | facedir, | ||
const std::string | variable = "DefaultVar" |
||
) |
Return the BasisKey corresponding to a face of an element.
Retrieve the basis key for a given face direction.
Definition at line 999 of file MeshGraph3D.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eModified_C, Nektar::LibUtilities::eOrtho_A, Nektar::LibUtilities::eOrtho_B, Nektar::SpatialDomains::Geometry3D::GetDir(), GetElementsFromFace(), Nektar::SpatialDomains::MeshGraph::GetExpansion(), and Nektar::LibUtilities::NullBasisKey().
Geometry2DSharedPtr Nektar::SpatialDomains::MeshGraph3D::GetGeometry2D | ( | int | gID | ) |
Definition at line 733 of file MeshGraph3D.cpp.
References Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
Referenced by ReadElements(), and ResolveGeomRef().
|
inline |
Definition at line 85 of file MeshGraph3D.h.
References Nektar::SpatialDomains::MeshGraph::m_segGeoms.
|
inline |
Definition at line 186 of file MeshGraph3D.h.
References ErrorUtil::efatal, Nektar::SpatialDomains::MeshGraph::m_meshComposites, and NEKERROR.
|
inline |
Definition at line 181 of file MeshGraph3D.h.
References Nektar::SpatialDomains::MeshGraph::m_meshComposites.
|
inline |
Definition at line 78 of file MeshGraph3D.h.
References Nektar::SpatialDomains::MeshGraph::m_quadGeoms.
SegGeomSharedPtr Nektar::SpatialDomains::MeshGraph3D::GetSegGeom | ( | int | eID | ) |
Definition at line 724 of file MeshGraph3D.cpp.
References ASSERTL0, Nektar::iterator, and Nektar::SpatialDomains::MeshGraph::m_segGeoms.
Referenced by ReadFaces().
|
inline |
Definition at line 73 of file MeshGraph3D.h.
References Nektar::SpatialDomains::MeshGraph::m_triGeoms.
|
inline |
Definition at line 90 of file MeshGraph3D.h.
References ASSERTL2, Nektar::LibUtilities::eTriangle, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, and Nektar::SpatialDomains::MeshGraph::m_triGeoms.
|
private |
Given a 3D geometry object #element, populate the face to element map m_faceToElMap which maps faces to their corresponding element(s).
element | Element to process. |
kNfaces | Number of faces of #element. Should be removed and put into Geometry3D as a virtual member function. |
Definition at line 1152 of file MeshGraph3D.cpp.
References Nektar::iterator, and m_faceToElMap.
Referenced by ReadElements().
|
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 636 of file MeshGraph3D.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 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 98 of file MeshGraph3D.cpp.
References ASSERTL0, ErrorUtil::efatal, Nektar::SpatialDomains::MeshGraph::GetVertex(), 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.
These should be ordered.
Read id attribute.
Read text element description.
Parse out the element components corresponding to type of element.
Create arrays for the tri and quad faces.
Fill the arrays and make sure there aren't too many faces.
Make sure all of the face indicies could be read, and that there weren't too few.
Create arrays for the tri and quad faces.
Fill the arrays and make sure there aren't too many faces.
Make sure all of the face indicies could be read, and that there weren't too few.
Create arrays for the tri and quad faces.
Fill the arrays and make sure there aren't too many faces.
Make sure all of the face indicies could be read, and that there weren't too few.
Create arrays for the tri and quad faces.
Fill the arrays and make sure there aren't too many faces.
Make sure all of the face indicies could be read, and that there weren't too few.
Keep looking
Definition at line 338 of file MeshGraph3D.cpp.
References ASSERTL0, ErrorUtil::efatal, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTriangle, GetGeometry2D(), Nektar::SpatialDomains::TetGeom::kNfaces, Nektar::SpatialDomains::PyrGeom::kNfaces, Nektar::SpatialDomains::PrismGeom::kNfaces, Nektar::SpatialDomains::HexGeom::kNfaces, Nektar::SpatialDomains::TetGeom::kNqfaces, Nektar::SpatialDomains::PyrGeom::kNqfaces, Nektar::SpatialDomains::PrismGeom::kNqfaces, Nektar::SpatialDomains::HexGeom::kNqfaces, Nektar::SpatialDomains::TetGeom::kNtfaces, Nektar::SpatialDomains::PyrGeom::kNtfaces, Nektar::SpatialDomains::PrismGeom::kNtfaces, Nektar::SpatialDomains::HexGeom::kNtfaces, Nektar::SpatialDomains::MeshGraph::m_hexGeoms, Nektar::SpatialDomains::MeshGraph::m_prismGeoms, Nektar::SpatialDomains::MeshGraph::m_pyrGeoms, Nektar::SpatialDomains::MeshGraph::m_tetGeoms, NEKERROR, and PopulateFaceToElMap().
Referenced by ReadGeometry().
|
protected |
We know we have it since we made it this far.
Look for elements in FACE block.
All faces are of the form: "<? ID="#"> ... </?>", with ? being an element type (either Q or T).
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 185 of file MeshGraph3D.cpp.
References ASSERTL0, ErrorUtil::efatal, Nektar::SpatialDomains::SegGeom::GetEdgeOrientation(), GetSegGeom(), 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 MeshGraph3D.cpp.
References ASSERTL0.
Referenced by MeshGraph3D(), and ReadGeometry().
|
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 MeshGraph3D.cpp.
References ASSERTL0, ReadComposites(), Nektar::SpatialDomains::MeshGraph::ReadCurves(), Nektar::SpatialDomains::MeshGraph::ReadDomain(), ReadEdges(), ReadElements(), ReadFaces(), and ReadGeometry().
|
protected |
Definition at line 755 of file MeshGraph3D.cpp.
References ASSERTL0, Nektar::SpatialDomains::MeshGraph::CheckRange(), ErrorUtil::efatal, ErrorUtil::ewarning, Nektar::ParseUtils::GenerateSeqVector(), GetGeometry2D(), Nektar::iterator, Nektar::SpatialDomains::MeshGraph::m_hexGeoms, Nektar::SpatialDomains::MeshGraph::m_prismGeoms, Nektar::SpatialDomains::MeshGraph::m_pyrGeoms, Nektar::SpatialDomains::MeshGraph::m_quadGeoms, Nektar::SpatialDomains::MeshGraph::m_segGeoms, Nektar::SpatialDomains::MeshGraph::m_tetGeoms, Nektar::SpatialDomains::MeshGraph::m_triGeoms, Nektar::SpatialDomains::MeshGraph::m_vertSet, and NEKERROR.
Referenced by ReadComposites().
|
private |
Definition at line 220 of file MeshGraph3D.h.
Referenced by GetElementsFromFace(), and PopulateFaceToElMap().