1#include <dune/common/version.hh>
2#include<dune/geometry/referenceelements.hh>
6template<
class G,
class M,
class V>
10 const int dim = G::dimension;
11 const int dimworld = G::dimensionworld;
14 typedef typename G::ctype ct;
17 typedef typename G::LeafGridView GridView;
20 typedef typename GridView::template Codim<0>::Iterator LeafIterator;
23 GridView gridView = grid.leafGridView();
26 LeafIterator endit = gridView.template end<0>();
27 for (LeafIterator it = gridView.template begin<0>(); it!=endit; ++it) {
29 Dune::GeometryType gt = it->type();
32 const Dune::FieldVector<ct,dim>&
33 local = Dune :: ReferenceElements<ct,dim >::general(gt).position(0,0);
36 Dune::FieldVector<ct,dimworld> global =
37 it->geometry().global(local);
41 c[mapper.index(*it)] =
c0(global);
void initialize(const G &grid, const M &mapper, V &c)
initialize the vector of unknowns with initial value
Definition: initialize.hh:7
double c0(const Dune::FieldVector< ct, dimworld > &x)
Definition: transportproblem2.hh:15