30class ExporterParaView {
32 typedef std::vector<double> vec_dbl;
33 typedef std::vector<std::vector<double> > vec2D_dbl;
34 typedef std::vector<std::vector<int> > vec2D_int;
35 typedef std::vector<std::vector<long long> > vec2D_longlong;
36 typedef Teuchos::RCP<std::vector<int> > vec_int_ptr;
37 typedef Teuchos::RCP<std::vector<long long> > vec_longlong_ptr;
38 typedef Teuchos::RCP<vec_dbl> vec_dbl_ptr;
39 typedef Teuchos::RCP<std::vector<std::vector<double> > > vec2D_dbl_ptr;
40 typedef Teuchos::RCP<std::vector<std::vector<int> > > vec2D_int_ptr;
41 typedef Teuchos::RCP<vec2D_longlong > vec2D_longlong_ptr;
44 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
45 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
48 typedef Teuchos::RCP<HDF5_Type> HDF5Ptr_Type;
50 typedef Teuchos::Comm<int> Comm_Type;
51 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
52 typedef const Teuchos::RCP<const Comm_Type> CommConstPtrConst_Type;
55 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
56 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
57 typedef const MapConstPtr_Type MapConstPtrConst_Type;
60 typedef Teuchos::RCP<const MultiVec_Type> MultiVecConstPtr_Type;
61 typedef const MultiVecConstPtr_Type MultiVecConstPtrConst_Type;
64 typedef Teuchos::RCP<Mesh_Type> MeshPtr_Type;
66 typedef typename Mesh_Type::ElementsPtr_Type ElementsPtr_Type;
70 void setup(std::string filename,
73 ParameterListPtr_Type parameterList=Teuchos::null);
75 void setup(std::string filename,
79 ParameterListPtr_Type parameterList=Teuchos::null);
105 void addVariable(MultiVecConstPtr_Type &u,
109 MapConstPtrConst_Type& mapUnique=Teuchos::null);
111 void save(
double time);
113 void save(
double time,
double dt);
115 void closeExporter();
117 void writeVariablesHDF5();
121 void writeMeshElements( std::string nameConn );
123 void writeMeshPointsHDF5();
125 void writeMeshPoints(std::string nameP_X,
127 std::string nameP_Z );
136 void writeXmf(
double time);
138 void writeXmfElements(std::string nameConn,
double time);
140 void writeXmfPoints(std::string nameP_X,
142 std::string nameP_Z);
144 void writeXmfVariables();
146 void writeXmfTime(
double time,
double dt);
148 void prepareVectorField(MultiVecConstPtr_Type &u,
149 MultiVectorPtr_Type &u_export,
152 void prepareScalar(MultiVecConstPtr_Type &u,
153 MultiVectorPtr_Type &u_export)
const;
159 HDF5Ptr_Type hdf5exporter_;
160 CommConstPtr_Type comm_;
162 std::streampos closingLinesPosition_;
163 std::streampos closingLinesPositionTimes_;
164 std::string closingLines_;
165 std::ofstream xmf_out_;
166 std::ofstream xmf_times_out_;
167 std::string filename_;
168 std::string outputFilename_;
169 std::string postfix_;
173 std::vector<MultiVecConstPtr_Type> variables_;
174 std::vector<MapConstPtr_Type > uniqueMaps_;
175 std::vector<std::string> varNames_;
176 std::vector<std::string> varTypes_;
177 std::vector<int> varDofPerNode_;
178 MultiVectorPtr_Type pointsHDF_;
179 MultiVectorPtr_Type elementsHDF_;
184 GO nmbExportValuesGlob_;
185 int nmbPointsPerElement_;
190 ParameterListPtr_Type parameterList_;
191 vec2D_dbl_ptr pointsUnique_;
195 MapConstPtr_Type mapUniqueVariables_;