1#ifndef HDF5IMPORT_DEF_hpp
2#define HDF5IMPORT_DEF_hpp
4#include "HDF5Import_decl.hpp"
18template<
class SC,
class LO,
class GO,
class NO>
24 Teuchos::RCP<const Teuchos::MpiComm<int> > mpiComm = Teuchos::rcp_dynamic_cast<const Teuchos::MpiComm<int> >( readMap->getComm() );
25 commEpetra_.reset(
new Epetra_MpiComm( *mpiComm->getRawMpiComm() ) );
28 Teuchos::ArrayView< const GO > indices = readMap->getNodeElementList();
29 int* intGlobIDs =
new int[indices.size()];
30 for (
int i=0; i<indices.size(); i++) {
31 intGlobIDs[i] = (int) indices[i];
34 int nmbPointsGlob = readMap->getGlobalNumElements();
36 EpetraMapPtr_Type mapEpetra = Teuchos::rcp(
new Epetra_Map((
int)nmbPointsGlob,indices.size(),intGlobIDs,0,*commEpetra_));
50template<
class SC,
class LO,
class GO,
class NO>
53 TEUCHOS_TEST_FOR_EXCEPTION( !
hdf5importer_->IsContained(varName), std::logic_error,
"Requested varName: " << varName <<
" not contained in hdf file "<<
inputFilename_ <<
".h5.");
67template<
class SC,
class LO,
class GO,
class NO>
68void HDF5Import<SC,LO,GO,NO>::closeImporter(){
69 hdf5importer_->Close();
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
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5