Commit 16cf390e authored by Christoph Grüninger's avatar Christoph Grüninger

Use le(vel|af)GridView instead of deprecated le(vel|af)View.

This fixes FS#1409.
parent 29dd2468
......@@ -23,7 +23,7 @@ void adaptiveintegration (Grid& grid, const Functor& f)
typedef typename GridView::template Codim<0>::Iterator ElementLeafIterator;
// get grid view on leaf part
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// algorithm parameters
const double tol=1E-8;
......
......@@ -35,7 +35,7 @@ void elementdata (const G& grid, const F& f)
typedef typename ElementLeafIterator::Entity::Geometry LeafGeometry;
// get grid view on leaf part
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// make a mapper for codim 0 entities in the leaf grid
Dune::LeafMultipleCodimMultipleGeomTypeMapper<G,P0Layout>
......
......@@ -33,7 +33,7 @@ void evolve (const G& grid, const M& mapper, V& c, double t, double& dt)
typedef typename G::template Codim<0>::EntityPointer EntityPointer;
// get grid view on leaf part
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// allocate a temporary vector for the update
V update(c.size()); /*@\label{evh:update}@*/
......
......@@ -280,7 +280,7 @@ int main(int argc, char** argv)
typedef Bump<ctype,dim> Func;
GridType grid(gridfile);
const GV& gv=grid.leafView();
const GV& gv = grid.leafGridView();
Func f;
P1Elements<GV,Func> p1(gv, f);
......@@ -305,7 +305,7 @@ int main(int argc, char** argv)
p1.solve();
std::cout << "visualizing..." << "\n";
Dune::VTKWriter<GridType::LeafGridView> vtkwriter(grid.leafView());
Dune::VTKWriter<GridType::LeafGridView> vtkwriter(grid.leafGridView));
vtkwriter.addVertexData(p1.u, "u");
vtkwriter.write("fem2d", Dune::VTK::appendedraw);
#else
......
......@@ -43,7 +43,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
typedef typename LeafGridView::IntersectionIterator LeafIntersectionIterator;
// get grid view on leaf grid
LeafGridView leafView = grid.leafView();
LeafGridView leafView = grid.leafGridView();
// compute cell indicators
V indicator(c.size(),-1E100);
......@@ -124,7 +124,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
for (int level=grid.maxLevel(); level>=0; level--)
{
// get grid view on level grid
LevelGridView levelView = grid.levelView(level);
LevelGridView levelView = grid.levelGridView(level);
for (LevelIterator it = levelView.template begin<0>();
it!=levelView.template end<0>(); ++it)
{
......@@ -158,7 +158,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
// interpolate new cells, restrict coarsened cells
for (int level=0; level<=grid.maxLevel(); level++) /*@\label{fah:loop6}@*/
{
LevelGridView levelView = grid.levelView(level);
LevelGridView levelView = grid.levelGridView(level);
for (LevelIterator it = levelView.template begin<0>();
it!=levelView.template end<0>(); ++it)
{
......
......@@ -26,7 +26,7 @@ void initialize (const G& grid, const M& mapper, V& c)
typedef typename LeafIterator::Entity::Geometry Geometry;
// get grid view on leaf part
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// iterate through leaf grid an evaluate c0 at cell center
LeafIterator endit = gridView.template end<0>();
......
......@@ -21,7 +21,7 @@ void uniformintegration (Grid& grid)
typedef typename Grid :: LeafGridView GridView;
// get GridView instance
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// get iterator type
typedef typename GridView :: template Codim<0> :: Iterator LeafIterator;
......
......@@ -51,7 +51,7 @@ void parevolve (const G& grid, const M& mapper, V& c, double t, double& dt)
dt = 1E100;
// get grid view instance on leaf grid
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// compute update vector and optimum dt in one grid traversal
// iterate over all entities, but update is only used on interior entities
......
......@@ -31,7 +31,7 @@ void traversal (G& grid)
typedef typename G :: LeafGridView LeafGridView; /*@\label{tc:lfgv}@*/
// get the instance of the LeafGridView
LeafGridView leafView = grid.leafView(); /*@\label{tc:lfv}@*/
LeafGridView leafView = grid.leafGridView(); /*@\label{tc:lfv}@*/
// Get the iterator type
// Note the use of the typename and template keywords
......@@ -91,7 +91,7 @@ void traversal (G& grid)
for (int level=0; level<=grid.maxLevel(); level++)
{
// get the instance of the LeafGridView
LevelGridView levelView = grid.levelView(level);
LevelGridView levelView = grid.levelGridView(level);
count = 0;
for (ElementLevelIterator it = levelView.template begin<0>();
......
......@@ -34,7 +34,7 @@ void vertexdata (const G& grid, const F& f)
typedef typename GridView::template Codim<dim>::Iterator VertexLeafIterator;
// get grid view on the leaf part
GridView gridView = grid.leafView();
GridView gridView = grid.leafGridView();
// make a mapper for codim 0 entities in the leaf grid
Dune::LeafMultipleCodimMultipleGeomTypeMapper<G,P1Layout>
......@@ -53,7 +53,7 @@ void vertexdata (const G& grid, const F& f)
// generate a VTK file
// Dune::LeafP1Function<G,double> cc(grid,c);
Dune::VTKWriter<typename G::LeafGridView> vtkwriter(grid.leafView());
Dune::VTKWriter<typename G::LeafGridView> vtkwriter(grid.leafGridView());
vtkwriter.addVertexData(c,"data");
vtkwriter.write( "vertexdata", Dune::VTK::appendedraw );
......
......@@ -9,7 +9,7 @@
template<class G, class V>
void vtkout (const G& grid, const V& c, const char* name, int k, double time=0.0, int rank=0)
{
Dune::VTKWriter<typename G::LeafGridView> vtkwriter(grid.leafView());
Dune::VTKWriter<typename G::LeafGridView> vtkwriter(grid.leafGridView());
char fname[128];
char sername[128];
sprintf(fname,"%s-%05d",name,k);
......
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