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 <Epetra_ConfigDefs.h>
11#ifdef HAVE_MPI
12#include <mpi.h>
13#include <Epetra_MpiComm.h>
14#include <Epetra_SerialComm.h>
15#else
16#include <Epetra_SerialComm.h>
17#endif
18
19#include <Epetra_Map.h>
20#include <Epetra_MultiVector.h>
21
22#include <EpetraExt_HDF5.h>
23#include <hdf5.h>
24
34
35namespace FEDD {
36template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
38public:
39 typedef Teuchos::RCP<Epetra_Map> EpetraMapPtr_Type;
40
41 typedef EpetraExt::HDF5 HDF5_Type;
42 typedef Teuchos::RCP<HDF5_Type> HDF5Ptr_Type;
43
44 typedef Teuchos::Comm<int> Comm_Type;
45 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
46
47 typedef Map<LO,GO,NO> Map_Type;
48 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
49
50 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
51 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
52
53
57 HDF5Import(MapConstPtr_Type readMap, std::string inputFilename);
58
62 MultiVectorPtr_Type readVariablesHDF5(std::string varName);
63
64 // Closing Importer
65 void closeImporter();
66
67 protected:
68
70 HDF5Ptr_Type hdf5importer_;
71 CommConstPtr_Type comm_;
72 Teuchos::RCP<Epetra_MpiComm> commEpetra_;
73
74 // ------------------------
75 // READ
76 // ------------------------
78 std::string inputFilename_;
80 EpetraMapPtr_Type readMap_;
82 Epetra_MultiVector* u_import_Epetra_;
84 MultiVectorPtr_Type u_import_Tpetra_;
85
86};
87
88}
89
90#endif
EpetraMapPtr_Type readMap_
Name of Map of import multivector.
Definition HDF5Import_decl.hpp:80
MultiVectorPtr_Type readVariablesHDF5(std::string varName)
Reading a variable 'varName' from the inputFile with inputFilename of file type HDF5.
Definition HDF5Import_def.hpp:51
std::string inputFilename_
Name of input file.
Definition HDF5Import_decl.hpp:78
Epetra_MultiVector * u_import_Epetra_
Imported MultiVector in Epetra format.
Definition HDF5Import_decl.hpp:82
MultiVectorPtr_Type u_import_Tpetra_
Imported file in Xpetra format.
Definition HDF5Import_decl.hpp:84
HDF5Import(MapConstPtr_Type readMap, std::string inputFilename)
Constructor of HDF import. Here the general setting are defined. An epetra map build based on the rea...
Definition HDF5Import_def.hpp:19
HDF5Ptr_Type hdf5importer_
HDF5 importer based on EpetraExt HDF5 importer.
Definition HDF5Import_decl.hpp:70
Definition Map_decl.hpp:36
Definition MultiVector_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5