24#ifndef DUMUX_FLUXDATA2P2C_HH
25#define DUMUX_FLUXDATA2P2C_HH
41template<
class TypeTag>
51 dim = GridView::dimension
56 numEquations = getPropValue<TypeTag, Properties::NumEq>()
61 wPhaseIdx = Indices::wPhaseIdx,
62 nPhaseIdx = Indices::nPhaseIdx
67 numPhases = getPropValue<TypeTag, Properties::NumPhases>()
70 typename Dune::BlockVector<typename Dune::FieldVector<bool, numEquations>> isUpwindCell_;
71 using DimVector = Dune::FieldVector<Scalar, dim>;
72 using VelocityVector = Dune::FieldVector<DimVector, 2*dim>;
73 VelocityVector velocity_[numPhases];
80 isUpwindCell_.resize(2*dim);
81 for (
int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
82 for (
int fIdx = 0; fIdx < 2*dim; ++fIdx)
83 velocity_[phaseIdx][fIdx] = 0.0;
92 const DimVector&
velocity(
int phaseIdx,
int indexInInside)
94 return velocity_[phaseIdx][indexInInside];
103 const DimVector&
velocity(
int phaseIdx,
int indexInInside)
const
105 return velocity_[phaseIdx][indexInInside];
117 velocity_[phaseIdx][indexInInside] =
velocity;
127 return velocity_[wPhaseIdx][indexInInside]
128 + velocity_[nPhaseIdx][indexInInside];
138 return velocity_[wPhaseIdx][indexInInside]
139 + velocity_[nPhaseIdx][indexInInside];
145 isUpwindCell_.resize(
size);
150 return isUpwindCell_.size();
161 return isUpwindCell_[indexInInside][equationIdx];
172 isUpwindCell_[indexInInside][equationIdx] = value;
178 for(
int banana=0; banana<isUpwindCell_.size(); banana++)
179 printvector(std::cout, isUpwindCell_,
"upwindInformation",
"row", 3);
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
Class including the variables and data of discretized data of the constitutive relations.
Definition: 2p2c/sequential/fluxdata.hh:43
void resize(int size)
resizes the upwind vector for the case of hanging nodes
Definition: 2p2c/sequential/fluxdata.hh:143
DimVector velocityTotal(int indexInInside) const
Returns the total velocity vector at a cell-cell interface.
Definition: 2p2c/sequential/fluxdata.hh:136
void setUpwindCell(int indexInInside, int equationIdx, bool value)
Sets the upwind information.
Definition: 2p2c/sequential/fluxdata.hh:170
FluxData2P2C()
Constructor.
Definition: 2p2c/sequential/fluxdata.hh:78
const DimVector & velocity(int phaseIdx, int indexInInside) const
Returns the phase velocity vector at a cell-cell interface.
Definition: 2p2c/sequential/fluxdata.hh:103
void setVelocity(int phaseIdx, int indexInInside, const DimVector &velocity)
Sets the phase velocity vector at a cell-cell interface.
Definition: 2p2c/sequential/fluxdata.hh:115
void outputFluxData()
Console output for the FluxData.
Definition: 2p2c/sequential/fluxdata.hh:176
const DimVector & velocity(int phaseIdx, int indexInInside)
Returns the phase velocity vector at a cell-cell interface.
Definition: 2p2c/sequential/fluxdata.hh:92
const bool & isUpwindCell(int indexInInside, int equationIdx) const
Functions returning upwind information.
Definition: 2p2c/sequential/fluxdata.hh:159
int size()
returns the size of the upwind vector which equals number of faces
Definition: 2p2c/sequential/fluxdata.hh:148
DimVector velocityTotal(int indexInInside)
Returns the total velocity vector at a cell-cell interface.
Definition: 2p2c/sequential/fluxdata.hh:125
Base file for properties related to sequential models.