25#ifndef DUMUX_MULTIDOMAIN_FACET_BOX_UPWINDSCHEME_HH
26#define DUMUX_MULTIDOMAIN_FACET_BOX_UPWINDSCHEME_HH
39template<
class Gr
idGeometry>
44 template<
class FluxVariables,
class UpwindTermFunction,
class Scalar>
45 static Scalar
apply(
const FluxVariables& fluxVars,
46 const UpwindTermFunction& upwindTerm,
47 Scalar flux,
int phaseIdx)
50 static const Scalar upwindWeight = getParam<Scalar>(
"Flux.UpwindWeight");
52 const auto& elemVolVars = fluxVars.elemVolVars();
53 const auto& scvf = fluxVars.scvFace();
54 const auto& insideScv = fluxVars.fvGeometry().scv(scvf.insideScvIdx());
55 const auto& insideVolVars = elemVolVars[insideScv];
58 if (scvf.interiorBoundary())
60 const auto& cm = fluxVars.problem().couplingManager();
61 const auto& outsideVolVars = cm.getLowDimVolVars(fluxVars.element(), scvf);
62 if (std::signbit(flux))
63 return flux*(upwindWeight*upwindTerm(outsideVolVars)
64 + (1.0 - upwindWeight)*upwindTerm(insideVolVars));
66 return flux*(upwindWeight*upwindTerm(insideVolVars)
67 + (1.0 - upwindWeight)*upwindTerm(outsideVolVars));
71 const auto& outsideScv = fluxVars.fvGeometry().scv(scvf.outsideScvIdx());
72 const auto& outsideVolVars = elemVolVars[outsideScv];
73 if (std::signbit(flux))
74 return flux*(upwindWeight*upwindTerm(outsideVolVars)
75 + (1.0 - upwindWeight)*upwindTerm(insideVolVars));
77 return flux*(upwindWeight*upwindTerm(insideVolVars)
78 + (1.0 - upwindWeight)*upwindTerm(outsideVolVars));
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The available discretization methods in Dumux.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
The upwind scheme used for the advective fluxes. This is a modified scheme for models involving coupl...
Definition: multidomain/facet/box/upwindscheme.hh:41
static Scalar apply(const FluxVariables &fluxVars, const UpwindTermFunction &upwindTerm, Scalar flux, int phaseIdx)
Definition: multidomain/facet/box/upwindscheme.hh:45