ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
OutputVTK.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef OUTPUTVTK_H
32#define OUTPUTVTK_H
33
34#include "Output.h"
35
36class OutputVTK : public Output
37{
38 public:
39 OutputVTK(std::string casTest, std::string run, tinyxml2::XMLElement* element, std::string fileName, Input* entree);
40 OutputVTK(std::string nameRun, int fileNumberRestartMeshMapping, Input* input);
41 ~OutputVTK() override;
42
43 void initializeSpecificOutput() override;
44 void writeResults(Mesh* mesh, std::vector<Cell*>* cellsLvl) override;
45 void readResults(Mesh* mesh, std::vector<Cell*>* cellsLvl, int cpu = -1) override;
46
47 protected:
48 void ReadPhysicalDataVTK(Mesh* mesh, std::vector<Cell*>* cellsLvl, tinyxml2::XMLElement* nodeCellData, std::string fileName = "Unknown file");
49
50 std::string createFilenameVTK(const char* name, Mesh* mesh = 0, int proc = -1, int numFichier = -1, std::string nameVariable = "defaut");
51
52 void writeResultsVTK(Mesh* mesh, std::vector<Cell*>* cellsLvl);
53 void writeCollectionVTK(Mesh* mesh);
54 void writePhysicalDataVTK(Mesh* mesh, std::vector<Cell*>* cellsLvl, std::ofstream& fileStream);
55
56 //Dependant du type de mesh
57 void writeMeshRectilinearVTK(Mesh* mesh, std::ofstream& fileStream);
58 void writeMeshUnstructuredVTK(Mesh* mesh, std::vector<Cell*>* cellsLvl, std::ofstream& fileStream);
59 void writeRectilinearVTKFileEnd(std::ofstream& fileStream);
60 void writeUnstructuredVTKFileEnd(std::ofstream& fileStream);
61};
62
63#endif //OUTPUTVTK_H
Definition Input.h:55
Abstract class for a mesh.
Definition Mesh.h:55
OutputVTK(std::string casTest, std::string run, tinyxml2::XMLElement *element, std::string fileName, Input *entree)
Definition OutputVTK.cpp:38
void initializeSpecificOutput() override
Definition OutputVTK.cpp:57
void writeResultsVTK(Mesh *mesh, std::vector< Cell * > *cellsLvl)
Definition OutputVTK.cpp:302
void writeMeshRectilinearVTK(Mesh *mesh, std::ofstream &fileStream)
Definition OutputVTK.cpp:596
void writeUnstructuredVTKFileEnd(std::ofstream &fileStream)
Definition OutputVTK.cpp:748
~OutputVTK() override
Definition OutputVTK.cpp:53
void writePhysicalDataVTK(Mesh *mesh, std::vector< Cell * > *cellsLvl, std::ofstream &fileStream)
Definition OutputVTK.cpp:423
std::string createFilenameVTK(const char *name, Mesh *mesh=0, int proc=-1, int numFichier=-1, std::string nameVariable="defaut")
Definition OutputVTK.cpp:253
void writeCollectionVTK(Mesh *mesh)
Definition OutputVTK.cpp:364
void readResults(Mesh *mesh, std::vector< Cell * > *cellsLvl, int cpu=-1) override
Read results of a previous simulation to resume from it.
Definition OutputVTK.cpp:116
void writeMeshUnstructuredVTK(Mesh *mesh, std::vector< Cell * > *cellsLvl, std::ofstream &fileStream)
Definition OutputVTK.cpp:656
void writeRectilinearVTKFileEnd(std::ofstream &fileStream)
Definition OutputVTK.cpp:739
void ReadPhysicalDataVTK(Mesh *mesh, std::vector< Cell * > *cellsLvl, tinyxml2::XMLElement *nodeCellData, std::string fileName="Unknown file")
Definition OutputVTK.cpp:172
void writeResults(Mesh *mesh, std::vector< Cell * > *cellsLvl) override
Definition OutputVTK.cpp:98
Output()
Default constructor for specific output without specific needs.
Definition Output.cpp:40
Definition tinyxml2.h:1148