36 #ifndef NEKTAR_SPATIALDOMAINS_MGHDF5_H
37 #define NEKTAR_SPATIALDOMAINS_MGHDF5_H
45 namespace SpatialDomains
56 std::string &outfilename,
57 bool defaultExp =
false,
84 const std::unordered_set<int> &readIds);
90 std::string datasetName);
93 std::map<
int, std::shared_ptr<T>> &geomMap,
95 const std::unordered_set<int> &readIds,
96 std::vector<int> &ids,
97 std::vector<DataType> &geomData);
98 template<
class T,
typename DataType>
void FillGeomMap(
99 std::map<
int, std::shared_ptr<T>> &geomMap,
101 std::vector<int> &ids,
102 std::vector<DataType> &geomData);
104 std::map<
int, std::shared_ptr<T>> &geomMap,
int id,
108 std::unordered_map<int, int> &id2row);
118 void WriteDomain(std::vector<CompositeMap> &domain);
#define SPATIAL_DOMAINS_EXPORT
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
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)
virtual void PartitionMesh(LibUtilities::SessionReaderSharedPtr session)
Partition the mesh.
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
void WriteComposites(CompositeMap &comps)
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
LibUtilities::H5::FileSharedPtr m_file
virtual void WriteGeometry(std::string &outfilename, bool defaultExp=false, const LibUtilities::FieldMetaDataMap &metadata=LibUtilities::NullFieldMetaDataMap)
void WriteDomain(std::vector< 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)
virtual void ReadGeometry(LibUtilities::DomainRangeShPtr rng, bool fillGraph)
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::map< int, CompositeSharedPtr > CompositeMap
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
The above copyright notice and this permission notice shall be included.