36 #ifndef NEKTAR_SPATIALDOMAINS_MGHDF5_H
37 #define NEKTAR_SPATIALDOMAINS_MGHDF5_H
45 namespace SpatialDomains
68 std::string &outfilename,
bool defaultExp =
false,
78 const std::unordered_set<int> &readIds);
84 std::string datasetName);
86 template <
class T,
typename DataType>
89 const std::unordered_set<int> &readIds,
90 std::vector<int> &ids,
91 std::vector<DataType> &geomData);
92 template <
class T,
typename DataType>
93 void FillGeomMap(std::map<
int, std::shared_ptr<T>> &geomMap,
94 const CurveMap &curveMap, std::vector<int> &ids,
95 std::vector<DataType> &geomData);
96 template <
class T,
typename DataType>
101 std::unordered_map<int, int> &id2row);
108 void WriteDomain(std::map<int, CompositeMap> &domain);
#define SPATIAL_DOMAINS_EXPORT
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
virtual void v_PartitionMesh(LibUtilities::SessionReaderSharedPtr session) override
Partition the mesh.
void ReadCurveMap(CurveMap &curveMap, std::string dsName, const std::unordered_set< int > &readIds)
void FillGeomMap(std::map< int, std::shared_ptr< T >> &geomMap, const CurveMap &curveMap, std::vector< int > &ids, std::vector< DataType > &geomData)
static const unsigned int FORMAT_VERSION
Version of the Nektar++ HDF5 geometry format, which is embedded into the main NEKTAR/GEOMETRY group a...
static std::string className
virtual void v_ReadGeometry(LibUtilities::DomainRangeShPtr rng, bool fillGraph) override
void WriteComposites(CompositeMap &comps)
virtual void v_WriteGeometry(std::string &outfilename, bool defaultExp=false, const LibUtilities::FieldMetaDataMap &metadata=LibUtilities::NullFieldMetaDataMap) override
void WriteGeometryMap(std::map< int, std::shared_ptr< T >> &geomMap, std::string datasetName)
static std::string cmdSwitch
void ConstructGeomObject(std::map< int, std::shared_ptr< T >> &geomMap, int id, DataType *data, CurveSharedPtr curve)
void WriteCurvePoints(MeshCurvedPts &curvedPts)
LibUtilities::H5::GroupSharedPtr m_maps
static MeshGraphSharedPtr create()
LibUtilities::H5::PListSharedPtr m_readPL
unsigned int m_inFormatVersion
LibUtilities::H5::FileSharedPtr m_file
void WriteDomain(std::map< int, CompositeMap > &domain)
LibUtilities::H5::GroupSharedPtr m_mesh
void WriteCurveMap(CurveMap &curves, std::string dsName, MeshCurvedPts &curvedPts, int &ptOffset, int &newIdx)
void ReadGeometryData(std::map< int, std::shared_ptr< T >> &geomMap, std::string dataSet, const std::unordered_set< int > &readIds, std::vector< int > &ids, std::vector< DataType > &geomData)
Base class for a spectral/hp element mesh.
CompositeDescriptor CreateCompositeDescriptor()
std::shared_ptr< PList > PListSharedPtr
std::shared_ptr< File > FileSharedPtr
std::shared_ptr< Group > GroupSharedPtr
std::map< std::string, std::string > FieldMetaDataMap
std::shared_ptr< SessionReader > SessionReaderSharedPtr
static FieldMetaDataMap NullFieldMetaDataMap
std::shared_ptr< DomainRange > DomainRangeShPtr
std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > CompositeDescriptor
std::shared_ptr< Curve > CurveSharedPtr
std::unordered_map< int, CurveSharedPtr > CurveMap
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::map< int, CompositeSharedPtr > CompositeMap
The above copyright notice and this permission notice shall be included.