Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
HDF5Export_decl.hpp
1#ifndef HDF5EXPORT_DECL_hpp
2#define HDF5EXPORT_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#include <Epetra_Vector.h>
22#include <Epetra_LongLongVector.h>
23#include <Epetra_IntVector.h>
24
25#include <EpetraExt_HDF5.h>
26#include <hdf5.h>
27
42
43namespace FEDD {
44template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
46public:
47 typedef Teuchos::RCP<Epetra_Map> EpetraMapPtr_Type;
48 typedef Teuchos::RCP<Epetra_MultiVector> EpetraMVPtr_Type;
49
50 typedef EpetraExt::HDF5 HDF5_Type;
51 typedef Teuchos::RCP<HDF5_Type> HDF5Ptr_Type;
52
53 typedef Teuchos::Comm<int> Comm_Type;
54 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
55
56 typedef Map<LO,GO,NO> Map_Type;
57 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
58
59 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
60 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
61 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
62
66 HDF5Export(MapConstPtr_Type writeMap, std::string outputFilename);
67
71 void writeVariablesHDF5(std::string varName,MultiVectorConstPtr_Type writeVector);
72
74 void closeExporter();
75
76protected:
77
78 HDF5Ptr_Type hdf5exporter_;
79 CommConstPtr_Type comm_;
80 Teuchos::RCP<Epetra_MpiComm> commEpetra_;
81
82 // ------------------------
83 // READ
84 // ------------------------
85 std::string outputFilename_;
86 std::vector<std::string> varNamesRead_;
87 EpetraMapPtr_Type writeMap_;
88
89};
90
91}
92
93#endif
void closeExporter()
Closing Exporter.
Definition HDF5Export_def.hpp:62
HDF5Export(MapConstPtr_Type writeMap, std::string outputFilename)
Constructor for HDF5 Exporter.
Definition HDF5Export_def.hpp:10
void writeVariablesHDF5(std::string varName, MultiVectorConstPtr_Type writeVector)
Exporting MultiVector writeVector as HDF5 File with the variable name varName.
Definition HDF5Export_def.hpp:40
Definition Map_decl.hpp:36
Definition MultiVector_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5