Nektar++
|
#include <MeshGraph1D.h>
Public Member Functions | |
MeshGraph1D () | |
MeshGraph1D (const LibUtilities::SessionReaderSharedPtr &pSession, const DomainRangeShPtr &rng=NullDomainRangeShPtr) | |
virtual | ~MeshGraph1D () |
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... | |
void | ReadElements (TiXmlDocument &doc) |
void | ReadComposites (TiXmlDocument &doc) |
void | ResolveGeomRef (const std::string &prevToken, const std::string &token, Composite &composite) |
int | GetCoordim (void) |
const SegGeomMap & | GetSeggeoms (void) const |
int | GetVidFromElmt (const int vert, const int elmt) const |
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::map< int, std::string > & | GetCompositesLabels () const |
Return a map of integers and strings containing the labels of each composite. More... | |
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 | SetExpansionsToPointOrder (int npts) |
Reset expansion to have specified point order npts. 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 PointGeomMap & | GetAllPointGeoms () 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. More... | |
template<> | |
const std::map< int, boost::shared_ptr< SegGeom > > & | GetAllElementsOfType () const |
template<> | |
const std::map< int, boost::shared_ptr< TriGeom > > & | GetAllElementsOfType () const |
template<> | |
const std::map< int, boost::shared_ptr< QuadGeom > > & | GetAllElementsOfType () const |
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 |
Definition at line 47 of file MeshGraph1D.h.
Nektar::SpatialDomains::MeshGraph1D::MeshGraph1D | ( | ) |
Definition at line 48 of file MeshGraph1D.cpp.
Nektar::SpatialDomains::MeshGraph1D::MeshGraph1D | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const DomainRangeShPtr & | rng = NullDomainRangeShPtr |
||
) |
Definition at line 52 of file MeshGraph1D.cpp.
References Nektar::SpatialDomains::MeshGraph::ReadExpansions(), and ReadGeometry().
|
virtual |
Definition at line 60 of file MeshGraph1D.cpp.
|
inline |
Definition at line 62 of file MeshGraph1D.h.
References Nektar::SpatialDomains::MeshGraph::GetSpaceDimension().
|
inline |
Definition at line 67 of file MeshGraph1D.h.
References Nektar::SpatialDomains::MeshGraph::m_segGeoms.
|
inline |
Definition at line 72 of file MeshGraph1D.h.
References ASSERTL2, and Nektar::SpatialDomains::MeshGraph::m_segGeoms.
void Nektar::SpatialDomains::MeshGraph1D::ReadComposites | ( | TiXmlDocument & | doc | ) |
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.
Parse out the element components corresponding to type of element.
Keep looking for additional composite definitions.
Definition at line 231 of file MeshGraph1D.cpp.
References ASSERTL0, ErrorUtil::efatal, Nektar::SpatialDomains::MeshGraph::m_meshComposites, NEKERROR, and ResolveGeomRef().
Referenced by ReadGeometry().
void Nektar::SpatialDomains::MeshGraph1D::ReadElements | ( | TiXmlDocument & | doc | ) |
We know we have it since we made it this far.
Look for elements in ELEMENT block.
All elements are of the form: "<S ID = n> ... </S>", with ? being the element type.
See if this face has curves.
Parse out the element components corresponding to type of element. Read two vertex numbers
Keep looking for additional segments
Definition at line 99 of file MeshGraph1D.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ErrorUtil::efatal, Nektar::LibUtilities::CompressData::GetCompressString(), Nektar::SpatialDomains::MeshGraph::GetVertex(), Nektar::iterator, Nektar::SpatialDomains::MeshGraph::m_curvedEdges, Nektar::SpatialDomains::MeshGraph::m_segGeoms, Nektar::SpatialDomains::MeshGraph::m_spaceDimension, NEKERROR, and Nektar::LibUtilities::CompressData::ZlibDecodeFromBase64Str().
Referenced by ReadGeometry().
|
virtual |
Read will read the meshgraph vertices given a filename.
Reimplemented from Nektar::SpatialDomains::MeshGraph.
Definition at line 65 of file MeshGraph1D.cpp.
References ASSERTL0.
Referenced by MeshGraph1D().
|
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 80 of file MeshGraph1D.cpp.
References ASSERTL0, ReadComposites(), Nektar::SpatialDomains::MeshGraph::ReadCurves(), Nektar::SpatialDomains::MeshGraph::ReadDomain(), ReadElements(), and Nektar::SpatialDomains::MeshGraph::ReadGeometry().
void Nektar::SpatialDomains::MeshGraph1D::ResolveGeomRef | ( | const std::string & | prevToken, |
const std::string & | token, | ||
Composite & | composite | ||
) |
Definition at line 326 of file MeshGraph1D.cpp.
References ASSERTL0, ErrorUtil::efatal, ErrorUtil::ewarning, Nektar::ParseUtils::GenerateSeqVector(), Nektar::iterator, Nektar::SpatialDomains::MeshGraph::m_segGeoms, Nektar::SpatialDomains::MeshGraph::m_vertSet, and NEKERROR.
Referenced by ReadComposites().