[Dune] PDELab - ISTLBlockVectorContainer

Christian Kaltenecker christian_kalt at yahoo.de
Wed Aug 27 15:22:03 CEST 2014


Dear Dune,

I have an compilation error, when I try to use the mmv-function of the 
BCRSMatrix from dune-istl regarding the ISTLBlockVectorContainer from 
PDELab:

----------------------------------

/home/user/Bachelor/Dune/dune-istl/dune/istl/bcrsmatrix.hh:1679:22: 
error: no match for ‘operator[]’ (operand types are ‘const 
Dune::PDELab::ISTLBlockVectorContainer<Dune::PDELab::GridFunctionSpace<Dune::GridView<Dune::DefaultLevelGridViewTraits<const 
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, 
Dune::PDELab::QkLocalFiniteElementMap<Dune::GridView<Dune::DefaultLevelGridViewTraits<const 
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, double, double, 
1ul>, Dune::PDELab::OverlappingConformingDirichletConstraints, 
Dune::PDELab::ISTLVectorBackend<>, 
Dune::PDELab::LeafOrderingTag<Dune::PDELab::DefaultLeafOrderingParams> 
 >, Dune::BlockVector<Dune::FieldVector<double, 1>, 
std::allocator<Dune::FieldVector<double, 1> > > >’ and 
‘Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>, 
std::allocator<Dune::FieldMatrix<double, 1, 1> > >::size_type {aka long 
unsigned int}’)

(*j).umtv(x[i.index()],y[j.index()]);


/home/user/Bachelor/Dune/dune-istl/dune/istl/bcrsmatrix.hh:1679:22: 
note: candidates are:

In file included from 
/home/user/Bachelor/Dune/dune-pdelab/dune/pdelab/boilerplate/pdelab.hh:62:0, 


from multigrid_overlapping.cc:7:

/home/user/Bachelor/Dune/dune-pdelab/dune/pdelab/backend/istlvectorbackend.hh:206:10: 
note: Dune::PDELab::ISTLBlockVectorContainer<GFS, C>::E& 
Dune::PDELab::ISTLBlockVectorContainer<GFS, C>::operator[](const 
ContainerIndex&) [with GFS = 
Dune::PDELab::GridFunctionSpace<Dune::GridView<Dune::DefaultLevelGridViewTraits<const 
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, 
Dune::PDELab::QkLocalFiniteElementMap<Dune::GridView<Dune::DefaultLevelGridViewTraits<const 
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, double, double, 
1ul>, Dune::PDELab::OverlappingConformingDirichletConstraints, 
Dune::PDELab::ISTLVectorBackend<>, 
Dune::PDELab::LeafOrderingTag<Dune::PDELab::DefaultLeafOrderingParams> 
 >; C = Dune::BlockVector<Dune::FieldVector<double, 1>, 
std::allocator<Dune::FieldVector<double, 1> > >; 
Dune::PDELab::ISTLBlockVectorContainer<GFS, C>::E = double; 
Dune::PDELab::ISTLBlockVectorContainer<GFS, C>::ContainerIndex = 
Dune::PDELab::MultiIndex<long unsigned int, 1ul>]

E& operator[](const ContainerIndex& ci)

-------------------------------------

The affected line is the line 1607 of bcrsmatrix.hh from dune-istl.

The arguments x and y are of the type ISTLBlockVectorContainer.

I have noticed, that the needed method:

const ElementType& operator[](size_type i) const

{

return container()[cache().containerIndex(i)];

}

was moved from ISTLBlockVectorContainer to ConstUncachedVectorView.


How can I fix this?


Regards,

Christian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140827/17823211/attachment.htm>


More information about the Dune mailing list