Skip to content
Snippets Groups Projects
Commit a8500e18 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'feature/deprecate-twoargs-init-staggeredgridvariables' into 'master'

[staggered] Depreate GridVariables::init with two arguments

See merge request !1312
parents 3f2b7a35 9ef27af4
No related branches found
No related tags found
2 merge requests!1337WIP Fix/dirichlet caching v2,!1312[staggered] Depreate GridVariables::init with two arguments
......@@ -24,6 +24,7 @@
#ifndef DUMUX_STAGGERED_GRID_VARIABLES_HH
#define DUMUX_STAGGERED_GRID_VARIABLES_HH
#include <dune/common/deprecated.hh>
#include <dumux/discretization/fvgridvariables.hh>
namespace Dumux {
......@@ -125,15 +126,15 @@ public:
{
this->curGridVolVars().update(this->fvGridGeometry(), curSol);
this->gridFluxVarsCache().update(this->fvGridGeometry(), this->curGridVolVars(), curSol, true);
this->prevGridVolVars().update(this->fvGridGeometry(), curSol);
}
//! initialize all variables (instationary case)
template<class SolVector>
DUNE_DEPRECATED_MSG("Use init with one argument")
void init(const SolVector& curSol, const SolVector& initSol)
{
this->curGridVolVars().update(this->fvGridGeometry(), curSol);
this->gridFluxVarsCache().update(this->fvGridGeometry(), this->curGridVolVars(), curSol, true);
this->prevGridVolVars().update(this->fvGridGeometry(), initSol);
init(initSol);
}
//! update the volume variables and the flux variables cache
......@@ -170,14 +171,15 @@ public:
void init(const SolVector& curSol)
{
this->curGridFaceVars().update(this->fvGridGeometry(), curSol);
this->prevGridFaceVars().update(this->fvGridGeometry(), curSol);
}
//! initialize all variables (instationary case)
template<class SolVector>
DUNE_DEPRECATED_MSG("Use init with one argument")
void init(const SolVector& curSol, const SolVector& initSol)
{
this->curGridFaceVars().update(this->fvGridGeometry(), curSol);
this->prevGridFaceVars().update(this->fvGridGeometry(), initSol);
init(initSol);
}
//! update the face variables
......@@ -251,15 +253,15 @@ public:
{
ParentType::init(curSol[cellCenterIdx]);
curGridFaceVariables_.update(*this->fvGridGeometry_, curSol[faceIdx]);
prevGridFaceVariables_.update(*this->fvGridGeometry_, curSol[faceIdx]);
}
//! initialize all variables (instationary case)
template<class SolutionVector>
DUNE_DEPRECATED_MSG("Use init with one argument")
void init(const SolutionVector& curSol, const SolutionVector& initSol)
{
ParentType::init(curSol[cellCenterIdx], initSol[cellCenterIdx]);
curGridFaceVariables_.update(*this->fvGridGeometry_, curSol[faceIdx]);
prevGridFaceVariables_.update(*this->fvGridGeometry_, initSol[faceIdx]);
init(initSol);
}
//! Sets the current state as the previous for next time step
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment