Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
HDF5Import_decl.hpp
1#ifndef HDF5IMPORT_DECL_hpp
2#define HDF5IMPORT_DECL_hpp
3
4#include <fstream>
5#include "feddlib/core/FEDDCore.hpp"
6#include "feddlib/core/LinearAlgebra/MultiVector.hpp"
7// Trilinos
8#include <Teuchos_Array.hpp>
9
10#include <hdf5.h>
11#include "HDF5Toolbox_decl.hpp"
12
13
23
24namespace FEDD {
25template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
27public:
28
29 typedef HDF5Toolbox<SC,LO,GO,NO> HDF5_Type;
30 typedef Teuchos::RCP<HDF5_Type> HDF5Ptr_Type;
31
32 typedef Teuchos::Comm<int> Comm_Type;
33 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
34
35 typedef Map<LO,GO,NO> Map_Type;
36 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
37 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
38
39 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
40 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
41
42
46 HDF5Import(MapConstPtr_Type readMap, std::string inputFilename);
47
51 MultiVectorPtr_Type readVariablesHDF5(std::string varName);
52
53 // Closing Importer
54 void closeImporter();
55
56 protected:
57
59 HDF5Ptr_Type hdf5importer_;
60 CommConstPtr_Type comm_;
61
62 // ------------------------
63 // READ
64 // ------------------------
66 std::string inputFilename_;
68 MapConstPtr_Type readMap_;
70 MultiVectorPtr_Type u_import_Tpetra_;
71
72};
73
74}
75
76#endif
MultiVectorPtr_Type readVariablesHDF5(std::string varName)
Reading a variable 'varName' from the inputFile with inputFilename of file type HDF5.
Definition HDF5Import_def.hpp:36
std::string inputFilename_
Name of input file.
Definition HDF5Import_decl.hpp:66
MultiVectorPtr_Type u_import_Tpetra_
Imported file in Tpetra format.
Definition HDF5Import_decl.hpp:70
HDF5Import(MapConstPtr_Type readMap, std::string inputFilename)
Constructor of HDF import. Here the general setting are defined. An tpetra map build based on the rea...
Definition HDF5Import_def.hpp:17
MapConstPtr_Type readMap_
Name of Map of import multivector.
Definition HDF5Import_decl.hpp:68
HDF5Ptr_Type hdf5importer_
HDF5 importer based on HDF5Toolbox.
Definition HDF5Import_decl.hpp:59
This class contains the features we use from EpteraExt::HDF5, but we transition it to Tpetra.
Definition HDF5Toolbox_decl.hpp:28
Definition Map_decl.hpp:30
Definition MultiVector_decl.hpp:61
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36