44class ExporterParaView {
46 typedef std::vector<double> vec_dbl;
47 typedef std::vector<std::vector<double> > vec2D_dbl;
48 typedef std::vector<std::vector<int> > vec2D_int;
49 typedef std::vector<std::vector<long long> > vec2D_longlong;
50 typedef Teuchos::RCP<std::vector<int> > vec_int_ptr;
51 typedef Teuchos::RCP<std::vector<long long> > vec_longlong_ptr;
52 typedef Teuchos::RCP<vec_dbl> vec_dbl_ptr;
53 typedef Teuchos::RCP<std::vector<std::vector<double> > > vec2D_dbl_ptr;
54 typedef Teuchos::RCP<std::vector<std::vector<int> > > vec2D_int_ptr;
55 typedef Teuchos::RCP<vec2D_longlong > vec2D_longlong_ptr;
56 typedef Teuchos::RCP<Epetra_Vector> EpetraVec_ptr;
57 typedef Teuchos::RCP<Epetra_MpiComm> EpetraComm_ptr;
58 typedef Teuchos::RCP<Epetra_IntVector> EpetraVecInt_ptr;
59 typedef Teuchos::RCP<Epetra_LongLongVector> EpetraVecLongLong_ptr;
60 typedef Teuchos::RCP<Epetra_MultiVector> EpetraMVPtr_Type;
61 typedef Teuchos::RCP<Epetra_Map> EpetraMapPtr_Type;
64 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
65 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
68 typedef EpetraExt::HDF5 HDF5_Type;
69 typedef Teuchos::RCP<HDF5_Type> HDF5Ptr_Type;
71 typedef Teuchos::Comm<int> Comm_Type;
72 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
73 typedef const Teuchos::RCP<const Comm_Type> CommConstPtrConst_Type;
76 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
77 typedef const MapConstPtr_Type MapConstPtrConst_Type;
80 typedef Teuchos::RCP<const MultiVec_Type> MultiVecConstPtr_Type;
81 typedef const MultiVecConstPtr_Type MultiVecConstPtrConst_Type;
84 typedef Teuchos::RCP<Mesh_Type> MeshPtr_Type;
86 typedef typename Mesh_Type::ElementsPtr_Type ElementsPtr_Type;
90 void setup(std::string filename,
93 ParameterListPtr_Type parameterList=Teuchos::null);
95 void setup(std::string filename,
99 ParameterListPtr_Type parameterList=Teuchos::null);
125 void addVariable(MultiVecConstPtr_Type &u,
129 MapConstPtrConst_Type& mapUnique=Teuchos::null);
131 void save(
double time);
133 void save(
double time,
double dt);
135 void closeExporter();
137 void writeVariablesHDF5();
141 void writeMeshElements( std::string nameConn );
143 void writeMeshPointsHDF5();
145 void writeMeshPoints(std::string nameP_X,
147 std::string nameP_Z );
156 void writeXmf(
double time);
158 void writeXmfElements(std::string nameConn,
double time);
160 void writeXmfPoints(std::string nameP_X,
162 std::string nameP_Z);
164 void writeXmfVariables();
166 void writeXmfTime(
double time,
double dt);
168 void prepareVectorField(MultiVecConstPtr_Type &u,
169 EpetraMVPtr_Type &u_export,
172 void prepareScalar(MultiVecConstPtr_Type &u,
173 EpetraMVPtr_Type &u_export)
const;
179 HDF5Ptr_Type hdf5exporter_;
180 CommConstPtr_Type comm_;
181 Teuchos::RCP<Epetra_MpiComm> commEpetra_;
183 std::streampos closingLinesPosition_;
184 std::streampos closingLinesPositionTimes_;
185 std::string closingLines_;
186 std::ofstream xmf_out_;
187 std::ofstream xmf_times_out_;
188 std::string filename_;
189 std::string outputFilename_;
190 std::string postfix_;
194 std::vector<MultiVecConstPtr_Type> variables_;
195 std::vector<EpetraMapPtr_Type > uniqueMaps_;
196 std::vector<std::string> varNames_;
197 std::vector<std::string> varTypes_;
198 std::vector<int> varDofPerNode_;
199 EpetraMVPtr_Type pointsHDF_;
200 EpetraVecInt_ptr elementsHDF_;
205 GO nmbExportValuesGlob_;
206 int nmbPointsPerElement_;
211 ParameterListPtr_Type parameterList_;
212 vec2D_dbl_ptr pointsUnique_;
216 MapConstPtr_Type mapUniqueVariables_;