3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Files | Classes | Functions
Input Output

Input and output of data and grids. More...

Description

Input and output of data and grids.

Files

file  adaptivegridrestart.hh
 Provides a restart functionality for adaptive grids.
 
file  container.hh
 Free functions to write and read a sequence container to and from a file.
 
file  defaultiofields.hh
 Adds output fields to a given output module, this is the default if a model doesn't implement this functionality.
 
file  gnuplotinterface.hh
 Interface for passing data sets to a file and plotting them, if gnuplot is installed.
 
file  cakegridmanager.hh
 Provides a grid manager for a piece of cake grid.
 
file  cpgridmanager.hh
 A grid creator that reads Petrel files and generates a CpGrid.
 
file  gmshgriddatahandle.hh
 A data handle for commucating grid data for gmsh grids.
 
file  griddata.hh
 Class for grid data attached to dgf or gmsh grid files.
 
file  io/grid/gridmanager.hh
 Convience header that includes all grid manager specializations.
 
file  gridmanager_alu.hh
 Grid manager specialization for ALUGrid.
 
file  gridmanager_base.hh
 Provides a grid manager for all supported grid managers with input file interfaces. Manages data via the grid data member.
 
file  gridmanager_foam.hh
 Grid manager specialization for FoamGrid.
 
file  gridmanager_mmesh.hh
 Grid manager specialization for MMesh.
 
file  gridmanager_oned.hh
 Grid manager specialization for OneDGrid.
 
file  gridmanager_sp.hh
 Grid manager specialization for SPGrid.
 
file  gridmanager_sub.hh
 Grid manager specialization for SubGrid.
 
file  gridmanager_ug.hh
 Grid manager specialization for UGGrid.
 
file  gridmanager_yasp.hh
 Grid manager specialization for YaspGrid.
 
file  loadsolution.hh
 read from a file into a solution vector
 
file  name.hh
 A collection of input/output field names for common physical quantities.
 
file  ploteffectivediffusivitymodel.hh
 Interface for plotting the multi-component-matrix-interaction laws.
 
file  plotmateriallaw.hh
 Interface for plotting the two-phase fluid-matrix-interaction laws.
 
file  plotmateriallaw3p.hh
 Interface for plotting the three-phase fluid-matrix-interaction laws.
 
file  plotthermalconductivitymodel.hh
 Interface for plotting the non-isothermal two-phase fluid-matrix-interaction laws.
 
file  pointcloudvtkwriter.hh
 A VTK writer specialized for staggered grid implementations with dofs on the faces.
 
file  rasterimagereader.hh
 A simple reader class for raster images.
 
file  restart.hh
 Generic class to read/write restart files.
 
file  staggeredvtkoutputmodule.hh
 A VTK output module to simplify writing dumux simulation data to VTK format. Specialization for staggered grids with dofs on faces.
 
file  io/velocityoutput.hh
 Default velocity output policy for porous media models.
 
file  vtkreader.hh
 A vtk file reader using tinyxml2 as xml backend.
 
file  vtkfunction.hh
 Dune style VTK functions.
 
file  vtkmultiwriter.hh
 Simplifies writing multi-file VTK datasets.
 
file  vtknestedfunction.hh
 Provides a vector-valued function using Dune::FieldVectors as elements.
 
file  io/vtkoutputmodule.hh
 A VTK output module to simplify writing dumux simulation data to VTK format.
 
file  vtkprecision.hh
 Vtk output precision options available in Dumux.
 
file  vtksequencewriter.hh
 Base class to write pvd-files which contains a list of all collected vtk-files. This is a modified version of DUNE's pvd writer which takes a VTKWriter as template argument making it more general.
 

Classes

class  Dumux::AdaptiveGridRestart< Grid, allowGridRestart >
 Indices denoting the different grid types. More...
 
class  Dumux::DefaultIOFields
 Adds output fields to a given output module. More...
 
class  Dumux::GnuplotInterface< Scalar >
 Interface for passing data sets to a file and plotting them, if gnuplot is installed. More...
 
class  Dumux::CakeGridManager< Grid >
 Provides a grid manager with a method for creating creating vectors with polar Coordinates and one for creating a Cartesian grid from these polar coordinates. More...
 
struct  Dumux::GmshGridDataHandle< Grid, GridFactory, Data >
 A data handle for commucating grid data for gmsh grids. More...
 
class  Dumux::GridData< Grid >
 Class for grid data attached to dgf or gmsh grid files. More...
 
class  Dumux::GridManager< Grid >
 The grid manager (this is the class used by the user) for all supported grid managers that constructs a grid from information in the input file and handles the data. More...
 
class  Dumux::GridManagerBase< GridType >
 The grid manager base interface (public) and methods common to most grid manager specializations (protected). More...
 
class  Dumux::GridManager< Dune::OneDGrid >
 Provides a grid manager for OneDGrids from information in the input file. More...
 
class  Dumux::GridManager< Dune::YaspGrid< dim, Coordinates > >
 Provides a grid manager for YaspGrids from information in the input file. More...
 
class  Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >
 Provides a grid manager for YaspGrids with different zones and grading. More...
 
class  Dumux::LoadSolutionDataHandle< Container, EntityMapper, codim >
 a data handle to communicate the solution on ghosts and overlaps when reading from vtk file in parallel More...
 
class  Dumux::PlotEffectiveDiffusivityModel< Scalar, EffectiveDiffusivityModel >
 Interface for plotting the multi-component-matrix-interaction laws. More...
 
class  Dumux::PlotMaterialLaw< Scalar, MaterialLaw >
 Interface for plotting the two-phase fluid-matrix-interaction laws. More...
 
class  Dumux::PlotThermalConductivityModel< Scalar, ThermalConductivityModel, FS >
 Interface for plotting the non-isothermal two-phase fluid-matrix-interaction laws. More...
 
class  Dumux::PointCloudVtkWriter< Scalar, GlobalPosition >
 A VTK output module to simplify writing dumux simulation data to VTK format. More...
 
class  Dumux::NetPBMReader
 A simple reader class for the Netpbm format (https://en.wikipedia.org/wiki/Netpbm_format). So far, only black and white (*.pbm) and grayscale (*pgm) images are supported. More...
 
class  Dumux::Restart
 Load or save a state of a model to/from the harddisk. More...
 
class  Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >
 A VTK output module to simplify writing dumux simulation data to VTK format Specialization for staggered grids with dofs on faces. More...
 
class  Dumux::VelocityOutput< GridVariables >
 Velocity output for implicit (porous media) models. More...
 
class  Dumux::VTKReader
 A vtk file reader using tinyxml2 as xml backend. More...
 
struct  Dumux::Vtk::VectorP0VTKFunction< GridView, Mapper, F >
 a VTK function that supports both scalar and vector values for each element More...
 
struct  Dumux::Vtk::VectorP1VTKFunction< GridView, Mapper, F >
 a VTK function that supports both scalar and vector values for each vertex More...
 
struct  Dumux::Vtk::VectorP1NonConformingVTKFunction< GridView, Mapper, F >
 A VTK function that supports both scalar and vector values for each vertex. This expects the data to be organized by a two-dimensional field storing for each element the element-local nodal values. This can be used for the output of fields that are non-conforming due to e.g. constitutive relationships and where no extra degrees of freedom exist to disply the discontinuities. More...
 
class  Dumux::Vtk::Field< GridView >
 struct that can hold any field that fulfills the VTKFunction interface More...
 
class  Dumux::VtkMultiWriter< GridView, OutputValue >
 Simplifies writing multi-file VTK datasets. More...
 
class  Dumux::VtkNestedFunction< GridView, Mapper, Buffer >
 Provides a vector-valued function using Dune::FieldVectors as elements. More...
 
class  Dumux::VtkOutputModuleBase< GridGeometry >
 A VTK output module to simplify writing dumux simulation data to VTK format. More...
 
class  Dumux::VtkOutputModule< GridVariables, SolutionVector >
 A VTK output module to simplify writing dumux simulation data to VTK format. More...
 
class  Dumux::VTKSequenceWriter< VTKWriter >
 Base class to write pvd-files which contains a list of all collected vtk-files. This is a modified version of DUNE's pvd writer which takes a VTKWriter as template argument making it more general. More...
 

Functions

template<typename Container >
void Dumux::writeContainerToFile (const Container &v, const std::string &filename, int floatPrecision=6)
 Writes a container to file. More...
 
template<class SolutionVector , class PvNameFunc , class GridGeometry >
auto Dumux::loadSolutionFromVtkFile (SolutionVector &sol, const std::string fileName, PvNameFunc &&pvNameFunc, const GridGeometry &gridGeometry, const VTKReader::DataType &dataType) -> typename std::enable_if_t<!decltype(isValid(Detail::hasState())(sol[0]))::value, void >
 read from a vtk file into a solution vector with primary variables without state More...
 
template<class IOFields , class PrimaryVariables , class ModelTraits = void, class FluidSystem = void, class SolidSystem = void>
auto Dumux::createPVNameFunction (const std::string &paramGroup="") -> typename std::enable_if_t< decltype(isValid(Detail::hasState())(PrimaryVariables(0)))::value, std::function< std::string(int, int)> >
 helper function to determine the primary variable names of a model with privar state More...
 
template<class SolutionVector , class PvNameFunc , class GridGeometry >
void Dumux::loadSolution (SolutionVector &sol, const std::string &fileName, PvNameFunc &&pvNameFunc, const GridGeometry &gridGeometry)
 load a solution vector from file More...
 
Precision Dumux::Vtk::stringToPrecision (std::string_view precisionName)
 Maps a string (e.g. from input) to a Dune precision type. More...
 

Function Documentation

◆ createPVNameFunction()

template<class IOFields , class PrimaryVariables , class ModelTraits = void, class FluidSystem = void, class SolidSystem = void>
auto Dumux::createPVNameFunction ( const std::string &  paramGroup = "") -> typename std::enable_if_t<decltype(isValid(Detail::hasState())(PrimaryVariables(0)))::value, std::function<std::string(int,int)>>

helper function to determine the primary variable names of a model with privar state

helper function to determine the primary variable names of a model without state

Note
use this as input for the load solution function

◆ loadSolution()

template<class SolutionVector , class PvNameFunc , class GridGeometry >
void Dumux::loadSolution ( SolutionVector &  sol,
const std::string &  fileName,
PvNameFunc &&  pvNameFunc,
const GridGeometry &  gridGeometry 
)

load a solution vector from file

Note
Supports the following file extensions: *.vtu *.vtp *.pvtu, *.pvtp
Parameters
solthe solution vector to read from file
fileNamethe file name of the file to read from
pvNameFunca function with the signature std::string(int pvIdx) in case the primary variables have a state the signature is std::string(int pvIdx, int state)
gridGeometrythe grid geometry of the discretization method used

◆ loadSolutionFromVtkFile()

template<class SolutionVector , class PvNameFunc , class GridGeometry >
auto Dumux::loadSolutionFromVtkFile ( SolutionVector &  sol,
const std::string  fileName,
PvNameFunc &&  pvNameFunc,
const GridGeometry &  gridGeometry,
const VTKReader::DataType dataType 
) -> typename std::enable_if_t<!decltype(isValid(Detail::hasState())(sol[0]))::value, void>

read from a vtk file into a solution vector with primary variables without state

read from a sequential file into a solution vector with primary variables with state

◆ stringToPrecision()

Precision Dumux::Vtk::stringToPrecision ( std::string_view  precisionName)
inline

Maps a string (e.g. from input) to a Dune precision type.

◆ writeContainerToFile()

template<typename Container >
void Dumux::writeContainerToFile ( const Container &  v,
const std::string &  filename,
int  floatPrecision = 6 
)

Writes a container to file.

Parameters
vThe container, requires begin() and end() method
filenameThe filename to write to
floatPrecisionThe total number of digits stored, including decimal

usage: std::vector<double> v(5, 0.0); writeContainerToFile(v, "myvector.txt");