3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Files | Namespaces | Classes | Enumerations | 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  format.hh
 Formatting based on the fmt-library which implements std::format of C++20.
 
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
 Convenience 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  plotmateriallaw3p.hh
 Interface for plotting the three-phase fluid-matrix-interaction laws.
 
file  plotpckrsw.hh
 Interface for plotting the two-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  fieldtype.hh
 Vtk field types available in Dumux.
 
file  function.hh
 Dune style VTK functions.
 
file  intersectionwriter.hh
 Intersection writer.
 
file  precision.hh
 Vtk output precision options available in Dumux.
 
file  vtkreader.hh
 A vtk file reader using tinyxml2 as xml backend.
 
file  io/vtkoutputmodule.hh
 A VTK output module to simplify writing dumux simulation data to VTK format.
 
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.
 

Namespaces

namespace  Dumux::Gnuplot
 Helper functions related to gnuplot.
 

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 three-phase fluid-matrix-interaction laws TODO: add theta head pressure plot (porosity and density is needed) 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...
 
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 display the discontinuities. More...
 
struct  Dumux::Vtk::VectorP1FaceNonConformingVTKFunction< GridView, Mapper, F >
 A VTK function that supports both scalar and vector values for each face. This expects the data to be organized by a two-dimensional field storing for each element the element-local nodal values. Used for non-conforming spaces such as Rannacher-Turek and Crouzeix-Raviart. More...
 
class  Dumux::Vtk::Field< GridView >
 struct that can hold any field that fulfills the VTKFunction interface More...
 
class  Dumux::Detail::GridIntersectionIterator< GV >
 Iterate over the GridViews boundary intersections This will visit all intersections for which boundary() is true and neighbor() is false. More...
 
class  Dumux::Detail::NonConformingIntersectionIteratorFactory< GridView >
 Non conforming intersection iterator factory. More...
 
class  Dumux::Detail::SkeletonFunction< GridView, Mapper, F >
 Skeleton function for intersection writer. More...
 
class  Dumux::ConformingIntersectionWriter< GridView >
 Conforming intersection writer. More...
 
class  Dumux::VTKReader
 A vtk file reader using tinyxml2 as xml backend. 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...
 

Enumerations

enum class  Dumux::Vtk::FieldType : unsigned int { Dumux::Vtk::FieldType::element , Dumux::Vtk::FieldType::vertex , Dumux::Vtk::FieldType::automatic }
 Identifier for vtk field types. 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 &&targetPvNameFunc, 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 &&targetPvNameFunc, const GridGeometry &gridGeometry)
 load a solution vector from file More...
 
template<class PcKrSw , class V >
auto Dumux::samplePcSw (const PcKrSw &curve, const V &sw)
 sample the pc-sw curve More...
 
template<class PcKrSw , class V >
auto Dumux::samplePcSwDerivative (const PcKrSw &curve, const V &sw)
 sample the pc-sw curve derivative wrt sw More...
 
template<class PcKrSw , class V >
auto Dumux::samplePcSwInverseDerivative (const PcKrSw &curve, const V &pc)
 sample the sw-pc curve derivative wrt pc More...
 
template<class PcKrSw , class V >
auto Dumux::sampleLog10PcSw (const PcKrSw &curve, const V &sw)
 sample sw-pc curve but return the log10 of the capillary pressure More...
 
template<class PcKrSw , class V >
auto Dumux::sampleRelPerms (const PcKrSw &curve, const V &sw)
 sample krw-sw and krn-sw curves More...
 
template<class PcKrSw , class V >
auto Dumux::sampleRelPermDerivatives (const PcKrSw &curve, const V &sw)
 sample the derivatives of the krw-sw and krn-sw curves More...
 
template<class S , class V >
void Dumux::Gnuplot::addPcSw (GnuplotInterface< S > &gnuplot, const V &sw, const V &pc, const std::string &curveName="pc-sw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="capillary pressure [Pa]")
 Convenience function for adding material law quantities to gnuplot. More...
 
template<class S , class V >
void Dumux::Gnuplot::addPcSwDerivative (GnuplotInterface< S > &gnuplot, const V &sw, const V &dpc_dsw, const std::string &curveName="dpc-dsw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="derivative of capillary pressure [Pa]")
 Convenience function for adding material law quantities to gnuplot. More...
 
template<class S , class V >
void Dumux::Gnuplot::addPcSwInverseDerivative (GnuplotInterface< S > &gnuplot, const V &sw, const V &dpc_dsw, const std::string &curveName="dsw-dpc", const std::string &curveOptions="w l", const std::string &xLabel="capillary pressure [Pa]", const std::string &yLabel="derivative of saturation [1/Pa]")
 Convenience function for adding material law quantities to gnuplot. More...
 
template<class S , class V >
void Dumux::Gnuplot::addLog10PcSw (GnuplotInterface< S > &gnuplot, const V &sw, const V &log10pc, const std::string &curveName="log10-pc-sw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="log10 of capillary pressure [Pa]")
 Convenience function for adding material law quantities to gnuplot. More...
 
template<class S , class V >
void Dumux::Gnuplot::addRelPerms (GnuplotInterface< S > &gnuplot, const V &sw, const V &krw, const V &krn, const std::string &curveName="relperm", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="relative permeability [-]")
 Convenience function for adding material law quantities to gnuplot. More...
 
template<class S , class V >
void Dumux::Gnuplot::addRelPermDerivatives (GnuplotInterface< S > &gnuplot, const V &sw, const V &krw, const V &krn, const std::string &curveName="relperm_dsw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="derivative of the relative permeability [-]")
 Convenience function for adding material law quantities to gnuplot. More...
 
Precision Dumux::Vtk::stringToPrecision (std::string_view precisionName)
 Maps a string (e.g. from input) to a Dune precision type. More...
 

Enumeration Type Documentation

◆ FieldType

enum class Dumux::Vtk::FieldType : unsigned int
strong

Identifier for vtk field types.

Enumerator
element 
vertex 
automatic 

Function Documentation

◆ addLog10PcSw()

template<class S , class V >
void Dumux::Gnuplot::addLog10PcSw ( GnuplotInterface< S > &  gnuplot,
const V &  sw,
const V &  log10pc,
const std::string &  curveName = "log10-pc-sw",
const std::string &  curveOptions = "w l",
const std::string &  xLabel = "wetting phase saturation [-]",
const std::string &  yLabel = "log10 of capillary pressure [Pa]" 
)

Convenience function for adding material law quantities to gnuplot.

◆ addPcSw()

template<class S , class V >
void Dumux::Gnuplot::addPcSw ( GnuplotInterface< S > &  gnuplot,
const V &  sw,
const V &  pc,
const std::string &  curveName = "pc-sw",
const std::string &  curveOptions = "w l",
const std::string &  xLabel = "wetting phase saturation [-]",
const std::string &  yLabel = "capillary pressure [Pa]" 
)

Convenience function for adding material law quantities to gnuplot.

◆ addPcSwDerivative()

template<class S , class V >
void Dumux::Gnuplot::addPcSwDerivative ( GnuplotInterface< S > &  gnuplot,
const V &  sw,
const V &  dpc_dsw,
const std::string &  curveName = "dpc-dsw",
const std::string &  curveOptions = "w l",
const std::string &  xLabel = "wetting phase saturation [-]",
const std::string &  yLabel = "derivative of capillary pressure [Pa]" 
)

Convenience function for adding material law quantities to gnuplot.

◆ addPcSwInverseDerivative()

template<class S , class V >
void Dumux::Gnuplot::addPcSwInverseDerivative ( GnuplotInterface< S > &  gnuplot,
const V &  sw,
const V &  dpc_dsw,
const std::string &  curveName = "dsw-dpc",
const std::string &  curveOptions = "w l",
const std::string &  xLabel = "capillary pressure [Pa]",
const std::string &  yLabel = "derivative of saturation [1/Pa]" 
)

Convenience function for adding material law quantities to gnuplot.

◆ addRelPermDerivatives()

template<class S , class V >
void Dumux::Gnuplot::addRelPermDerivatives ( GnuplotInterface< S > &  gnuplot,
const V &  sw,
const V &  krw,
const V &  krn,
const std::string &  curveName = "relperm_dsw",
const std::string &  curveOptions = "w l",
const std::string &  xLabel = "wetting phase saturation [-]",
const std::string &  yLabel = "derivative of the relative permeability [-]" 
)

Convenience function for adding material law quantities to gnuplot.

◆ addRelPerms()

template<class S , class V >
void Dumux::Gnuplot::addRelPerms ( GnuplotInterface< S > &  gnuplot,
const V &  sw,
const V &  krw,
const V &  krn,
const std::string &  curveName = "relperm",
const std::string &  curveOptions = "w l",
const std::string &  xLabel = "wetting phase saturation [-]",
const std::string &  yLabel = "relative permeability [-]" 
)

Convenience function for adding material law quantities to gnuplot.

◆ 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 &&  targetPvNameFunc,
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
targetPvNameFunca 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 &&  targetPvNameFunc,
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

◆ sampleLog10PcSw()

template<class PcKrSw , class V >
auto Dumux::sampleLog10PcSw ( const PcKrSw &  curve,
const V &  sw 
)

sample sw-pc curve but return the log10 of the capillary pressure

◆ samplePcSw()

template<class PcKrSw , class V >
auto Dumux::samplePcSw ( const PcKrSw &  curve,
const V &  sw 
)

sample the pc-sw curve

◆ samplePcSwDerivative()

template<class PcKrSw , class V >
auto Dumux::samplePcSwDerivative ( const PcKrSw &  curve,
const V &  sw 
)

sample the pc-sw curve derivative wrt sw

◆ samplePcSwInverseDerivative()

template<class PcKrSw , class V >
auto Dumux::samplePcSwInverseDerivative ( const PcKrSw &  curve,
const V &  pc 
)

sample the sw-pc curve derivative wrt pc

◆ sampleRelPermDerivatives()

template<class PcKrSw , class V >
auto Dumux::sampleRelPermDerivatives ( const PcKrSw &  curve,
const V &  sw 
)

sample the derivatives of the krw-sw and krn-sw curves

◆ sampleRelPerms()

template<class PcKrSw , class V >
auto Dumux::sampleRelPerms ( const PcKrSw &  curve,
const V &  sw 
)

sample krw-sw and krn-sw curves

◆ 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");