24#ifndef DUMUX_ELEMENTDATA2P2C_ADAPTIVE_HH
25#define DUMUX_ELEMENTDATA2P2C_ADAPTIVE_HH
27#include <dune/common/float_cmp.hh>
28#include <dune/grid/utility/persistentcontainer.hh>
43template<
class TypeTag>
49 using Grid =
typename GridView::Grid;
55 dim = GridView::dimension
62 wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx,
63 wCompIdx = Indices::wCompIdx, nCompIdx = Indices::nCompIdx
69 using Element =
typename GridView::Traits::template Codim<0>::Entity;
73 int upwindError_[numPhases];
114 for (
int i = 0; i < numPhases;i++)
135 adaptedValues.
cellVolume = element.geometry().volume();
152 const Element& fatherElement)
159 Scalar fatherVolume = fatherElement.geometry().volume();
160 if(adaptedValuesFather.
count == 1 << dim)
165 adaptedValuesFather.
cellVolume = fatherVolume;
228 const Element& father,
const Element& son,
const Problem& problem)
241 Scalar gTimesHeight = problem.gravity()
242 * (son.geometry().center() - father.geometry().center());
244 problem.spatialParams().porosity(son);
249 if(pressureType == wPhaseIdx)
253 Scalar pc = adaptedValuesFather.
pressure_[nPhaseIdx] / adaptedValuesFather.
count
259 = pc + adaptedValues.
pressure_[wPhaseIdx];
266 - adaptedValuesFather.
pressure_[wPhaseIdx] / adaptedValuesFather.
count;
271 = adaptedValues.
pressure_[nPhaseIdx] - pc;
Storage container for discretized data for multi-physics models.
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:153
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
void volumeDerivativesAvailable(bool value)
Specifies if volume derivatives are computed and available.
Definition 2p2c/sequential/celldata.hh:365
bool & wasRefined()
Indicates if current cell was refined at this time step.
Definition 2p2c/sequential/celldata.hh:374
const Scalar massConcentration(int compIdx) const
Returns the total mass concentration of a component .
Definition 2p2c/sequential/celldata.hh:145
void setMassConcentration(int compIdx, Scalar value)
Sets the total mass concentration of a component .
Definition 2p2c/sequential/celldata.hh:162
Scalar & dv_dp()
Return the derivative of specific volume w.r.t. pressure For details, see description of FVPressureCo...
Definition 2p2c/sequential/celldata.hh:242
FluxData & fluxData()
Acess to flux data, representing information living on the intersections.
Definition 2p2c/sequential/celldata.hh:101
Scalar & dv(int compIdx)
Return the derivative of spec. volume w.r.t. change of mass For details, see description of FVPressur...
Definition 2p2c/sequential/celldata.hh:258
CellData2P2CAdaptive()
Constructs an adaptive CellData object.
Definition c/sequential/celldataadaptive.hh:112
void setAdaptionValues(AdaptedValues &adaptedValues, const Element &element)
Set adapted values in CellData This methods stores reconstructed values into the cellData object,...
Definition c/sequential/celldataadaptive.hh:185
static void storeAdaptionValues(AdaptedValues &adaptedValues, AdaptedValues &adaptedValuesFather, const Element &fatherElement)
Adds cell information to father element for possible averaging / coarsening Sum up the adaptedValues ...
Definition c/sequential/celldataadaptive.hh:150
void storeAdaptionValues(AdaptedValues &adaptedValues, const Element &element)
Stores leaf cell primary variables to transfer to new indexing Stores values to be adapted from the c...
Definition c/sequential/celldataadaptive.hh:126
static void reconstructAdaptionValues(Dune::PersistentContainer< Grid, AdaptedValues > &adaptationMap, const Element &father, const Element &son, const Problem &problem)
Reconstructs sons entries from data of father cell Reconstructs an new solution from a father cell in...
Definition c/sequential/celldataadaptive.hh:227
A container for all necessary variables to map an old solution to a new grid If the primary variables...
Definition c/sequential/celldataadaptive.hh:88
FluxData2P2C< TypeTag > fluxData_
Information on old flux direction.
Definition c/sequential/celldataadaptive.hh:94
Dune::FieldVector< Scalar, 2 > totalConcentration_
Transport primary variables.
Definition c/sequential/celldataadaptive.hh:89
Dune::FieldVector< Scalar, 2 > pressure_
Definition c/sequential/celldataadaptive.hh:90
Dune::FieldVector< Scalar, 3 > volumeDerivatives_
Storage for volume derivatives, as transport estimate on old pressure field is not correct after refi...
Definition c/sequential/celldataadaptive.hh:92
int subdomain
subdomain
Definition c/sequential/celldataadaptive.hh:95
int count
counts the number of cells averaged
Definition c/sequential/celldataadaptive.hh:96
Scalar cellVolume
Cell volume for transformation of volume-specific primary variables.
Definition c/sequential/celldataadaptive.hh:93
AdaptedValues()
Definition c/sequential/celldataadaptive.hh:98
int isRefined
Indicates if cell is refined.
Definition c/sequential/celldataadaptive.hh:97
Scalar pressure(int phaseIdx)
DOC ME!
Definition celldatamultiphysics.hh:79
void setPressure(int phaseIdx, Scalar value)
DOC ME!
Definition celldatamultiphysics.hh:99
int & subdomain()
Return subdomain information.
Definition celldatamultiphysics.hh:118
void setSubdomainAndFluidStateType(int index)
Specify subdomain information and fluidStateType.
Definition celldatamultiphysics.hh:136
CellData2P2CMultiPhysics()
Constructor for a local storage object.
Definition celldatamultiphysics.hh:71
Class including the variables and data of discretized data of the constitutive relations.
Definition 2p2c/sequential/fluxdata.hh:43
Storage container for discretized data of the constitutive relations for one element.