26#ifndef DUMUX_MPNC_LOCAL_RESIDUAL_HH
27#define DUMUX_MPNC_LOCAL_RESIDUAL_HH
29#include <dune/istl/bvector.hh>
44template<
class TypeTag>
54 using Indices =
typename ModelTraits::Indices;
56 enum {numPhases = ModelTraits::numFluidPhases()};
57 enum {phase0NcpIdx = Indices::phase0NcpIdx};
60 using ParentType::ParentType;
62 using typename ParentType::ElementResidualVector;
65 const FVElementGeometry& fvGeometry,
66 const ElementVolumeVariables& elemVolVars,
67 const ElementFluxVariablesCache& elemFluxVarsCache,
68 const ElementBoundaryTypes &bcTypes)
const
70 ElementResidualVector residual = ParentType::evalFluxAndSource(element, fvGeometry, elemVolVars, elemFluxVarsCache, bcTypes);
72 for (
auto&& scv : scvs(fvGeometry))
75 for (
int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
76 residual[scv.localDofIndex()][phase0NcpIdx + phaseIdx] = elemVolVars[scv].phaseNcp(phaseIdx);
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
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:45
MpNc specific details needed to approximately calculate the local defect in the fully implicit scheme...
Definition: porousmediumflow/mpnc/localresidual.hh:46
ElementResidualVector evalFluxAndSource(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const ElementBoundaryTypes &bcTypes) const
Definition: porousmediumflow/mpnc/localresidual.hh:64
Declares all properties used in Dumux.
Element-wise calculation of the local residual for problems using compositional fully implicit model.