Loading...
Searching...
No Matches
Opm::FvBaseDiscretization< TypeTag > Class Template Reference

The base class for the finite volume discretization schemes. More...

`#include <fvbasediscretization.hh>`

Inheritance diagram for Opm::FvBaseDiscretization< TypeTag >:

## Classes

class | BlockVectorWrapper

## Public Member Functions

| FvBaseDiscretization (Simulator &simulator)
| FvBaseDiscretization (const FvBaseDiscretization &)=delete
void | finishInit ()
| Apply the initial conditions to the model.
bool | enableGridAdaptation () const
| Returns whether the grid ought to be adapted to the solution during the simulation.
void | applyInitialSolution ()
| Applies the initial solution for all degrees of freedom to which the model applies.
void | prefetch (const Element &) const
| Allows to improve the performance by prefetching all data which is associated with a given element.
NewtonMethod & | newtonMethod ()
| Returns the newton method object.
const NewtonMethod & | newtonMethod () const
| Returns the newton method object.
const IntensiveQuantities * | thermodynamicHint (unsigned globalIdx, unsigned timeIdx) const
| Return the thermodynamic hint for a entity on the grid at given time.
const IntensiveQuantities * | cachedIntensiveQuantities (unsigned globalIdx, unsigned timeIdx) const
| Return the cached intensive quantities for a entity on the grid at given time.
void | updateCachedIntensiveQuantities (const IntensiveQuantities &intQuants, unsigned globalIdx, unsigned timeIdx) const
| Update the intensive quantity cache for a entity on the grid at given time.
void | setIntensiveQuantitiesCacheEntryValidity (unsigned globalIdx, unsigned timeIdx, bool newValue) const
| Invalidate the cache for a given intensive quantities object.
unsigned | cachedIntensiveQuantityHistorySize () const
| Get the cached intensive quantity history size.
void | invalidateIntensiveQuantitiesCache (unsigned timeIdx) const
| Invalidate the whole intensive quantity cache for time index.
void | invalidateAndUpdateIntensiveQuantities (unsigned timeIdx) const
template<class GridViewType>
void | invalidateAndUpdateIntensiveQuantities (unsigned timeIdx, const GridViewType &gridView) const
void | shiftIntensiveQuantityCache (unsigned numSlots=1)
| Move the intensive quantities for a given time index to the back.
bool | enableStorageCache () const
| Returns true iff the storage term is cached.
void | setEnableStorageCache (bool enableStorageCache)
| Set the value of enable storage cache.
const EqVector & | cachedStorage (unsigned globalIdx, unsigned timeIdx) const
| Retrieve an entry of the cache for the storage term.
void | updateCachedStorage (unsigned globalIdx, unsigned timeIdx, const EqVector &value) const
| Set an entry of the cache for the storage term.
bool | storageCacheIsUpToDate (unsigned globalIdx, unsigned timeIdx) const
| Returns true if the storage cache entry for a given DOF and time index is up to date.
void | invalidateStorageCacheEntry (unsigned globalIdx, unsigned timeIdx) const
| Invalidate the storage cache for a given DOF and time index.
void | invalidateStorageCache (unsigned timeIdx) const
| Invalidate the whole storage cache for a given time index.
void | shiftStorageCache (unsigned numSlots=1) const
| Shift storage cache by a given number of time step slots.
Scalar | globalResidual (GlobalEqVector &dest, const SolutionVector &u) const
| Compute the global residual for an arbitrary solution vector.
Scalar | globalResidual (GlobalEqVector &dest) const
| Compute the global residual for the current solution vector.
void | globalStorage (EqVector &storage, unsigned timeIdx=0) const
| Compute the integral over the domain of the storage terms of all conservation quantities.
void | checkConservativeness (Scalar tolerance=-1, bool verbose=false) const
| Ensure that the difference between the storage terms of the last and of the current time step is consistent with the source and boundary terms.
Scalar | dofTotalVolume (unsigned globalIdx) const
| Returns the volume of a given control volume.
bool | isLocalDof (unsigned globalIdx) const
| Returns if the overlap of the volume ofa degree of freedom is non-zero.
Scalar | gridTotalVolume () const
| Returns the volume of the whole grid which represents the spatial domain.
const SolutionVector & | solution (unsigned timeIdx) const
| Reference to the solution at a given history index as a block vector.
SolutionVector & | solution (unsigned timeIdx)
const Linearizer & | linearizer () const
| Returns the operator linearizer for the global jacobian of the problem.
Linearizer & | linearizer ()
| Returns the object which linearizes the global system of equations at the current solution.
const LocalLinearizer & | localLinearizer (unsigned openMpThreadId) const
| Returns the local jacobian which calculates the local stiffness matrix for an arbitrary element.
LocalLinearizer & | localLinearizer (unsigned openMpThreadId)
const LocalResidual & | localResidual (unsigned openMpThreadId) const
| Returns the object to calculate the local residual function.
LocalResidual & | localResidual (unsigned openMpThreadId)
Scalar | primaryVarWeight (unsigned globalDofIdx, unsigned pvIdx) const
| Returns the relative weight of a primary variable for calculating relative errors.
Scalar | eqWeight (unsigned, unsigned) const
| Returns the relative weight of an equation.
Scalar | relativeDofError (unsigned vertexIdx, const PrimaryVariables &pv1, const PrimaryVariables &pv2) const
| Returns the relative error between two vectors of primary variables.
bool | update ()
| Try to progress the model to the next timestep.
void | syncOverlap ()
| Syncronize the values of the primary variables on the degrees of freedom that overlap with the neighboring processes.
void | updateBegin ()
| Called by the update() method before it tries to apply the newton method.
void | updateSuccessful ()
| Called by the update() method if it was successful.
void | adaptGrid ()
| Called by the update() method when the grid should be refined.
void | updateFailed ()
| Called by the update() method if it was unsuccessful.
void | advanceTimeLevel ()
| Called by the problem if a time integration was successful, post processing of the solution is done and the result has been written to disk.
template<class Restarter>
void | serialize (Restarter &)
| Serializes the current state of the model.
template<class Restarter>
void | deserialize (Restarter &)
| Deserializes the state of the model.
template<class DofEntity>
void | serializeEntity (std::ostream &outstream, const DofEntity &dof)
| Write the current solution for a degree of freedom to a restart file.
template<class DofEntity>
void | deserializeEntity (std::istream &instream, const DofEntity &dof)
| Reads the current solution variables for a degree of freedom from a restart file.
std::size_t | numGridDof () const
| Returns the number of degrees of freedom (DOFs) for the computational grid.
std::size_t | numAuxiliaryDof () const
| Returns the number of degrees of freedom (DOFs) of the auxiliary equations.
std::size_t | numTotalDof () const
| Returns the total number of degrees of freedom (i.e., grid plux auxiliary DOFs).
const DofMapper & | dofMapper () const
| Mapper to convert the Dune entities of the discretization's degrees of freedoms are to indices.
const VertexMapper & | vertexMapper () const
| Returns the mapper for vertices to indices.
const ElementMapper & | elementMapper () const
| Returns the mapper for elements to indices.
void | resetLinearizer ()
| Resets the Jacobian matrix linearizer, so that the boundary types can be altered.
std::string | primaryVarName (unsigned pvIdx) const
| Given an primary variable index, return a human readable name.
std::string | eqName (unsigned eqIdx) const
| Given an equation index, return a human readable name.
void | updatePVWeights (const ElementContext &) const
| Update the weights of all primary variables within an element given the complete set of intensive quantities.
void | addOutputModule (std::unique_ptr< BaseOutputModule< TypeTag > > newModule)
| Add an module for writing visualization output after a timestep.
template<class VtkMultiWriter>
void | addConvergenceVtkFields (VtkMultiWriter &writer, const SolutionVector &u, const GlobalEqVector &deltaU) const
| Add the vector fields for analysing the convergence of the newton method to the a VTK writer.
void | prepareOutputFields () const
| Prepare the quantities relevant for the current solution to be appended to the output writers.
void | appendOutputFields (BaseOutputWriter &writer) const
| Append the quantities relevant for the current solution to an output writer.
const GridView & | gridView () const
| Reference to the grid view of the spatial domain.
void | addAuxiliaryModule (BaseAuxiliaryModule< TypeTag > *auxMod)
| Add a module for an auxiliary equation.
void | clearAuxiliaryModules ()
| Causes the list of auxiliary equations to be cleared.
std::size_t | numAuxiliaryModules () const
| Returns the number of modules for auxiliary equations.
BaseAuxiliaryModule< TypeTag > * | auxiliaryModule (unsigned auxEqModIdx)
| Returns a given module for auxiliary equations.
const BaseAuxiliaryModule< TypeTag > * | auxiliaryModule (unsigned auxEqModIdx) const
| Returns a given module for auxiliary equations.
bool | storeIntensiveQuantities () const
| Returns true if the cache for intensive quantities is enabled.
const Timer & | prePostProcessTimer () const
const Timer & | linearizeTimer () const
const Timer & | solveTimer () const
const Timer & | updateTimer () const
template<class Serializer>
void | serializeOp (Serializer &serializer)
bool | operator== (const FvBaseDiscretization &rhs) const

## Static Public Member Functions

static void | registerParameters ()
| Register all run-time parameters for the model.
static std::string | discretizationName ()
| Returns a string of discretization's human-readable name.

## Protected Member Functions

SolutionVector & | mutableSolution (unsigned timeIdx) const
void | resizeAndResetIntensiveQuantitiesCache_ ()
template<class Context>
void | supplementInitialSolution_ (PrimaryVariables &, const Context &, unsigned, unsigned)
void | registerOutputModules_ ()
| Register all output modules which make sense for the model.
LocalResidual & | localResidual_ ()
| Reference to the local residal object.
bool | verbose_ () const
| Returns whether messages should be printed.
Implementation & | asImp_ ()
const Implementation & | asImp_ () const

## Protected Attributes

Simulator & | simulator_
GridView | gridView_
ElementMapper | elementMapper_
VertexMapper | vertexMapper_
std::vector< BaseAuxiliaryModule< TypeTag > * > | auxEqModules_
NewtonMethod | newtonMethod_
Timer | prePostProcessTimer_
Timer | linearizeTimer_
Timer | solveTimer_
Timer | updateTimer_
std::vector< LocalLinearizer > | localLinearizer_
std::unique_ptr< Linearizer > | linearizer_
std::vector< IntensiveQuantitiesVector > | intensiveQuantityCache_
std::vector< std::vector< unsigned char > > | intensiveQuantityCacheUpToDate_
std::array< std::unique_ptr< DiscreteFunction >, historySize > | solution_
std::list< std::unique_ptr< BaseOutputModule< TypeTag > > > | outputModules_
Scalar | gridTotalVolume_
std::vector< Scalar > | dofTotalVolume_
std::vector< bool > | isLocalDof_
std::array< GlobalEqVector, historySize > | storageCache_
std::array< std::vector< unsigned char >, historySize > | storageCacheUpToDate_
bool | enableGridAdaptation_
bool | enableIntensiveQuantityCache_
bool | enableStorageCache_
bool | enableThermodynamicHints_
unsigned | cachedIntensiveQuantityHistorySize_

## Detailed Description

template<class TypeTag>
class Opm::FvBaseDiscretization< TypeTag >

The base class for the finite volume discretization schemes.

## Member Function Documentation

## addAuxiliaryModule()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::addAuxiliaryModule | ( | BaseAuxiliaryModule< TypeTag > * | auxMod | ) |

inline

Add a module for an auxiliary equation.

This module can add additional degrees of freedom and additional off-diagonal elements, but the number of equations per DOF needs to be the same as for the "main" model.

For example, auxiliary modules can be used to specify non-neighboring connections, well equations or model couplings via mortar DOFs. Auxiliary equations are completely optional, though.

## addConvergenceVtkFields()

template<class TypeTag>
template<class VtkMultiWriter>

void Opm::FvBaseDiscretization< TypeTag >::addConvergenceVtkFields | ( | VtkMultiWriter & | writer,
|  | const SolutionVector & | u,
|  | const GlobalEqVector & | deltaU ) const

inline

Add the vector fields for analysing the convergence of the newton method to the a VTK writer.

Parameters

  writer | The writer object to which the fields should be added.
  u | The solution function
  deltaU | The delta of the solution function before and after the Newton update

## advanceTimeLevel()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::advanceTimeLevel | ( |  | ) |

inline

Called by the problem if a time integration was successful, post processing of the solution is done and the result has been written to disk.

This should prepare the model for the next time integration.

## cachedIntensiveQuantities()

template<class TypeTag>

const IntensiveQuantities * Opm::FvBaseDiscretization< TypeTag >::cachedIntensiveQuantities | ( | unsigned | globalIdx,
|  | unsigned | timeIdx ) const

inline

Return the cached intensive quantities for a entity on the grid at given time.

Attention
  If no up-to date intensive quantities are available, this method will return 0.

Parameters

  globalIdx | The global space index for the entity where a hint is requested.
  timeIdx | The index used by the time discretization.

## cachedStorage()

template<class TypeTag>

const EqVector & Opm::FvBaseDiscretization< TypeTag >::cachedStorage | ( | unsigned | globalIdx,
|  | unsigned | timeIdx ) const

inline

Retrieve an entry of the cache for the storage term.

This is supposed to represent a DOF's total amount of conservation quantities per volume unit at a given time. The user is responsible for making sure that the value of this is correct and that it can be used before this method is called.

Attention
  If the storage cache is disabled, or if the entry is not up to date, this method will throw a std::logic_error.

Parameters

  globalIdx | The index of the relevant degree of freedom in a grid-global vector
  timeIdx | The relevant index for the time discretization

## checkConservativeness()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::checkConservativeness | ( | Scalar | tolerance = -1,
|  | bool | verbose = false ) const

inline

Ensure that the difference between the storage terms of the last and of the current time step is consistent with the source and boundary terms.

This method is purely intented for debugging purposes. If the program is compiled with optimizations enabled, it becomes a no-op.

## clearAuxiliaryModules()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::clearAuxiliaryModules | ( |  | ) |

inline

Causes the list of auxiliary equations to be cleared.

Note that this method implies recreateMatrix()

## deserialize()

template<class TypeTag>
template<class Restarter>

void Opm::FvBaseDiscretization< TypeTag >::deserialize | ( | Restarter & |  | ) |

inline

Deserializes the state of the model.

Template Parameters

  Restarter | The type of the serializer class

Parameters

  res | The serializer object

## deserializeEntity()

template<class TypeTag>
template<class DofEntity>

void Opm::FvBaseDiscretization< TypeTag >::deserializeEntity | ( | std::istream & | instream,
|  | const DofEntity & | dof )

inline

Reads the current solution variables for a degree of freedom from a restart file.

Parameters

  instream | The stream from which the vertex data should be deserialized from
  dof | The Dune entity which's data should be deserialized

## dofTotalVolume()

template<class TypeTag>

Scalar Opm::FvBaseDiscretization< TypeTag >::dofTotalVolume | ( | unsigned | globalIdx | ) | const

inline

Returns the volume of a given control volume.

Parameters

  globalIdx | The global index of the degree of freedom

## enableStorageCache()

template<class TypeTag>

bool Opm::FvBaseDiscretization< TypeTag >::enableStorageCache | ( |  | ) | const

inline

Returns true iff the storage term is cached.

Be aware that calling the *CachedStorage() methods if the storage cache is disabled will crash the program.

## eqName()

template<class TypeTag>

std::string Opm::FvBaseDiscretization< TypeTag >::eqName | ( | unsigned | eqIdx | ) | const

inline

Given an equation index, return a human readable name.

Parameters

  eqIdx | The index of the conservation equation of interest.

## eqWeight()

template<class TypeTag>

Scalar Opm::FvBaseDiscretization< TypeTag >::eqWeight | ( | unsigned | ,
|  | unsigned | ) const

inline

Returns the relative weight of an equation.

Parameters

  globalVertexIdx | The global index of the vertex
  eqIdx | The index of the equation

## globalResidual() [1/2]

template<class TypeTag>

Scalar Opm::FvBaseDiscretization< TypeTag >::globalResidual | ( | GlobalEqVector & | dest | ) | const

inline

Compute the global residual for the current solution vector.

Parameters

  dest | Stores the result

## globalResidual() [2/2]

template<class TypeTag>

Scalar Opm::FvBaseDiscretization< TypeTag >::globalResidual | ( | GlobalEqVector & | dest,
|  | const SolutionVector & | u ) const

inline

Compute the global residual for an arbitrary solution vector.

Parameters

  dest | Stores the result
  u | The solution for which the residual ought to be calculated

## globalStorage()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::globalStorage | ( | EqVector & | storage,
|  | unsigned | timeIdx = 0 ) const

inline

Compute the integral over the domain of the storage terms of all conservation quantities.

## invalidateIntensiveQuantitiesCache()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::invalidateIntensiveQuantitiesCache | ( | unsigned | timeIdx | ) | const

inline

Invalidate the whole intensive quantity cache for time index.

Parameters

  timeIdx | The index used by the time discretization.

## invalidateStorageCache()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::invalidateStorageCache | ( | unsigned | timeIdx | ) | const

inline

Invalidate the whole storage cache for a given time index.

Parameters

  timeIdx | The index used by the time discretization

## invalidateStorageCacheEntry()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::invalidateStorageCacheEntry | ( | unsigned | globalIdx,
|  | unsigned | timeIdx ) const

inline

Invalidate the storage cache for a given DOF and time index.

Parameters

  globalIdx | The global space index for the entity
  timeIdx | The index used by the time discretization

## isLocalDof()

template<class TypeTag>

bool Opm::FvBaseDiscretization< TypeTag >::isLocalDof | ( | unsigned | globalIdx | ) | const

inline

Returns if the overlap of the volume ofa degree of freedom is non-zero.

Parameters

  globalIdx | The global index of the degree of freedom

## localLinearizer() [1/2]

template<class TypeTag>

LocalLinearizer & Opm::FvBaseDiscretization< TypeTag >::localLinearizer | ( | unsigned | openMpThreadId | ) |

inline

## localLinearizer() [2/2]

template<class TypeTag>

const LocalLinearizer & Opm::FvBaseDiscretization< TypeTag >::localLinearizer | ( | unsigned | openMpThreadId | ) | const

inline

Returns the local jacobian which calculates the local stiffness matrix for an arbitrary element.

The local stiffness matrices of the element are used by the jacobian linearizer to produce a global linerization of the problem.

## localResidual()

template<class TypeTag>

LocalResidual & Opm::FvBaseDiscretization< TypeTag >::localResidual | ( | unsigned | openMpThreadId | ) |

inline

## mutableSolution()

template<class TypeTag>

SolutionVector & Opm::FvBaseDiscretization< TypeTag >::mutableSolution | ( | unsigned | timeIdx | ) | const

inline protected

## newtonMethod()

template<class TypeTag>

const NewtonMethod & Opm::FvBaseDiscretization< TypeTag >::newtonMethod | ( |  | ) | const

inline

Returns the newton method object.

## primaryVarName()

template<class TypeTag>

std::string Opm::FvBaseDiscretization< TypeTag >::primaryVarName | ( | unsigned | pvIdx | ) | const

inline

Given an primary variable index, return a human readable name.

Parameters

  pvIdx | The index of the primary variable of interest.

## primaryVarWeight()

template<class TypeTag>

Scalar Opm::FvBaseDiscretization< TypeTag >::primaryVarWeight | ( | unsigned | globalDofIdx,
|  | unsigned | pvIdx ) const

inline

Returns the relative weight of a primary variable for calculating relative errors.

Parameters

  globalDofIdx | The global index of the degree of freedom
  pvIdx | The index of the primary variable

## registerOutputModules_()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::registerOutputModules_ | ( |  | ) |

inline protected

Register all output modules which make sense for the model.

This method is supposed to be overloaded by the actual models, or else only the primary variables can be written to the result files.

## relativeDofError()

template<class TypeTag>

Scalar Opm::FvBaseDiscretization< TypeTag >::relativeDofError | ( | unsigned | vertexIdx,
|  | const PrimaryVariables & | pv1,
|  | const PrimaryVariables & | pv2 ) const

inline

Returns the relative error between two vectors of primary variables.

Parameters

  vertexIdx | The global index of the control volume's associated vertex
  pv1 | The first vector of primary variables
  pv2 | The second vector of primary variables

## serialize()

template<class TypeTag>
template<class Restarter>

void Opm::FvBaseDiscretization< TypeTag >::serialize | ( | Restarter & |  | ) |

inline

Serializes the current state of the model.

Template Parameters

  Restarter | The type of the serializer class

Parameters

  res | The serializer object

## serializeEntity()

template<class TypeTag>
template<class DofEntity>

void Opm::FvBaseDiscretization< TypeTag >::serializeEntity | ( | std::ostream & | outstream,
|  | const DofEntity & | dof )

inline

Write the current solution for a degree of freedom to a restart file.

Parameters

  outstream | The stream into which the vertex data should be serialized to
  dof | The Dune entity which's data should be serialized

## setEnableStorageCache()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::setEnableStorageCache | ( | bool | enableStorageCache | ) |

inline

Set the value of enable storage cache.

Be aware that calling the *CachedStorage() methods if the storage cache is disabled will crash the program.

## setIntensiveQuantitiesCacheEntryValidity()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::setIntensiveQuantitiesCacheEntryValidity | ( | unsigned | globalIdx,
|  | unsigned | timeIdx,
|  | bool | newValue ) const

inline

Invalidate the cache for a given intensive quantities object.

Parameters

  globalIdx | The global space index for the entity where a hint is to be set.
  timeIdx | The index used by the time discretization.
  newValue | New validity value

## shiftIntensiveQuantityCache()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::shiftIntensiveQuantityCache | ( | unsigned | numSlots = 1 | ) |

inline

Move the intensive quantities for a given time index to the back.

This method should only be called by the time discretization.

Parameters

  numSlots | The number of time step slots for which the hints should be shifted.

## shiftStorageCache()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::shiftStorageCache | ( | unsigned | numSlots = 1 | ) | const

inline

Shift storage cache by a given number of time step slots.

This should be called at the end of each time step to move the storage cache for timeIdx=0 (current time) to timeIdx=1 (previous time) and so on.

This method should only be called by the time discretization.

Parameters

  numSlots | The number of time step slots for which the storage cache should be shifted.

## solution() [1/2]

template<class TypeTag>

SolutionVector & Opm::FvBaseDiscretization< TypeTag >::solution | ( | unsigned | timeIdx | ) |

inline

## solution() [2/2]

template<class TypeTag>

const SolutionVector & Opm::FvBaseDiscretization< TypeTag >::solution | ( | unsigned | timeIdx | ) | const

inline

Reference to the solution at a given history index as a block vector.

Parameters

  timeIdx | The index of the solution used by the time discretization.

## storageCacheIsUpToDate()

template<class TypeTag>

bool Opm::FvBaseDiscretization< TypeTag >::storageCacheIsUpToDate | ( | unsigned | globalIdx,
|  | unsigned | timeIdx ) const

inline

Returns true if the storage cache entry for a given DOF and time index is up to date.

Parameters

  globalIdx | The global space index for the entity
  timeIdx | The index used by the time discretization

## syncOverlap()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::syncOverlap | ( |  | ) |

inline

Syncronize the values of the primary variables on the degrees of freedom that overlap with the neighboring processes.

By default, this method does nothing...

## thermodynamicHint()

template<class TypeTag>

const IntensiveQuantities * Opm::FvBaseDiscretization< TypeTag >::thermodynamicHint | ( | unsigned | globalIdx,
|  | unsigned | timeIdx ) const

inline

Return the thermodynamic hint for a entity on the grid at given time.

The hint is defined as a IntensiveQuantities object which is supposed to be "close" to the IntensiveQuantities of the current solution. It can be used as a good starting point for non-linear solvers when having to solve non-linear relations while updating the intensive quantities. (This may yield a major performance boost depending on how the physical models require.)

Attention
  If no up-to date intensive quantities are available, or if hints have been disabled, this method will return 0.

Parameters

  globalIdx | The global space index for the entity where a hint is requested.
  timeIdx | The index used by the time discretization.

## update()

template<class TypeTag>

bool Opm::FvBaseDiscretization< TypeTag >::update | ( |  | ) |

inline

Try to progress the model to the next timestep.

Parameters

  solver | The non-linear solver

## updateBegin()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::updateBegin | ( |  | ) |

inline

Called by the update() method before it tries to apply the newton method.

This is primary a hook which the actual model can overload.

## updateCachedIntensiveQuantities()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::updateCachedIntensiveQuantities | ( | const IntensiveQuantities & | intQuants,
|  | unsigned | globalIdx,
|  | unsigned | timeIdx ) const

inline

Update the intensive quantity cache for a entity on the grid at given time.

Parameters

  intQuants | The IntensiveQuantities object hint for a given degree of freedom.
  globalIdx | The global space index for the entity where a hint is to be set.
  timeIdx | The index used by the time discretization.

## updateCachedStorage()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::updateCachedStorage | ( | unsigned | globalIdx,
|  | unsigned | timeIdx,
|  | const EqVector & | value ) const

inline

Set an entry of the cache for the storage term.

This is supposed to represent a DOF's total amount of conservation quantities per volume unit at a given time. The user is responsible for making sure that the storage cache is enabled before this method is called.

Parameters

  globalIdx | The index of the relevant degree of freedom in a grid-global vector
  timeIdx | The relevant index for the time discretization
  value | The new value of the cache for the storage term

## updateFailed()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::updateFailed | ( |  | ) |

inline

Called by the update() method if it was unsuccessful.

This is primary a hook which the actual model can overload.

## updatePVWeights()

template<class TypeTag>

void Opm::FvBaseDiscretization< TypeTag >::updatePVWeights | ( | const ElementContext & |  | ) | const

inline

Update the weights of all primary variables within an element given the complete set of intensive quantities.

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

- opm/models/discretization/common/fvbasediscretization.hh