26#ifndef DUMUX_MPNC_LOCAL_RESIDUAL_HH
27#define DUMUX_MPNC_LOCAL_RESIDUAL_HH
29#include <dune/istl/bvector.hh>
44template<
class TypeTag>
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.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Property tag Indices
Definition: porousmediumflow/sequential/properties.hh:59
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:43
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.