32 #include <vtkCellData.h>
33 #include <vtkDoubleArray.h>
34 #include <vtkPointData.h>
35 #include <vtkSmartPointer.h>
37 #include <vtkIdTypeArray.h>
39 #include <vtkQuadraticEdge.h>
40 #include <vtkQuadraticTetra.h>
41 #include <vtkQuadraticTriangle.h>
43 #include <vtkTriangle.h>
44 #include <vtkUnstructuredGrid.h>
45 #include <vtkUnstructuredGridWriter.h>
46 #include <vtkVertex.h>
47 #include <vtkXMLPUnstructuredGridWriter.h>
49 #include <vtkMPIController.h>
50 #include <vtkMPICommunicator.h>
91 CepsBool writeGlobalIndices =
false);
CepsOutputFormat
Style of output files.
std::basic_string< CepsChar > CepsString
C++ format string.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
Abstract Class for all numerical method (FE, FD, FV etc)
Base class for other (big) CEPS classes. All classes can get a pointer to this base class and also co...
Abstract class for geometrical cell. On top of index and attributes managament, the cell has informat...
Encapsulates all the geometrical data.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
A class that enables the output of binary parallel VTK format files.
void addScalarData(const DHVecPtr &v, const CepsVector< CepsString > &fieldNames, const CepsVector< Unknown * > &us)
Set multiple scalar fields to be output by this writer. addScalarData for several unknowns.
CepsUInt m_outputLgMax
estimated number of output files (log10)+1
CepsBool m_updateMesh
if the mesh data (geometry) must be updated
void updateMeshData()
Global geometrical data regrouping.
void writeVTU()
Write current state (Paraview xml pvtu & vtu file)
vtkSmartPointer< vtkMPIController > m_vtkMpiController
vtk mpi controller
void insertCell(GeomCell *cell)
Internal method which inserts one element as a cell in a unstructuredGrid vtk object.
vtkSmartPointer< vtkUnstructuredGrid > m_unstructuredGrid
the vtk data wrapper
CepsOutputFormat m_outputType
Output type.
void insertElementData()
Add cell definition to VTK structures.
void writeLegacyVTK()
Write current state (Paraview legacy vtk)
CepsOutputFormat getOutputType() const
Get the output type.
std::map< CepsUInt, CepsUInt > m_geomToVtkNodeIndex
mapping used for nodes
vtkMPICommunicatorOpaqueComm m_opaqueCommVTK
a vtk object to create user defined MPI communicators
void insertPointData()
Add coordinates to VTK structures, add array of global indices if needed.
void write(CepsReal time=0., CepsBool writeXmlEntry=true)
Write all stored data.
Geometry * m_geom
Direct link to geometry.
CepsString getByeByeMessage()
Get string to be displayed at end of computation.
VtkWriter()=delete
Deleted constructor.
void insertElementsOfDim(CepsUInt dim)
Internal method which for looping on all elements on a mesh of given dimension.
CepsString getOuputExtension() const
Get the extension, deduced from CepsOutputFormat.
void setOutputType(CepsOutputFormat flag)
Set the output type.
vtkSmartPointer< vtkMPICommunicator > m_vtkMpiComm
a vtk wrapping object for the communicator
void writeSeriesFile()
Write time series file for all time steps (Paraview pvtu.series)
void writeDataArray()
Write current state (vtk_ceps format)
CepsVector< CepsReal > m_writtenTimes
Previous times already written.
void writeMetaDataSet()
Write time pvd file for all time steps (Paraview .pvd)
CepsUInt m_internalIndex
Points counter.
vtkCell * allocateCellOfDim(CepsUInt dim)
Internal method allocating a cell for a finite element (tetra,tri,...)
std::map< CepsUInt, CepsUInt > m_geomToVtkCellIndex
mapping used for elements
~VtkWriter() override
Destructor.
CepsString m_baseName
base name of output files
CepsBool m_writeGeomIndices
option to add array of CEPS point IDs
CepsString m_outputDir
output directory
AbstractDiscretization * m_discr
Discretization (dofs)
CepsUInt m_outputNb
number of output file (not iteration)
void addTimeFieldToUGrid(CepsReal time)
Adds a single scalar field to unstructred grid to write, called before writing.