From 258d4d3233cf5fd40b531efe6bd62bb3b6283303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=B6rl?= <maximilian.hoerl@mathematik.uni-stuttgart.de> Date: Thu, 23 Jan 2020 19:45:42 +0100 Subject: [PATCH] add permeability matrix to dgProblem --- dune/mmdg/problems/dgproblem.hh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/dune/mmdg/problems/dgproblem.hh b/dune/mmdg/problems/dgproblem.hh index c7ffb3d..f8d22f3 100644 --- a/dune/mmdg/problems/dgproblem.hh +++ b/dune/mmdg/problems/dgproblem.hh @@ -9,6 +9,8 @@ class DGProblem public: using Scalar = ctype; using Vector = Coordinate; + static constexpr int dimension = Coordinate::dimension; + using Matrix = Dune::FieldMatrix<Scalar, dimension, dimension>; //the exact solution at position pos virtual Scalar exactSolution (const Vector& pos) const @@ -22,14 +24,14 @@ class DGProblem return false; }; - //source term - virtual Scalar q (const Vector& pos) const //= 0; + //source term at position pos + virtual Scalar q (const Vector& pos) const { return Scalar(0.0); } //boundary condition at position pos - virtual Scalar boundary (const Vector& pos) const //= 0; + virtual Scalar boundary (const Vector& pos) const { return Scalar(0.0); } @@ -40,6 +42,20 @@ class DGProblem { return 1; } + + //permeability tensor at position pos + virtual Matrix K (const Vector& pos) const + { + Matrix permeability(0.0); + + for (int i = 0; i < dimension; i++) + { + permeability[i][i] = 1.0; + } + + //return identity matrix + return permeability; + } }; #endif -- GitLab