Nektar++
|
#include <MeshGraphXml.h>
Public Member Functions | |
MeshGraphXml () | |
virtual | ~MeshGraphXml () |
virtual void | WriteGeometry (std::string &outfilename, bool defaultExp=false, const LibUtilities::FieldMetaDataMap &metadata=LibUtilities::NullFieldMetaDataMap) |
Write out an XML file containing the GEOMETRY block representing this MeshGraph instance inside a NEKTAR tag. More... | |
void | WriteXMLGeometry (std::string outname, std::vector< std::set< unsigned int >> elements, std::vector< unsigned int > partitions) |
virtual void | ReadGeometry (LibUtilities::DomainRangeShPtr rng, bool fillGraph) |
virtual void | PartitionMesh (LibUtilities::SessionReaderSharedPtr session) |
![]() | |
MeshGraph () | |
virtual | ~MeshGraph () |
void | Empty (int dim, int space) |
void | FillGraph () |
void | FillBoundingBoxTree () |
std::vector< int > | GetElementsContainingPoint (PointGeomSharedPtr p) |
void | ReadExpansionInfo () |
int | GetMeshDimension () |
Dimension of the mesh (can be a 1D curve in 3D space). More... | |
int | GetSpaceDimension () |
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... | |
CompositeSharedPtr | GetComposite (int whichComposite) |
GeometrySharedPtr | GetCompositeItem (int whichComposite, int whichItem) |
void | GetCompositeList (const std::string &compositeStr, CompositeMap &compositeVector) const |
std::map< int, CompositeSharedPtr > & | GetComposites () |
std::map< int, std::string > & | GetCompositesLabels () |
std::vector< std::map< int, CompositeSharedPtr > > & | GetDomain () |
std::map< int, CompositeSharedPtr > & | GetDomain (int domain) |
const ExpansionInfoMap & | GetExpansionInfo (const std::string variable="DefaultVar") |
ExpansionInfoShPtr | GetExpansionInfo (GeometrySharedPtr geom, const std::string variable="DefaultVar") |
void | SetExpansionInfo (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef) |
Sets expansions given field definitions. More... | |
void | SetExpansionInfo (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, std::vector< std::vector< LibUtilities::PointsType >> &pointstype) |
Sets expansions given field definition, quadrature points. More... | |
void | SetExpansionInfoToEvenlySpacedPoints (int npoints=0) |
Sets expansions to have equispaced points. More... | |
void | SetExpansionInfoToNumModes (int nmodes) |
Reset expansion to have specified polynomial order nmodes. More... | |
void | SetExpansionInfoToPointOrder (int npts) |
Reset expansion to have specified point order npts. More... | |
void | SetExpansionInfo (const std::string variable, ExpansionInfoMapShPtr &exp) |
This function sets the expansion #exp in map with entry #variable. More... | |
void | SetSession (LibUtilities::SessionReaderSharedPtr pSession) |
void | SetBasisKey (LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys, std::string var="DefaultVar") |
Sets the basis key for all expansions of the given shape. More... | |
void | ResetExpansionInfoToBasisKey (ExpansionInfoMapShPtr &expansionMap, LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys) |
bool | SameExpansionInfo (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 () |
PointGeomSharedPtr | GetVertex (int id) |
SegGeomSharedPtr | GetSegGeom (int id) |
CurveMap & | GetCurvedEdges () |
CurveMap & | GetCurvedFaces () |
std::map< int, PointGeomSharedPtr > & | GetAllPointGeoms () |
std::map< int, SegGeomSharedPtr > & | GetAllSegGeoms () |
TriGeomMap & | GetAllTriGeoms () |
QuadGeomMap & | GetAllQuadGeoms () |
TetGeomMap & | GetAllTetGeoms () |
PyrGeomMap & | GetAllPyrGeoms () |
PrismGeomMap & | GetAllPrismGeoms () |
HexGeomMap & | GetAllHexGeoms () |
int | GetNumElements () |
Geometry2DSharedPtr | GetGeometry2D (int gID) |
LibUtilities::BasisKey | GetEdgeBasisKey (SegGeomSharedPtr edge, const std::string variable="DefaultVar") |
GeometryLinkSharedPtr | GetElementsFromEdge (Geometry1DSharedPtr edge) |
GeometryLinkSharedPtr | GetElementsFromFace (Geometry2DSharedPtr face) |
LibUtilities::BasisKey | GetFaceBasisKey (Geometry2DSharedPtr face, const int facedir, const std::string variable="DefaultVar") |
3D functions More... | |
CompositeOrdering & | GetCompositeOrdering () |
BndRegionOrdering & | GetBndRegionOrdering () |
std::map< int, MeshEntity > | CreateMeshEntities () |
Create mesh entities for this graph. More... | |
CompositeDescriptor | CreateCompositeDescriptor () |
Static Public Member Functions | |
static MeshGraphSharedPtr | create () |
![]() | |
static MeshGraphSharedPtr | Read (const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true) |
static LibUtilities::BasisKeyVector | DefineBasisKeyFromExpansionType (GeometrySharedPtr in, ExpansionType type, const int order) |
Static Public Attributes | |
static std::string | className |
Protected Member Functions | |
virtual void | ReadVertices () |
virtual void | ReadCurves () |
void | ReadDomain () |
virtual void | ReadEdges () |
virtual void | ReadFaces () |
void | ReadElements () |
void | ReadComposites () |
virtual void | ReadElements1D () |
virtual void | ReadElements2D () |
virtual void | ReadElements3D () |
void | ResolveGeomRef (const std::string &prevToken, const std::string &token, CompositeSharedPtr &composite) |
void | ResolveGeomRef1D (const std::string &prevToken, const std::string &token, CompositeSharedPtr &composite) |
void | ResolveGeomRef2D (const std::string &prevToken, const std::string &token, CompositeSharedPtr &composite) |
void | ResolveGeomRef3D (const std::string &prevToken, const std::string &token, CompositeSharedPtr &composite) |
virtual void | WriteVertices (TiXmlElement *geomTag, PointGeomMap &verts) |
virtual void | WriteEdges (TiXmlElement *geomTag, SegGeomMap &edges) |
virtual void | WriteTris (TiXmlElement *faceTag, TriGeomMap &tris) |
virtual void | WriteQuads (TiXmlElement *faceTag, QuadGeomMap &quads) |
virtual void | WriteHexs (TiXmlElement *elmtTag, HexGeomMap &hexs) |
virtual void | WritePrisms (TiXmlElement *elmtTag, PrismGeomMap &pris) |
virtual void | WritePyrs (TiXmlElement *elmtTag, PyrGeomMap &pyrs) |
virtual void | WriteTets (TiXmlElement *elmtTag, TetGeomMap &tets) |
virtual void | WriteCurves (TiXmlElement *geomTag, CurveMap &edges, CurveMap &faces) |
void | WriteComposites (TiXmlElement *geomTag, CompositeMap &comps) |
void | WriteDomain (TiXmlElement *geomTag, std::vector< CompositeMap > &domain) |
void | WriteDefaultExpansion (TiXmlElement *root) |
CompositeOrdering | CreateCompositeOrdering () |
![]() | |
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). More... | |
ExpansionInfoMapShPtr | SetUpExpansionInfoMap () |
std::string | GetCompositeString (CompositeSharedPtr comp) |
Returns a string representation of a composite. More... | |
Additional Inherited Members | |
![]() | |
LibUtilities::SessionReaderSharedPtr | m_session |
PointGeomMap | m_vertSet |
CurveMap | m_curvedEdges |
CurveMap | m_curvedFaces |
SegGeomMap | m_segGeoms |
TriGeomMap | m_triGeoms |
QuadGeomMap | m_quadGeoms |
TetGeomMap | m_tetGeoms |
PyrGeomMap | m_pyrGeoms |
PrismGeomMap | m_prismGeoms |
HexGeomMap | m_hexGeoms |
int | m_meshDimension |
int | m_spaceDimension |
int | m_partition |
bool | m_meshPartitioned |
CompositeMap | m_meshComposites |
std::map< int, std::string > | m_compositesLabels |
std::vector< CompositeMap > | m_domain |
LibUtilities::DomainRangeShPtr | m_domainRange |
ExpansionInfoMapShPtrMap | m_expansionMapShPtrMap |
GeomInfoMap | m_geomInfo |
std::unordered_map< int, GeometryLinkSharedPtr > | m_faceToElMap |
TiXmlElement * | m_xmlGeom |
CompositeOrdering | m_compOrder |
BndRegionOrdering | m_bndRegOrder |
std::unique_ptr< GeomRTree > | m_boundingBoxTree |
Definition at line 47 of file MeshGraphXml.h.
|
inline |
Definition at line 50 of file MeshGraphXml.h.
|
inlinevirtual |
Definition at line 54 of file MeshGraphXml.h.
|
inlinestatic |
Definition at line 69 of file MeshGraphXml.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
protected |
Definition at line 3245 of file MeshGraphXml.cpp.
|
virtual |
Implements Nektar::SpatialDomains::MeshGraph.
Definition at line 61 of file MeshGraphXml.cpp.
References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), CellMLToNektar.pycml::format, Nektar::SpatialDomains::GetMeshPartitionFactory(), Nektar::LibUtilities::NullDomainRangeShPtr, and Nektar::LibUtilities::PortablePath().
|
protected |
Look for elements in ELEMENT block.
All elements are of the form: "<? ID="#"> ... </?>", with ? being the element type.
Parse out the element components corresponding to type of element.
Keep looking for additional composite definitions.
Definition at line 1856 of file MeshGraphXml.cpp.
|
protectedvirtual |
Look for elements in CURVE block.
All curves are of the form: "<? ID="#" TYPE="GLL OR other points type" NUMPOINTS="#"> ... </?>", with ? being an element type (either E or F).
These should be ordered.
Read id attribute.
Read edge id attribute.
Read text edgelement description.
Parse out the element components corresponding to type of element.
Read id attribute.
Read face id attribute.
Read text face element description.
Parse out the element components corresponding to type of element.
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 623 of file MeshGraphXml.cpp.
References ASSERTL0, Nektar::LibUtilities::Interpreter::DefineFunction(), Nektar::LibUtilities::Interpreter::Evaluate(), Nektar::StdRegions::find(), Nektar::LibUtilities::kPointsTypeStr, NEKERROR, and Nektar::LibUtilities::SIZE_PointsType.
|
protected |
Look for data in DOMAIN block.
Elements are of the form: "<D ID = "N"> ... </D>". Read the ID field first.
Keep looking
Definition at line 943 of file MeshGraphXml.cpp.
References ASSERTL0.
|
protectedvirtual |
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.
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 1038 of file MeshGraphXml.cpp.
|
protected |
Definition at line 1266 of file MeshGraphXml.cpp.
|
protectedvirtual |
Look for elements in ELEMENT block.
All elements are of the form: "<S ID = n> ... </S>", with ? being the element type.
Parse out the element components corresponding to type of element. Read two vertex numbers
Keep looking for additional segments
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 1282 of file MeshGraphXml.cpp.
|
protectedvirtual |
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
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 1360 of file MeshGraphXml.cpp.
|
protectedvirtual |
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 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
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 1506 of file MeshGraphXml.cpp.
References ASSERTL0, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTriangle, and NEKERROR.
|
protectedvirtual |
Look for elements in FACE block.
All faces are of the form: "<? ID="#"> ... </?>", with ? being an element type (either Q or T). They might be in compressed format and so then need upacking.
Read id attribute.
See if this face has curves.
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.
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 1121 of file MeshGraphXml.cpp.
|
virtual |
Error value returned by TinyXML.
Implements Nektar::SpatialDomains::MeshGraph.
Definition at line 373 of file MeshGraphXml.cpp.
References ASSERTL0.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 462 of file MeshGraphXml.cpp.
References ASSERTL0, Nektar::LibUtilities::Interpreter::DefineFunction(), and Nektar::LibUtilities::Interpreter::Evaluate().
|
protected |
Definition at line 1949 of file MeshGraphXml.cpp.
|
protected |
Definition at line 1967 of file MeshGraphXml.cpp.
|
protected |
Definition at line 2071 of file MeshGraphXml.cpp.
|
protected |
Definition at line 2226 of file MeshGraphXml.cpp.
|
protected |
Definition at line 2700 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2646 of file MeshGraphXml.cpp.
References Nektar::LibUtilities::kPointsTypeStr, and CellMLToNektar.cellml_metadata::p.
|
protected |
Definition at line 2738 of file MeshGraphXml.cpp.
|
protected |
Definition at line 2720 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2523 of file MeshGraphXml.cpp.
|
virtual |
Write out an XML file containing the GEOMETRY block representing this MeshGraph instance inside a NEKTAR tag.
Implements Nektar::SpatialDomains::MeshGraph.
Definition at line 2764 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2576 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2594 of file MeshGraphXml.cpp.
References CellMLToNektar.cellml_metadata::p.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2612 of file MeshGraphXml.cpp.
References CellMLToNektar.cellml_metadata::p.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2559 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2629 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2543 of file MeshGraphXml.cpp.
|
protectedvirtual |
Reimplemented in Nektar::SpatialDomains::MeshGraphXmlCompressed.
Definition at line 2505 of file MeshGraphXml.cpp.
void Nektar::SpatialDomains::MeshGraphXml::WriteXMLGeometry | ( | std::string | outname, |
std::vector< std::set< unsigned int >> | elements, | ||
std::vector< unsigned int > | partitions | ||
) |
Definition at line 2828 of file MeshGraphXml.cpp.
References ASSERTL0, CellMLToNektar.pycml::format, CellMLToNektar.cellml_metadata::p, and Nektar::LibUtilities::PortablePath().
|
static |
Definition at line 74 of file MeshGraphXml.h.