3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Types | Public Member Functions | List of all members
Dumux::PointCloudVtkWriter< Scalar, GlobalPosition > Class Template Reference

A VTK output module to simplify writing dumux simulation data to VTK format. More...

#include <dumux/io/pointcloudvtkwriter.hh>

Description

template<class Scalar, class GlobalPosition>
class Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >

A VTK output module to simplify writing dumux simulation data to VTK format.

Handles the output of scalar and vector fields to VTK formatted file for multiple variables and timesteps. Certain predefined fields can be registered on problem / model initialization and/or be turned on/off using the designated properties. Additionally non-standardized scalar and vector fields can be added to the writer manually.

Public Types

using ScalarFunction = VTKFunction< std::vector< Scalar > >
 
using VectorFunction = VTKFunction< std::vector< DimWorldVector > >
 

Public Member Functions

 PointCloudVtkWriter (const std::vector< GlobalPosition > &coordinates)
 
void write (const std::string &name, Dune::VTK::OutputType type=Dune::VTK::ascii)
 Create an output file. More...
 
void pwrite (const std::string &name, const std::string &path, const std::string &extendpath, Dune::VTK::OutputType type=Dune::VTK::ascii)
 Create an output file in parallel. More...
 
void addPointData (const std::vector< Scalar > &v, const std::string &name)
 Add a vector of scalar data that live on arbitrary points to the visualization. More...
 
void addPointData (const std::vector< DimWorldVector > &v, const std::string &name)
 Add a vector of vector data that live on arbitrary points to the visualization. More...
 
void clear ()
 Clears the data lists. More...
 
std::string getSerialPieceName (const std::string &name, const std::string &path) const
 Return name of a serial header file. More...
 
std::string getParallelHeaderName (const std::string &name, const std::string &path, int commSize) const
 Return name of a parallel header file. More...
 

Member Typedef Documentation

◆ ScalarFunction

template<class Scalar , class GlobalPosition >
using Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::ScalarFunction = VTKFunction<std::vector<Scalar> >

◆ VectorFunction

template<class Scalar , class GlobalPosition >
using Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::VectorFunction = VTKFunction<std::vector<DimWorldVector> >

Constructor & Destructor Documentation

◆ PointCloudVtkWriter()

template<class Scalar , class GlobalPosition >
Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::PointCloudVtkWriter ( const std::vector< GlobalPosition > &  coordinates)
inline

Member Function Documentation

◆ addPointData() [1/2]

template<class Scalar , class GlobalPosition >
void Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::addPointData ( const std::vector< DimWorldVector > &  v,
const std::string &  name 
)
inline

Add a vector of vector data that live on arbitrary points to the visualization.

Parameters
vThe vector containing the data
nameThe name of the data set

◆ addPointData() [2/2]

template<class Scalar , class GlobalPosition >
void Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::addPointData ( const std::vector< Scalar > &  v,
const std::string &  name 
)
inline

Add a vector of scalar data that live on arbitrary points to the visualization.

Parameters
vThe vector containing the data
nameThe name of the data set

◆ clear()

template<class Scalar , class GlobalPosition >
void Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::clear ( )
inline

Clears the data lists.

◆ getParallelHeaderName()

template<class Scalar , class GlobalPosition >
std::string Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::getParallelHeaderName ( const std::string &  name,
const std::string &  path,
int  commSize 
) const
inline

Return name of a parallel header file.

Parameters
nameBase name of the VTK output. This should be without any directory parts and without a filename extension.
pathDirectory part of the resulting header name. May be empty, in which case the resulting name will not have a directory part. If non-empty, may or may not have a trailing '/'. If a trailing slash is missing, one is appended implicitly.
commSizeNumber of processes writing a parallel vtk output.

◆ getSerialPieceName()

template<class Scalar , class GlobalPosition >
std::string Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::getSerialPieceName ( const std::string &  name,
const std::string &  path 
) const
inline

Return name of a serial header file.

Parameters
nameBase name of the VTK output. This should be without any directory parts and without a filename extension.
pathDirectory part of the resulting header name. May be empty, in which case the resulting name will not have a directory part. If non-empty, may or may not have a trailing '/'. If a trailing slash is missing, one is appended implicitly.

◆ pwrite()

template<class Scalar , class GlobalPosition >
void Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::pwrite ( const std::string &  name,
const std::string &  path,
const std::string &  extendpath,
Dune::VTK::OutputType  type = Dune::VTK::ascii 
)
inline

Create an output file in parallel.

Parameters
nameBase name of the output files. This should not contain any directory part and not filename extensions. It will be used both for each processes piece as well as the parallel collection file
pathDirectory where to put the parallel collection (.pvtu/.pvtp) file. If it is relative, it is taken relative to the current directory
extendpathDirectory where to put the piece file (.vtu/.vtp) of this process. If it is relative, it is taken relative to the directory denoted by path
typeHow to encode the data in the file

◆ write()

template<class Scalar , class GlobalPosition >
void Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >::write ( const std::string &  name,
Dune::VTK::OutputType  type = Dune::VTK::ascii 
)
inline

Create an output file.

Parameters
nameThe base name
typeThe output type

The documentation for this class was generated from the following file: