3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Modules | Files | Namespaces | Classes | Functions
Common

Common classes, functions, properties and concepts. More...

Description

Common classes, functions, properties and concepts.

Modules

 Geometry
 Basic geometries in DuMux
 
 Properties
 Basic properties of all models in DuMux
 
 Typetraits
 Basic Type traits in DuMux
 

Files

file  balanceequationopts.hh
 Traits class to set options used by the local residual when when evaluating the balance equations.
 
file  boundaryconditions.hh
 Definition of boundary condition types, extend if necessary.
 
file  boundaryflag.hh
 Boundary flag to store e.g. in sub control volume faces.
 
file  boundaryflag.hh
 Boundary flag to store e.g. in sub control volume faces.
 
file  common/boundarytypes.hh
 Class to specify the type of a boundary.
 
file  cubicspline.hh
 A simple implementation of a cubic spline.
 
file  cubicsplinehermitebasis.hh
 The cubic hermite spline basis.
 
file  defaultmappertraits.hh
 Defines the default element and vertex mapper types.
 
file  defaultusagemessage.hh
 Function printing a default usage message.
 
file  deprecated.hh
 Helpers for deprecation.
 
file  dimensionlessnumbers.hh
 Collection of functions, calculating dimensionless numbers.
 
file  dumuxmessage.hh
 Provides the class creating the famous DuMux start and end messages.
 
file  entitymap.hh
 A map from indices to entities using grid entity seeds.
 
file  exceptions.hh
 Some exceptions thrown in DuMux
 
file  fixedlengthspline_.hh
 Implements a spline with a fixed number of sampling points.
 
file  common/fvproblem.hh
 Base class for all finite volume problems.
 
file  indextraits.hh
 Defines the index types used for grid and local indices.
 
file  integrate.hh
 Define helper functions for integration.
 
file  intersectionmapper.hh
 defines intersection mappers.
 
file  intrange.hh
 A class to create an iterable integer range.
 
file  loggingparametertree.hh
 A parameter tree that logs which parameters have been used.
 
file  math.hh
 Define some often used mathematical functions.
 
file  monotonecubicspline.hh
 A monotone cubic spline.
 
file  numericdifferentiation.hh
 A class for numeric differentiation.
 
file  optional.hh
 A wrapper that can either contain an object of T or be empty. This might be used as a workaround for non-default constructible classes.
 
file  parameters.hh
 The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
 
file  partial.hh
 Get only parts of a container or tuple.
 
file  common/pdesolver.hh
 Defines a high-level interface for a PDESolver.
 
file  pointsource.hh
 A point source class, i.e. sources located at a single point in space.
 
file  common/properties.hh
 Declares all properties used in Dumux.
 
file  quad.hh
 This file provides the infrastructure to use quad-precision floating point values in the numerical models.
 
file  reorderingdofmapper.hh
 An SCSG element mapper that sorts the indices in order to optimize the matrix sparsity pattern.
 
file  reservedblockvector.hh
 A arithmetic block vector type based on DUNE's reserved vector.
 
file  spline.hh
 Provides 3rd order polynomial splines.
 
file  splinecommon_.hh
 The common code for all 3rd order polynomial splines.
 
file  staggeredfvproblem.hh
 Base class for all staggered fv problems.
 
file  start.hh
 Provides a few default main functions for convenience.
 
file  tabulated2dfunction.hh
 Implements tabulation for a two-dimensional function.
 
file  timeloop.hh
 Manages the handling of time dependent problems.
 
file  timemanager.hh
 Manages the handling of time dependent problems.
 
file  valgrind.hh
 Some templates to wrap the valgrind macros.
 
file  variablelengthspline_.hh
 Implements a spline with a variable number of sampling points.
 
file  writetriangulation.hh
 A function to write a triangulation to vtk.
 
file  test_propertysystem.cc
 Testing the Dumux property system.
 

Namespaces

namespace  Dumux::InterpolationPolicy
 forward declaration of the linear interpolation policy (default)
 

Classes

class  Dumux::BalanceEquationOptions< TypeTag >
 Traits class to set options used by the local residual when when evaluating the balance equations. More...
 
struct  Dumux::BoundaryConditions
 Define a class containing boundary condition flags. More...
 
class  Dumux::BoundaryTypes< numEq >
 Class to specify the type of a boundary. More...
 
class  Dumux::CubicSpline< Scalar >
 A simple implementation of a natural cubic spline. More...
 
struct  Dumux::CubicSplineHermiteBasis< Scalar >
 The cubic spline hermite basis. More...
 
class  Dumux::DimensionlessNumbers< Scalar >
 Collection of functions which calculate dimensionless numbers. Each number has it's own function. All the parameters for the calculation have to be handed over. Rendering this collection generic in the sense that it can be used by any model. More...
 
class  Dumux::DumuxMessage
 DuMux start and end message. More...
 
class  Dumux::EntityMap< GridView, codim >
 A map from indices to entities using grid entity seeds. More...
 
class  Dumux::NumericalProblem
 Exception thrown if a fixable numerical problem occurs. More...
 
class  Dumux::ParameterException
 Exception thrown if a run-time parameter is not specified correctly. More...
 
class  Dumux::FixedLengthSpline_< ScalarT, nSamples >
 The common code for all 3rd order polynomial splines with more than two sampling points. More...
 
class  Dumux::FVProblem< TypeTag >
 Base class for all finite-volume problems. More...
 
struct  Dumux::IndexTraits< GridView >
 Struture to define the index types used for grid and local indices. More...
 
class  Dumux::ConformingGridIntersectionMapper< GridView >
 defines a standard intersection mapper for mapping of global DOFs assigned to faces. It only works for conforming grids, without hanging nodes. More...
 
class  Dumux::NonConformingGridIntersectionMapper< GridView >
 defines an intersection mapper for mapping of global DOFs assigned to faces which also works for non-conforming grids and corner-point grids. More...
 
class  Dumux::IntersectionMapper< GridView >
 defines an intersection mapper for mapping of global DOFs assigned to faces which also works for adaptive grids. More...
 
class  Dumux::IntRange
 This class generates a IntRange [a,b) which can be used in a for loop, e.g. for(auto i : IntRange(3) { ... i = 0, 1, 2 } or for(auto i : IntRange(5, 8) { ... i = 5, 6, 7 } see: https://en.wikipedia.org/wiki/Generator_(computer_programming) More...
 
class  Dumux::LoggingParameterTree
 A parameter tree that logs which parameters have been used. More...
 
struct  Dumux::InterpolationPolicy::Linear
 interpolate linearly between two given values More...
 
struct  Dumux::InterpolationPolicy::LinearTable
 interpolate linearly in a piecewise linear function (tabularized function) More...
 
class  Dumux::MonotoneCubicSpline< Scalar >
 A monotone cubic spline. More...
 
class  Dumux::NumericDifferentiation
 A class for numeric differentiation with respect to a scalar parameter. More...
 
class  Dumux::Optional< T >
 A wrapper that can either contain an object of T or be empty. More...
 
class  Dumux::Parameters
 Parameter class managing runtime input parameters. More...
 
class  Dumux::PDESolver< Assembler, LinearSolver >
 A high-level interface for a PDESolver. More...
 
class  Dumux::PointSource< PositionType, ValueType >
 A point source base class. More...
 
class  Dumux::IdPointSource< GlobalPosition, SourceValues, I >
 A point source class with an identifier to attach data. More...
 
class  Dumux::SolDependentPointSource< TypeTag >
 A point source class for time dependent point sources. More...
 
class  Dumux::BoundingBoxTreePointSourceHelper
 A helper class calculating a sub control volume to point source map This class uses the bounding box tree implementation to indentify in which sub control volume(s) a point source falls. More...
 
class  Dumux::ReservedBlockVector< BlockType, capacity >
 A arithmetic block vector type based on DUNE's reserved vector. More...
 
class  Dumux::Spline< Scalar, numSamples >
 A 3rd order polynomial spline. More...
 
class  Dumux::Spline< Scalar, -1 >
 Specialization of a spline with the number of sampling points only known at run time. More...
 
class  Dumux::Spline< Scalar, 2 >
 Spline for two sampling points. More...
 
class  Dumux::SplineCommon_< ScalarT, ImplementationT >
 The common code for all 3rd order polynomial splines. More...
 
class  Dumux::StaggeredFVProblem< TypeTag >
 Base class for all staggered finite-volume problems. More...
 
class  Dumux::Tabulated2DFunction< Scalar >
 Implements tabulation for a two-dimensional function. More...
 
class  Dumux::TimeLoopBase< Scalar >
 Manages the handling of time dependent problems. More...
 
class  Dumux::TimeLoop< Scalar >
 The default time loop for instationary simulations. More...
 
class  Dumux::CheckPointTimeLoop< Scalar >
 A time loop with a check point mechanism. More...
 
class  Dumux::TimeManager< TypeTag >
 Manages the handling of time dependent problems. More...
 
class  Dumux::VariableLengthSpline_< ScalarT >
 The common code for all 3rd order polynomial splines with where the number of sampling points only known at run-time. More...
 

Functions

std::string Dumux::defaultUsageMessage (const std::string &programName)
 Provides a general text block, that is part of error/ help messages. More...
 
template<class Scalar >
constexpr Scalar Dumux::arithmeticMean (Scalar x, Scalar y, Scalar wx=1.0, Scalar wy=1.0) noexcept
 Calculate the (weighted) arithmetic mean of two scalar values. More...
 
template<class Scalar >
constexpr Scalar Dumux::harmonicMean (Scalar x, Scalar y, Scalar wx=1.0, Scalar wy=1.0) noexcept
 Calculate the (weighted) harmonic mean of two scalar values. More...
 
template<class Scalar >
Scalar Dumux::geometricMean (Scalar x, Scalar y) noexcept
 Calculate the geometric mean of two scalar values. More...
 
template<class Scalar , int m, int n>
void Dumux::harmonicMeanMatrix (Dune::FieldMatrix< Scalar, m, n > &K, const Dune::FieldMatrix< Scalar, m, n > &Ki, const Dune::FieldMatrix< Scalar, m, n > &Kj)
 Calculate the harmonic mean of a fixed-size matrix. More...
 
template<class Scalar , class SolContainer >
int Dumux::invertLinearPolynomial (SolContainer &sol, Scalar a, Scalar b)
 Invert a linear polynomial analytically. More...
 
template<class Scalar , class SolContainer >
int Dumux::invertQuadraticPolynomial (SolContainer &sol, Scalar a, Scalar b, Scalar c)
 Invert a quadratic polynomial analytically. More...
 
template<class Scalar , class SolContainer >
int Dumux::invertCubicPolynomial (SolContainer *sol, Scalar a, Scalar b, Scalar c, Scalar d)
 Invert a cubic polynomial analytically. More...
 
template<class Scalar , int dim>
bool Dumux::isLarger (const Dune::FieldVector< Scalar, dim > &pos, const Dune::FieldVector< Scalar, dim > &smallerVec)
 Comparison of two position vectors. More...
 
template<class Scalar , int dim>
bool Dumux::isSmaller (const Dune::FieldVector< Scalar, dim > &pos, const Dune::FieldVector< Scalar, dim > &largerVec)
 Comparison of two position vectors. More...
 
template<class Scalar , int dim>
bool Dumux::isBetween (const Dune::FieldVector< Scalar, dim > &pos, const Dune::FieldVector< Scalar, dim > &smallerVec, const Dune::FieldVector< Scalar, dim > &largerVec)
 Comparison of three position vectors. More...
 
template<class Policy = InterpolationPolicy::Linear, class Scalar , class Parameter >
Scalar Dumux::interpolate (Scalar ip, Parameter &&params)
 a generic function to interpolate given a set of parameters and an interpolation point More...
 
template<class Scalar >
std::vector< Scalar > Dumux::linspace (const Scalar begin, const Scalar end, std::size_t samples)
 Generates linearly spaced vectors. More...
 
template<class Scalar >
Scalar Dumux::antoine (Scalar temperature, Scalar A, Scalar B, Scalar C)
 Evaluates the Antoine equation used to calculate the vapour pressure of various liquids. More...
 
template<class ValueType >
constexpr int Dumux::sign (const ValueType &value) noexcept
 Sign or signum function. More...
 
template<class Scalar >
Dune::FieldVector< Scalar, 3 > Dumux::crossProduct (const Dune::FieldVector< Scalar, 3 > &vec1, const Dune::FieldVector< Scalar, 3 > &vec2)
 Cross product of two vectors in three-dimensional Euclidean space. More...
 
template<class Scalar >
Scalar Dumux::crossProduct (const Dune::FieldVector< Scalar, 2 > &vec1, const Dune::FieldVector< Scalar, 2 > &vec2)
 Cross product of two vectors in two-dimensional Euclidean space retuning scalar. More...
 
template<class Scalar >
Scalar Dumux::tripleProduct (const Dune::FieldVector< Scalar, 3 > &vec1, const Dune::FieldVector< Scalar, 3 > &vec2, const Dune::FieldVector< Scalar, 3 > &vec3)
 Triple product of three vectors in three-dimensional Euclidean space retuning scalar. More...
 
template<class Scalar , int m, int n>
Dune::FieldMatrix< Scalar, n, m > Dumux::getTransposed (const Dune::FieldMatrix< Scalar, m, n > &M)
 Transpose a FieldMatrix. More...
 
template<class Scalar >
Dune::DynamicMatrix< Scalar > Dumux::getTransposed (const Dune::DynamicMatrix< Scalar > &M)
 Transpose a DynamicMatrix. More...
 
template<class Scalar >
Dune::DynamicMatrix< Scalar > Dumux::multiplyMatrices (const Dune::DynamicMatrix< Scalar > &M1, const Dune::DynamicMatrix< Scalar > &M2)
 Multiply two dynamic matrices. More...
 
template<class Scalar , int rows1, int cols1, int cols2>
Dune::FieldMatrix< Scalar, rows1, cols2 > Dumux::multiplyMatrices (const Dune::FieldMatrix< Scalar, rows1, cols1 > &M1, const Dune::FieldMatrix< Scalar, cols1, cols2 > &M2)
 Multiply two field matrices. More...
 
template<class MatrixType >
Dune::DenseMatrix< MatrixType >::field_type Dumux::trace (const Dune::DenseMatrix< MatrixType > &M)
 Trace of a dense matrix. More...
 
template<class MAT , class V >
Dune::DenseVector< V >::derived_type Dumux::mv (const Dune::DenseMatrix< MAT > &M, const Dune::DenseVector< V > &v)
 Returns the result of the projection of a vector v with a Matrix M. More...
 
template<class FieldScalar , class V >
std::enable_if_t< Dune::IsNumber< FieldScalar >::value, typename Dune::DenseVector< V >::derived_type > Dumux::mv (const FieldScalar m, const Dune::DenseVector< V > &v)
 Returns the result of a vector v multiplied by a scalar m. More...
 
template<class V1 , class MAT , class V2 >
Dune::DenseMatrix< MAT >::value_type Dumux::vtmv (const Dune::DenseVector< V1 > &v1, const Dune::DenseMatrix< MAT > &M, const Dune::DenseVector< V2 > &v2)
 Evaluates the scalar product of a vector v2, projected by a matrix M, with a vector v1. More...
 
template<class V1 , class FieldScalar , class V2 >
std::enable_if_t< Dune::IsNumber< FieldScalar >::value, FieldScalar > Dumux::vtmv (const Dune::DenseVector< V1 > &v1, const FieldScalar m, const Dune::DenseVector< V2 > &v2)
 Evaluates the scalar product of a vector v2, scaled by a scalar m, with a vector v1. More...
 
void Dumux::setParam (Dune::ParameterTree &params, const std::string &group, const std::string &key, const std::string &value)
 a free function to set model- or problem-specific default parameters More...
 
template<typename T , typename... Args>
Dumux::getParam (Args &&... args)
 A free function to get a parameter from the parameter tree singleton. More...
 
template<typename T , typename... Args>
Dumux::getParamFromGroup (Args &&... args)
 A free function to get a parameter from the parameter tree singleton with a model group. More...
 
bool Dumux::hasParam (const std::string &param)
 Check whether a key exists in the parameter tree. More...
 
bool Dumux::hasParamInGroup (const std::string &paramGroup, const std::string &param)
 Check whether a key exists in the parameter tree with a model group prefix. More...
 
template<class TypeTag >
int Dumux::start_ (int argc, char **argv, void(*usage)(const char *, const std::string &))
 Provides a main function which reads in parameters from the command line and a parameter file. More...
 
template<class TypeTag >
int Dumux::start (int argc, char **argv, void(*usage)(const char *, const std::string &))
 Provides a main function with error handling. More...
 
bool Valgrind::Running ()
 Returns whether the program is running under Valgrind or not. More...
 
template<class T >
bool Valgrind::CheckDefined (const T &value)
 Make valgrind complain if the object occupied by an object is undefined. More...
 
template<class T >
void Valgrind::SetUndefined (const T &value)
 Make the memory on which an object resides undefined. More...
 
template<class T >
void Valgrind::SetDefined (const T &value)
 Make the memory on which an object resides defined. More...
 
template<class T >
void Valgrind::SetNoAccess (const T &value)
 Make valgrind complain if an object's memory is accessed. More...
 

Function Documentation

◆ antoine()

template<class Scalar >
Scalar Dumux::antoine ( Scalar  temperature,
Scalar  A,
Scalar  B,
Scalar  C 
)

Evaluates the Antoine equation used to calculate the vapour pressure of various liquids.

See http://en.wikipedia.org/wiki/Antoine_equation

Parameters
temperatureThe temperature [K] of the fluid
AThe first coefficient for the Antoine equation
BThe first coefficient for the Antoine equation
CThe first coefficient for the Antoine equation

◆ arithmeticMean()

template<class Scalar >
constexpr Scalar Dumux::arithmeticMean ( Scalar  x,
Scalar  y,
Scalar  wx = 1.0,
Scalar  wy = 1.0 
)
constexprnoexcept

Calculate the (weighted) arithmetic mean of two scalar values.

Parameters
xThe first input value
yThe second input value
wxThe first weight
wyThe second weight

◆ CheckDefined()

template<class T >
bool Valgrind::CheckDefined ( const T &  value)
inline

Make valgrind complain if the object occupied by an object is undefined.

Note
This does not check whether the destinations of the object's pointers or references are defined.
Template Parameters
TThe type of the object which ought to be checked
Parameters
valuethe object which valgrind should check

◆ crossProduct() [1/2]

template<class Scalar >
Scalar Dumux::crossProduct ( const Dune::FieldVector< Scalar, 2 > &  vec1,
const Dune::FieldVector< Scalar, 2 > &  vec2 
)

Cross product of two vectors in two-dimensional Euclidean space retuning scalar.

Parameters
vec1The first vector
vec2The second vector

◆ crossProduct() [2/2]

template<class Scalar >
Dune::FieldVector< Scalar, 3 > Dumux::crossProduct ( const Dune::FieldVector< Scalar, 3 > &  vec1,
const Dune::FieldVector< Scalar, 3 > &  vec2 
)

Cross product of two vectors in three-dimensional Euclidean space.

Parameters
vec1The first vector
vec2The second vector

◆ defaultUsageMessage()

std::string Dumux::defaultUsageMessage ( const std::string &  programName)
inline

Provides a general text block, that is part of error/ help messages.

Returns
The string that is the help / error message.

◆ geometricMean()

template<class Scalar >
Scalar Dumux::geometricMean ( Scalar  x,
Scalar  y 
)
noexcept

Calculate the geometric mean of two scalar values.

Parameters
xThe first input value
yThe second input value
Note
as std::sqrt is not constexpr this function is not constexpr

◆ getParam()

template<typename T , typename... Args>
T Dumux::getParam ( Args &&...  args)

A free function to get a parameter from the parameter tree singleton.

Note
auto endTime = getParam<double>("TimeManager.TEnd");
Once this has been called the first time, you cannot modify the parameter tree anymore

◆ getParamFromGroup()

template<typename T , typename... Args>
T Dumux::getParamFromGroup ( Args &&...  args)

A free function to get a parameter from the parameter tree singleton with a model group.

Note
auto endTime = getParamFromGroup<double>("FreeFlow", "TimeManager.TEnd");
Once this has been called the first time, you cannot modify the parameter tree anymore

◆ getTransposed() [1/2]

template<class Scalar >
Dune::DynamicMatrix< Scalar > Dumux::getTransposed ( const Dune::DynamicMatrix< Scalar > &  M)

Transpose a DynamicMatrix.

Parameters
MThe matrix to be transposed

◆ getTransposed() [2/2]

template<class Scalar , int m, int n>
Dune::FieldMatrix< Scalar, n, m > Dumux::getTransposed ( const Dune::FieldMatrix< Scalar, m, n > &  M)

Transpose a FieldMatrix.

Parameters
MThe matrix to be transposed

◆ harmonicMean()

template<class Scalar >
constexpr Scalar Dumux::harmonicMean ( Scalar  x,
Scalar  y,
Scalar  wx = 1.0,
Scalar  wy = 1.0 
)
constexprnoexcept

Calculate the (weighted) harmonic mean of two scalar values.

Parameters
xThe first input value
yThe second input value
wxThe first weight
wyThe second weight

◆ harmonicMeanMatrix()

template<class Scalar , int m, int n>
void Dumux::harmonicMeanMatrix ( Dune::FieldMatrix< Scalar, m, n > &  K,
const Dune::FieldMatrix< Scalar, m, n > &  Ki,
const Dune::FieldMatrix< Scalar, m, n > &  Kj 
)

Calculate the harmonic mean of a fixed-size matrix.

This is done by calculating the harmonic mean for each entry individually. The result is stored the first argument.

Parameters
KThe matrix for storing the result
KiThe first input matrix
KjThe second input matrix

◆ hasParam()

bool Dumux::hasParam ( const std::string &  param)
inline

Check whether a key exists in the parameter tree.

Note
Once this has been called the first time, you cannot modify the parameter tree anymore

◆ hasParamInGroup()

bool Dumux::hasParamInGroup ( const std::string &  paramGroup,
const std::string &  param 
)
inline

Check whether a key exists in the parameter tree with a model group prefix.

Note
Once this has been called the first time, you cannot modify the parameter tree anymore

◆ interpolate()

template<class Policy = InterpolationPolicy::Linear, class Scalar , class Parameter >
Scalar Dumux::interpolate ( Scalar  ip,
Parameter &&  params 
)

a generic function to interpolate given a set of parameters and an interpolation point

Parameters
paramsthe parameters used for interpolation (depends on the policy used)
ipthe interpolation point

◆ invertCubicPolynomial()

template<class Scalar , class SolContainer >
int Dumux::invertCubicPolynomial ( SolContainer *  sol,
Scalar  a,
Scalar  b,
Scalar  c,
Scalar  d 
)

Invert a cubic polynomial analytically.

The polynomial is defined as

\[ p(x) = a\; x^3 + + b\;x^3 + c\;x + d \]

This method teturns the number of solutions which are in the real numbers. The "sol" argument contains the real roots of the cubic polynomial in order with the smallest root first.

Parameters
solContainer into which the solutions are written
aThe coefficiont for the cubic term
bThe coefficiont for the quadratic term
cThe coefficiont for the linear term
dThe coefficiont for the constant term

◆ invertLinearPolynomial()

template<class Scalar , class SolContainer >
int Dumux::invertLinearPolynomial ( SolContainer &  sol,
Scalar  a,
Scalar  b 
)

Invert a linear polynomial analytically.

The polynomial is defined as

\[ p(x) = a\; x + b \]

This method Returns the number of solutions which are in the real numbers, i.e. 1 except if the slope of the line is 0.

Parameters
solContainer into which the solutions are written
aThe coefficiont for the linear term
bThe coefficiont for the constant term

◆ invertQuadraticPolynomial()

template<class Scalar , class SolContainer >
int Dumux::invertQuadraticPolynomial ( SolContainer &  sol,
Scalar  a,
Scalar  b,
Scalar  c 
)

Invert a quadratic polynomial analytically.

The polynomial is defined as

\[ p(x) = a\; x^2 + + b\;x + c \]

This method returns the number of solutions which are in the real numbers. The "sol" argument contains the real roots of the parabola in order with the smallest root first.

Parameters
solContainer into which the solutions are written
aThe coefficiont for the quadratic term
bThe coefficiont for the linear term
cThe coefficiont for the constant term

◆ isBetween()

template<class Scalar , int dim>
bool Dumux::isBetween ( const Dune::FieldVector< Scalar, dim > &  pos,
const Dune::FieldVector< Scalar, dim > &  smallerVec,
const Dune::FieldVector< Scalar, dim > &  largerVec 
)

Comparison of three position vectors.

Compares an current position vector with two reference vector, and returns true if the position vector lies in between them. "Between" in this case means that all the entries of each spacial dimension are smaller in comparison with the larger reference vector as well as larger campared to the smaller reference. This is comfortable to cheack weather the current position is located inside or outside of a lense with different properties.

Parameters
posVektor holding the current Position that is to be checked
smallerVecReference vector, holding the minimum values for comparison.
largerVecReference vector, holding the maximum values for comparison.

◆ isLarger()

template<class Scalar , int dim>
bool Dumux::isLarger ( const Dune::FieldVector< Scalar, dim > &  pos,
const Dune::FieldVector< Scalar, dim > &  smallerVec 
)

Comparison of two position vectors.

Compares an current position vector with a reference vector, and returns true if the position vector is larger. "Larger" in this case means that all the entries of each spacial dimension are larger compared to the reference vector.

Parameters
posVektor holding the current Position that is to be checked
smallerVecReference vector, holding the minimum values for comparison.

◆ isSmaller()

template<class Scalar , int dim>
bool Dumux::isSmaller ( const Dune::FieldVector< Scalar, dim > &  pos,
const Dune::FieldVector< Scalar, dim > &  largerVec 
)

Comparison of two position vectors.

Compares an current position vector with a reference vector, and returns true if the position vector is smaller. "Smaller" in this case means that all the entries of each spacial dimension are smaller in comparison with the reference vector.

Parameters
posVektor holding the current Position that is to be checked
largerVecReference vector, holding the maximum values for comparison.

◆ linspace()

template<class Scalar >
std::vector< Scalar > Dumux::linspace ( const Scalar  begin,
const Scalar  end,
std::size_t  samples 
)

Generates linearly spaced vectors.

Parameters
beginThe first value in the vector
endThe last value in the vector
samplesThe size of the vector

◆ multiplyMatrices() [1/2]

template<class Scalar >
Dune::DynamicMatrix< Scalar > Dumux::multiplyMatrices ( const Dune::DynamicMatrix< Scalar > &  M1,
const Dune::DynamicMatrix< Scalar > &  M2 
)

Multiply two dynamic matrices.

Parameters
M1The first dynamic matrix
M2The second dynamic matrix (to be multiplied to M1 from the right side)

◆ multiplyMatrices() [2/2]

template<class Scalar , int rows1, int cols1, int cols2>
Dune::FieldMatrix< Scalar, rows1, cols2 > Dumux::multiplyMatrices ( const Dune::FieldMatrix< Scalar, rows1, cols1 > &  M1,
const Dune::FieldMatrix< Scalar, cols1, cols2 > &  M2 
)

Multiply two field matrices.

Parameters
M1The first field matrix
M2The second field matrix (to be multiplied to M1 from the right side)

◆ mv() [1/2]

template<class MAT , class V >
Dune::DenseVector< V >::derived_type Dumux::mv ( const Dune::DenseMatrix< MAT > &  M,
const Dune::DenseVector< V > &  v 
)

Returns the result of the projection of a vector v with a Matrix M.

Note: We use DenseVector and DenseMatrix here so that it can be used with the statically and dynamically allocated Dune Vectors/Matrices. Size mismatch assertions are done in the respective Dune classes.

Parameters
MThe matrix
vThe vector

◆ mv() [2/2]

template<class FieldScalar , class V >
std::enable_if_t< Dune::IsNumber< FieldScalar >::value, typename Dune::DenseVector< V >::derived_type > Dumux::mv ( const FieldScalar  m,
const Dune::DenseVector< V > &  v 
)

Returns the result of a vector v multiplied by a scalar m.

   Note: We use DenseVector and DenseMatrix here so that
   it can be used with the statically and dynamically
   allocated Dune Vectors/Matrices. Size mismatch
   assertions are done in the respective Dune classes.
Note
We need the enable_if to make sure that only Scalars fit here. Matrix types are forced to use the above mv(DenseMatrix, DenseVector) instead.
Parameters
mThe scale factor
vThe vector

◆ Running()

bool Valgrind::Running ( )
inline

Returns whether the program is running under Valgrind or not.

◆ SetDefined()

template<class T >
void Valgrind::SetDefined ( const T &  value)
inline

Make the memory on which an object resides defined.

Template Parameters
TThe type of the object which valgrind should consider as defined
Parameters
valueThe object which's memory valgrind should consider as defined

◆ SetNoAccess()

template<class T >
void Valgrind::SetNoAccess ( const T &  value)
inline

Make valgrind complain if an object's memory is accessed.

Template Parameters
TThe type of the object which valgrind should complain if accessed
Parameters
valueThe object which's memory valgrind should complain if accessed

◆ setParam()

void Dumux::setParam ( Dune::ParameterTree &  params,
const std::string &  group,
const std::string &  key,
const std::string &  value 
)

a free function to set model- or problem-specific default parameters

◆ SetUndefined()

template<class T >
void Valgrind::SetUndefined ( const T &  value)
inline

Make the memory on which an object resides undefined.

Template Parameters
TThe type of the object which ought to be set to undefined
Parameters
valueThe object which's memory valgrind should be told is undefined

◆ sign()

template<class ValueType >
constexpr int Dumux::sign ( const ValueType &  value)
constexprnoexcept

Sign or signum function.

Returns 1 for a positive argument. Returns -1 for a negative argument. Returns 0 if the argument is zero.

◆ start()

template<class TypeTag >
int Dumux::start ( int  argc,
char **  argv,
void(*)(const char *, const std::string &)  usage 
)

Provides a main function with error handling.

Template Parameters
TypeTagThe type tag of the problem which needs to be solved
Parameters
argcThe number of command line arguments of the program
argvThe contents of the command line arguments of the program
usageCallback function for printing the usage message

◆ start_()

template<class TypeTag >
int Dumux::start_ ( int  argc,
char **  argv,
void(*)(const char *, const std::string &)  usage 
)

Provides a main function which reads in parameters from the command line and a parameter file.

Template Parameters
TypeTagThe type tag of the problem which needs to be solved
Parameters
argcThe 'argc' argument of the main function: count of arguments (1 if there are no arguments)
argvThe 'argv' argument of the main function: array of pointers to the argument strings
usageCallback function for printing the usage message

◆ trace()

template<class MatrixType >
Dune::DenseMatrix< MatrixType >::field_type Dumux::trace ( const Dune::DenseMatrix< MatrixType > &  M)

Trace of a dense matrix.

Parameters
MThe dense matrix

◆ tripleProduct()

template<class Scalar >
Scalar Dumux::tripleProduct ( const Dune::FieldVector< Scalar, 3 > &  vec1,
const Dune::FieldVector< Scalar, 3 > &  vec2,
const Dune::FieldVector< Scalar, 3 > &  vec3 
)

Triple product of three vectors in three-dimensional Euclidean space retuning scalar.

Parameters
vec1The first vector
vec2The second vector
vec3The third vector

◆ vtmv() [1/2]

template<class V1 , class MAT , class V2 >
Dune::DenseMatrix< MAT >::value_type Dumux::vtmv ( const Dune::DenseVector< V1 > &  v1,
const Dune::DenseMatrix< MAT > &  M,
const Dune::DenseVector< V2 > &  v2 
)

Evaluates the scalar product of a vector v2, projected by a matrix M, with a vector v1.

Note: We use DenseVector and DenseMatrix here so that it can be used with the statically and dynamically allocated Dune Vectors/Matrices. Size mismatch assertions are done in the respective Dune classes.

Parameters
v1The first vector
MThe matrix
v2The second vector

◆ vtmv() [2/2]

template<class V1 , class FieldScalar , class V2 >
std::enable_if_t< Dune::IsNumber< FieldScalar >::value, FieldScalar > Dumux::vtmv ( const Dune::DenseVector< V1 > &  v1,
const FieldScalar  m,
const Dune::DenseVector< V2 > &  v2 
)

Evaluates the scalar product of a vector v2, scaled by a scalar m, with a vector v1.

Note: We use DenseVector and DenseMatrix here so that it can be used with the statically and dynamically allocated Dune Vectors/Matrices. Size mismatch assertions are done in the respective Dune classes.

Note
We need the enable_if to make sure that only Scalars fit here. Matrix types are forced to use the above vtmv(DenseVector, DenseMatrix, DenseVector) instead.
Parameters
v1The first vector
mThe scale factor
v2The second vector