13#ifndef DUMUX_MULTIDOMAIN_FACET_BOX_UPWINDSCHEME_HH
14#define DUMUX_MULTIDOMAIN_FACET_BOX_UPWINDSCHEME_HH
27template<
class Gr
idGeometry>
32 template<
class FluxVariables,
class UpwindTermFunction,
class Scalar>
33 static Scalar
apply(
const FluxVariables& fluxVars,
34 const UpwindTermFunction& upwindTerm,
35 Scalar flux,
int phaseIdx)
38 static const Scalar upwindWeight = getParam<Scalar>(
"Flux.UpwindWeight");
40 const auto& elemVolVars = fluxVars.elemVolVars();
41 const auto& scvf = fluxVars.scvFace();
42 const auto& insideScv = fluxVars.fvGeometry().scv(scvf.insideScvIdx());
43 const auto& insideVolVars = elemVolVars[insideScv];
46 if (scvf.interiorBoundary())
48 const auto& cm = fluxVars.problem().couplingManager();
49 const auto& outsideVolVars = cm.getLowDimVolVars(fluxVars.element(), scvf);
50 if (std::signbit(flux))
51 return flux*(upwindWeight*upwindTerm(outsideVolVars)
52 + (1.0 - upwindWeight)*upwindTerm(insideVolVars));
54 return flux*(upwindWeight*upwindTerm(insideVolVars)
55 + (1.0 - upwindWeight)*upwindTerm(outsideVolVars));
59 const auto& outsideScv = fluxVars.fvGeometry().scv(scvf.outsideScvIdx());
60 const auto& outsideVolVars = elemVolVars[outsideScv];
61 if (std::signbit(flux))
62 return flux*(upwindWeight*upwindTerm(outsideVolVars)
63 + (1.0 - upwindWeight)*upwindTerm(insideVolVars));
65 return flux*(upwindWeight*upwindTerm(insideVolVars)
66 + (1.0 - upwindWeight)*upwindTerm(outsideVolVars));
The upwind scheme used for the advective fluxes. This is a modified scheme for models involving coupl...
Definition: multidomain/facet/box/upwindscheme.hh:29
static Scalar apply(const FluxVariables &fluxVars, const UpwindTermFunction &upwindTerm, Scalar flux, int phaseIdx)
Definition: multidomain/facet/box/upwindscheme.hh:33
The available discretization methods in Dumux.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.