Commit a3650df1 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

change referenceElement in Marker

parent 21d3a627
......@@ -282,11 +282,10 @@ Flag GridFunctionMarker<Grid, PreGridFct>::markGrid(AdaptInfo& adaptInfo)
for (auto const& e : Dune::elements(this->grid_->leafGridView())) {
localFct.bind(e);
int currentLevel = e.level();
auto geo = e.geometry();
auto const& ref = Dune::referenceElement(geo);
auto refElem = Dune::referenceElement<typename Grid::ctype,Grid::dimension>(e.type());
// evaluate in the center of the element
int targetLevel = int(std::round(localFct(ref.position(0,0))));
int targetLevel = int(std::round(localFct(refElem.position(0,0))));
int m = ((((targetLevel > currentLevel) && (currentLevel < this->maxRefineLevel_))
|| (currentLevel < this->minRefineLevel_))
......
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