24#ifndef DUMUX_ELEMENTDATA2P_ADAPTIVE_HH
25#define DUMUX_ELEMENTDATA2P_ADAPTIVE_HH
27#include <dune/grid/utility/persistentcontainer.hh>
41template<class TypeTag, bool enableCompressibility = getPropValue<TypeTag, Properties::EnableCompressibility>()>
47 using Grid =
typename GridView::Grid;
50 using Element =
typename GridView::Traits::template Codim<0>::Entity;
56 wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx
109 adaptedValues.
potW = this->potential(wPhaseIdx);
110 adaptedValues.
potNw = this->potential(nPhaseIdx);
111 adaptedValues.
volCorr = this->volumeCorrection();
127 const Element& fatherElement)
133 adaptedValuesFather.
potW += adaptedValues.
potW / adaptedValues.
count;
134 adaptedValuesFather.
potNw += adaptedValues.
potNw / adaptedValues.
count;
150 this->setSaturation(wPhaseIdx, adaptedValues.
saturationW / adaptedValues.
count);
151 this->setSaturation(nPhaseIdx, adaptedValues.
saturationNw / adaptedValues.
count);
152 this->setPressure(wPhaseIdx, adaptedValues.
pressW / adaptedValues.
count);
153 this->setPressure(nPhaseIdx, adaptedValues.
pressNw / adaptedValues.
count);
154 this->setPotential(wPhaseIdx, adaptedValues.
potW / adaptedValues.
count);
155 this->setPotential(nPhaseIdx, adaptedValues.
potNw / adaptedValues.
count);
156 this->setUpdate(adaptedValues.
volCorr / adaptedValues.
count);
172 const Element& father,
const Element& son,
const Problem& problem)
180 adaptedValues.
potW = adaptedValuesFather.
potW / adaptedValuesFather.
count;
181 adaptedValues.
potNw = adaptedValuesFather.
potNw / adaptedValuesFather.
count;
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
std::string saturation(int phaseIdx) noexcept
I/O name of saturation for multiphase systems.
Definition: name.hh:43
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
Class including data of one grid cell.
Definition: 2p/sequential/celldata.hh:47
Class including the data of a grid cell needed if an adaptive grid is used.
Definition: sequential/celldataadaptive.hh:43
CellData2PAdaptive()
Constructs an adaptive CellData object.
Definition: sequential/celldataadaptive.hh:91
static void storeAdaptionValues(AdaptedValues &adaptedValues, AdaptedValues &adaptedValuesFather, const Element &fatherElement)
Stores sons entries into father element for averaging.
Definition: sequential/celldataadaptive.hh:125
static void reconstructAdaptionValues(Dune::PersistentContainer< Grid, AdaptedValues > &adaptionMap, const Element &father, const Element &son, const Problem &problem)
Reconstructs sons entries from data of father cell.
Definition: sequential/celldataadaptive.hh:171
void setAdaptionValues(AdaptedValues &adaptedValues, const Element &element)
Set adapted values in CellData.
Definition: sequential/celldataadaptive.hh:148
void storeAdaptionValues(AdaptedValues &adaptedValues, const Element &element)
Stores values to be adapted in an adaptedValues container.
Definition: sequential/celldataadaptive.hh:103
Collection of variables that have to be mapped if the grid is adapted For an immiscible two-phase mod...
Definition: sequential/celldataadaptive.hh:66
Scalar saturationNw
Definition: sequential/celldataadaptive.hh:68
Scalar volCorr
Definition: sequential/celldataadaptive.hh:73
Scalar saturationW
Definition: sequential/celldataadaptive.hh:67
int count
Definition: sequential/celldataadaptive.hh:74
Scalar potNw
Definition: sequential/celldataadaptive.hh:72
Scalar pressNw
Definition: sequential/celldataadaptive.hh:70
Scalar pressW
Definition: sequential/celldataadaptive.hh:69
AdaptedValues()
Definition: sequential/celldataadaptive.hh:75
Scalar potW
Definition: sequential/celldataadaptive.hh:71
Storage container for discretized data of the constitutive relations for one element.