Skip to content
Snippets Groups Projects
Commit 258d4d32 authored by Hörl, Maximilian's avatar Hörl, Maximilian
Browse files

add permeability matrix to dgProblem

parent 09ab6f78
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment