Finite Element Domain Decomposition Library
FEDDLib
Toggle main menu visibility
Loading...
Searching...
No Matches
HDF5Export_def.hpp
1
#ifndef HDF5EXPORT_DEF_hpp
2
#define HDF5EXPORT_DEF_hpp
3
4
namespace
FEDD
{
5
6
template
<
class
SC,
class
LO,
class
GO,
class
NO>
7
HDF5Export<SC,LO,GO,NO>::HDF5Export
(MapConstPtr_Type writeMap, std::string outputFilename):
8
hdf5exporter_(),
9
comm_()
10
{
11
12
Teuchos::RCP<const Teuchos::MpiComm<int> > mpiComm = Teuchos::rcp_dynamic_cast<const Teuchos::MpiComm<int> >( writeMap->getComm() );
13
14
hdf5exporter_.reset(
new
HDF5_Type(mpiComm) );
// Building HDF5 Exporter
15
16
hdf5exporter_->create(outputFilename+
".h5"
);
// Creating output file with the 'outoutFilename'
17
18
outputFilename_ = outputFilename;
19
}
20
21
template
<
class
SC,
class
LO,
class
GO,
class
NO>
22
void
HDF5Export<SC,LO,GO,NO>::writeVariablesHDF5
(std::string varName,
const
MultiVectorConstPtr_Type writeVector){
23
24
hdf5exporter_->write(varName,writeVector);
// Writing u_export as variable 'varName' in file
25
26
if
(writeVector->getMap()->getComm()->getRank() == 0 )
27
std::cout <<
" HDF5_Export:: Exporting to file "
<< outputFilename_ <<
" with variable name "
<< varName << std::endl;
28
29
hdf5exporter_->flush();
30
31
}
32
33
template
<
class
SC,
class
LO,
class
GO,
class
NO>
34
void
HDF5Export<SC,LO,GO,NO>::closeExporter
(){
35
hdf5exporter_->close();
36
}
37
38
39
}
40
#endif
FEDD::HDF5Export::closeExporter
void closeExporter()
Closing Exporter.
Definition
HDF5Export_def.hpp:34
FEDD::HDF5Export::HDF5Export
HDF5Export(MapConstPtr_Type writeMap, std::string outputFilename)
Constructor for HDF5 Exporter.
Definition
HDF5Export_def.hpp:7
FEDD::HDF5Export::writeVariablesHDF5
void writeVariablesHDF5(std::string varName, const MultiVectorConstPtr_Type writeVector)
Exporting MultiVector writeVector as HDF5 File with the variable name varName.
Definition
HDF5Export_def.hpp:22
FEDD
Adaptive Mesh Refinement.
Definition
AdaptiveMeshRefinement_decl.hpp:36
feddlib
core
General
HDF5Export_def.hpp
Generated by
1.17.0