Commit ae21bf5b authored by Christoph Grüninger's avatar Christoph Grüninger

[cleanup] Use methods Mapper::index instead of deprecated Mapper::map

parent d7157083
......@@ -55,7 +55,7 @@ void elementdata (const G& grid, const F& f)
Dune::FieldVector<ct,dimworld> global = geo.center();
// evaluate functor and store value
c[mapper.map(*it)] = f(global); /*@\label{edh:feval}@*/
c[mapper.index(*it)] = f(global); /*@\label{edh:feval}@*/
} /*@\label{edh:loop1}@*/
// generate a VTK file
......
......@@ -54,7 +54,7 @@ void evolve (const G& grid, const M& mapper, V& c, double t, double& dt)
double volume = geo.volume();
// cell index
int indexi = mapper.map(*it);
int indexi = mapper.index(*it);
// variable to compute sum of positive factors
double sumfactor = 0.0;
......@@ -88,7 +88,7 @@ void evolve (const G& grid, const M& mapper, V& c, double t, double& dt)
{
// access neighbor
EntityPointer outside = is->outside();
int indexj = mapper.map(*outside);
int indexj = mapper.index(*outside);
// compute flux from one side only
if (indexi<indexj)
......
......@@ -50,7 +50,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
it!=leafView.template end<0>(); ++it)
{
// my index
int indexi = mapper.map(*it);
int indexi = mapper.index(*it);
// global min/max
globalmax = std::max(globalmax,c[indexi]);
......@@ -66,7 +66,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
// access neighbor
const EntityPointer pOutside = intersection.outside();
const Entity &outside = *pOutside;
int indexj = mapper.map( outside );
int indexj = mapper.index(outside);
// handle face from one side only
if ( it->level() > outside.level() ||
......@@ -85,7 +85,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
for (LeafIterator it = leafView.template begin<0>(); /*@\label{fah:loop2}@*/
it!=leafView.template end<0>(); ++it)
{
if (indicator[mapper.map(*it)]>refinetol*globaldelta
if (indicator[mapper.index(*it)]>refinetol*globaldelta
&& (it->level() < lmax || !it->isRegular()))
{
const Entity &entity = *it;
......@@ -104,7 +104,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
grid.mark( 1, outside );
}
}
if (indicator[mapper.map(*it)] < coarsentol*globaldelta && it->level() > lmin)
if (indicator[mapper.index(*it)] < coarsentol*globaldelta && it->level() > lmin)
{
grid.mark( -1, *it );
++marked;
......@@ -130,7 +130,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
// put your value in the map
if (it->isLeaf())
{
int indexi = mapper.map(*it);
int indexi = mapper.index(*it);
rv.value = c[indexi];
rv.count = 1;
}
......@@ -168,7 +168,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
if (it->isLeaf())
{
RestrictedValue& rv = restrictionmap[*it];
int indexi = mapper.map(*it);
int indexi = mapper.index(*it);
c[indexi] = rv.value/rv.count;
}
}
......@@ -180,7 +180,7 @@ bool finitevolumeadapt (G& grid, M& mapper, V& c, int lmin, int lmax, int k)
RestrictedValue& rvf = restrictionmap[*ep];
if (it->isLeaf())
{
int indexi = mapper.map(*it);
int indexi = mapper.index(*it);
c[indexi] = rvf.value/rvf.count;
}
else
......
......@@ -39,7 +39,7 @@ void initialize (const G& grid, const M& mapper, V& c)
Dune::FieldVector<ct,dimworld> global = geo.center();
// initialize cell concentration
c[mapper.map(*it)] = c0(global);
c[mapper.index(*it)] = c0(global);
}
}
......
......@@ -65,7 +65,7 @@ void parevolve (const G& grid, const M& mapper, V& c, double t, double& dt)
double volume = geo.volume();
// cell index
int indexi = mapper.map(*it);
int indexi = mapper.index(*it);
// variable to compute sum of positive factors
double sumfactor = 0.0;
......@@ -101,7 +101,7 @@ void parevolve (const G& grid, const M& mapper, V& c, double t, double& dt)
{
// access neighbor
EntityPointer outside = intersection.outside();
int indexj = mapper.map(*outside);
int indexj = mapper.index(*outside);
const int insideLevel = it->level();
const int outsideLevel = outside->level();
......
......@@ -41,7 +41,7 @@ public:
template<class MessageBuffer, class EntityType>
void gather (MessageBuffer& buff, const EntityType& e) const
{
buff.write(c[mapper.map(e)]);
buff.write(c[mapper.index(e)]);
}
/*! unpack data from message buffer to user
......@@ -53,7 +53,7 @@ public:
{
DataType x;
buff.read(x);
c[mapper.map(e)]=x;
c[mapper.index(e)]=x;
}
//! constructor
......
......@@ -47,7 +47,7 @@ void vertexdata (const G& grid, const F& f)
it!=gridView.template end<dim>(); ++it)
{
// evaluate functor and store value
c[mapper.map(*it)] = f(it->geometry().corner(0));
c[mapper.index(*it)] = f(it->geometry().corner(0));
}
// generate a VTK file
......
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