Generalize to dim!=dimworld

parent 3b313677
Pipeline #14276 failed with stage
in 13 seconds
......@@ -12,6 +12,7 @@ template <class GridView>
class DiscretizationError
{
enum {dim = GridView::dimension};
enum {dimworld = GridView::dimensionworld};
typedef typename GridView::ctype ctype;
......@@ -21,7 +22,7 @@ public:
*/
template <int blocksize>
static double computeL2Error(const VirtualGridViewFunction<GridView,Dune::FieldVector<double,blocksize> >* a,
const Dune::VirtualFunction<Dune::FieldVector<ctype,dim>, Dune::FieldVector<double,blocksize> >* b,
const Dune::VirtualFunction<Dune::FieldVector<ctype,dimworld>, Dune::FieldVector<double,blocksize> >* b,
QuadratureRuleKey quadKey)
{
......@@ -66,8 +67,8 @@ public:
template <int blocksize>
static double computeH1HalfNormDifferenceSquared(const GridView& gridView,
const VirtualDifferentiableFunction<Dune::FieldVector<ctype,dim>, Dune::FieldVector<double,blocksize> >* u,
const VirtualDifferentiableFunction<Dune::FieldVector<ctype,dim>, Dune::FieldVector<double,blocksize> >* v,
const VirtualDifferentiableFunction<Dune::FieldVector<ctype,dimworld>, Dune::FieldVector<double,blocksize> >* u,
const VirtualDifferentiableFunction<Dune::FieldVector<ctype,dimworld>, Dune::FieldVector<double,blocksize> >* v,
QuadratureRuleKey quadKey)
{
double norm = 0.0;
......@@ -88,8 +89,8 @@ public:
const double integrationElement = element.geometry().integrationElement(quadPos);
// Evaluate integral
Dune::FieldMatrix<double,blocksize,dim> u_di;
Dune::FieldMatrix<double,blocksize,dim> v_di;
Dune::FieldMatrix<double,blocksize,dimworld> u_di;
Dune::FieldMatrix<double,blocksize,dimworld> v_di;
if (dynamic_cast<const VirtualGridViewFunction<GridView,Dune::FieldVector<double,blocksize> >*>(u))
dynamic_cast<const VirtualGridViewFunction<GridView,Dune::FieldVector<double,blocksize> >*>(u)->evaluateDerivativeLocal(element, quadPos, u_di);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment