25#ifndef DUMUX_FLUXDATA1P_HH
26#define DUMUX_FLUXDATA1P_HH
40template<
class TypeTag>
49 dim = GridView::dimension
52 using DimVector = Dune::FieldVector<Scalar, dim>;
53 using VelocityVector = Dune::FieldVector<DimVector, 2*dim>;
55 VelocityVector velocity_;
56 Scalar potential_[2 * dim];
57 bool velocityMarker_[2 * dim];
64 for (
int fIdx = 0; fIdx < 2*dim; fIdx++)
66 velocity_[fIdx] = DimVector(0.0);
67 potential_[fIdx] = 0.0;
68 velocityMarker_[fIdx] =
false;
83 return velocity_[indexInInside];
91 const DimVector&
velocity(
int indexInInside)
const
93 return velocity_[indexInInside];
104 velocity_[indexInInside] =
velocity;
110 for (
int i = 0; i < 2 * dim; i++)
114 velocityMarker_[i] =
false;
127 velocityMarker_[indexInInside] =
true;
139 return velocityMarker_[indexInInside];
145 for (
int i = 0; i < 2*dim; i++)
146 velocityMarker_[i] =
false;
159 return (potential_[indexInInside] >= 0.);
169 return (potential_[indexInInside] >= 0.);
179 return potential_[indexInInside];
189 return potential_[indexInInside];
200 potential_[indexInInside] = pot;
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 storing data assigned to a cell-cell interfaces, so-called flux-data.
Definition: 1p/sequential/fluxdata.hh:42
Scalar potential(int indexInInside)
Returns the potential at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:177
const DimVector & velocity(int indexInInside) const
Returns the velocity vector at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:91
bool isUpwindCell(int indexInInside) const
Checks for upwind direction Returns true if the cell is the upwind cell, otherwise false
Definition: 1p/sequential/fluxdata.hh:167
void setVelocity(int indexInInside, DimVector &velocity)
Sets the velocity vector at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:102
void resetVelocityMarker()
Resets the velocity marker.
Definition: 1p/sequential/fluxdata.hh:143
Scalar potential(int indexInInside) const
Returns the potential at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:187
bool haveVelocity(int indexInInside)
Check the velocity marker.
Definition: 1p/sequential/fluxdata.hh:137
void setVelocityMarker(int indexInInside)
Sets the velocity marker at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:125
const DimVector & velocity(int indexInInside)
Returns the velocity vector at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:81
void resetVelocity()
Resets velocities and potentials.
Definition: 1p/sequential/fluxdata.hh:108
FluxData1P()
Constructs a FluxData1P object.
Definition: 1p/sequential/fluxdata.hh:62
void setPotential(int indexInInside, Scalar pot)
Sets the potential at a cell-cell interface.
Definition: 1p/sequential/fluxdata.hh:198
bool isUpwindCell(int indexInInside)
Checks for upwind direction.
Definition: 1p/sequential/fluxdata.hh:157
Base file for properties related to sequential models.