24#ifndef TEST_1P_SPATIALPARAMS_HH
25#define TEST_1P_SPATIALPARAMS_HH
36template<
class TypeTag>
43 using IndexSet =
typename GridView::IndexSet;
45 using CoordScalar =
typename Grid::ctype;
48 {dim=Grid::dimension, dimWorld=Grid::dimensionworld};
49 using Element =
typename Grid::Traits::template Codim<0>::Entity;
51 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
52 using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
58 return permeability_[indexSet_.index(element)];
69 permeability_.resize(gridView_.size(0));
71 for(
const auto& element : elements(gridView_))
73 setPermeability_(permeability_[indexSet_.index(element)], element.geometry().center());
79 :
ParentType(problem), gridView_(problem.gridView()), indexSet_(problem.gridView().indexSet())
83 void setPermeability_(FieldMatrix& perm,
const GlobalPosition& globalPos)
const
85 double rt = globalPos[0]*globalPos[0]+globalPos[1]*globalPos[1];
86 perm[0][0] = (delta_*globalPos[0]*globalPos[0] + globalPos[1]*globalPos[1])/rt;
87 perm[0][1] = -(1.0 - delta_)*globalPos[0]*globalPos[1]/rt;
88 perm[1][0] = perm[0][1];
89 perm[1][1] = (globalPos[0]*globalPos[0] + delta_*globalPos[1]*globalPos[1])/rt;
92 const GridView gridView_;
93 const IndexSet& indexSet_;
94 std::vector<FieldMatrix> permeability_;
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
The base class for spatial parameters of problems using the fv method.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
The base class for spatial parameters of problems using the fv method.
Definition: sequentialfv1p.hh:42
spatial parameters for the test problem for 1-p diffusion models.
Definition: test_1pspatialparams.hh:38
const FieldMatrix & intrinsicPermeability(const Element &element) const
Definition: test_1pspatialparams.hh:56
void initialize(const double delta)
Definition: test_1pspatialparams.hh:66
TestOnePSpatialParams(const Problem &problem)
Definition: test_1pspatialparams.hh:78
double porosity(const Element &element) const
Definition: test_1pspatialparams.hh:61