[Dune] l2 interpolation error
Tatiana Kim
T.Kim at bath.ac.uk
Tue Jul 7 13:15:09 CEST 2015
Hello,
I would like to use l2interpolationerror.hh described in the example q1interpolatione​rror.hh in PDELab-howto section 9.5 in my code.
I have created analytic function object and made y interpolate u as in the example:
U<GridView,Real> u(grid.leafGridView());
PDELab::interpolate(u,gfs,y);
This works fine. The next step is to compute l2-error:
std::cout.precision(8);
std::cout << "interpolation error: "
<< std :: setw(8) << ijy << " elements "
<< std :: scientific << l2interpolationerror(u,gfsf,y,4) << std :: endl ;
This doesn't work in my code. I get an error along these lines:
error: no type named 'FiniteElementType' in 'Dune::PDELab::VectorGridFunctionSpace
in l2interpolationerror.hh:15:36 (The first few lines of the error message are below).
I am a bit stuck on this problem and not sure what to do. Could you please help?
Thanks,
Tatiana.
This is how GFS is set up in my code:
typedef GridType::ctype Coord;
typedef double Real;
// set up vector-valued finite element space
typedef PDELab::PkLocalFiniteElementMap<GridView,Coord, Real, 1> FEM;
FEM fem(grid.leafGridView());
typedef PDELab::VectorGridFunctionSpace<GridView,
FEM,
dim,
PDELab::ISTLVectorBackend<PDELab::ISTLParameters::static_blocking>,
PDELab::ISTLVectorBackend<>,
PDELab::ConformingDirichletConstraints,
PDELab::EntityBlockedOrderingTag,
PDELab::DefaultLeafOrderingTag
> GFSF;
GFSF gfsf(grid.leafGridView(),fem);
**********************************
The first few lines of the error message:
Scanning dependencies of target testproject
[100%] Building CXX object src/CMakeFiles/testproject.dir/testproject.cc.o
In file included from /Users/tatianakim/Documents/DUNE/master/testproject/src/testproject.cc:47:0:
/Users/tatianakim/Documents/DUNE/master/testproject/l2interpolationerror.hh: In instantiation of 'double l2interpolationerror(const U&, const GFS&, X&, int) [with U = U<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, double>; GFS = Dune::PDELab::VectorGridFunctionSpace<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, Dune::PDELab::PkLocalFiniteElementMap<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, double, double, 1u>, 3ul, Dune::PDELab::ISTLVectorBackend<(Dune::PDELab::ISTLParameters::Blocking)2u>, Dune::PDELab::ISTLVectorBackend<>, Dune::PDELab::ConformingDirichletConstraints, Dune::PDELab::EntityBlockedOrderingTag, Dune::PDELab::LeafOrderingTag<Dune::PDELab::DefaultLeafOrderingParams> >; X = Dune::PDELab::ISTLBlockVectorContainer<Dune::PDELab::VectorGridFunctionSpace<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, Dune::PDELab::PkLocalFiniteElementMap<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, double, double, 1u>, 3ul, Dune::PDELab::ISTLVectorBackend<(Dune::PDELab::ISTLParameters::Blocking)2u>, Dune::PDELab::ISTLVectorBackend<>, Dune::PDELab::ConformingDirichletConstraints, Dune::PDELab::EntityBlockedOrderingTag, Dune::PDELab::LeafOrderingTag<Dune::PDELab::DefaultLeafOrderingParams> >, Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > >]':
/Users/tatianakim/Documents/DUNE/master/testproject/src/testproject.cc:350:61: required from here
/Users/tatianakim/Documents/DUNE/master/testproject/l2interpolationerror.hh:15:36: error: no type named 'FiniteElementType' in 'Dune::PDELab::VectorGridFunctionSpace<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, Dune::PDELab::PkLocalFiniteElementMap<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, double, double, 1u>, 3ul, Dune::PDELab::ISTLVectorBackend<(Dune::PDELab::ISTLParameters::Blocking)2u>, Dune::PDELab::ISTLVectorBackend<>, Dune::PDELab::ConformingDirichletConstraints, Dune::PDELab::EntityBlockedOrderingTag, Dune::PDELab::LeafOrderingTag<Dune::PDELab::DefaultLeafOrderingParams> >::Traits {aka struct Dune::PDELab::PowerCompositeGridFunctionSpaceTraits<Dune::GridView<Dune::UGGridLeafGridViewTraits<const Dune::UGGrid<3>, (Dune::PartitionIteratorType)4u> >, Dune::PDELab::ISTLVectorBackend<(Dune::PDELab::ISTLParameters::Blocking)2u>, Dune::PDELab::EntityBlockedOrderingTag, 3ul>}'
Traits::LocalBasisType::Traits FTraits;​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150707/652db3b0/attachment.htm>
More information about the Dune
mailing list