Commit 05eaad0a authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Added min refinement level for marker strategy.

parent e6281241
......@@ -9,7 +9,7 @@ namespace AMDiS {
Marker *marker = NULL;
switch(strategy) {
switch (strategy) {
case 0:
break;
case 1:
......@@ -64,9 +64,11 @@ namespace AMDiS {
setMark(el, adaptInfo->getRefineBisections(row == -1 ? 0 : row));
} else {
if (adaptInfo->isCoarseningAllowed(row == -1 ? 0 : row) && lError <= markCLimit) {
if (!el->getElementData()->getElementData(COARSENABLE) ||
lError + el->getCoarseningEstimation(row) <= markCLimit)
setMark(el, -adaptInfo->getCoarseBisections(row == -1 ? 0 : row));
if (minRefineLevel == -1 || elInfo->getLevel() > minRefineLevel) {
if (!el->getElementData()->getElementData(COARSENABLE) ||
lError + el->getCoarseningEstimation(row) <= markCLimit)
setMark(el, -adaptInfo->getCoarseBisections(row == -1 ? 0 : row));
}
}
}
}
......@@ -241,5 +243,4 @@ namespace AMDiS {
}
}
......@@ -51,11 +51,13 @@ namespace AMDiS {
maximumMarking(false),
p(2),
info(10),
maxRefineLevel(-1)
maxRefineLevel(-1),
minRefineLevel(-1)
{
GET_PARAMETER(0, name + "->p", "%f", &p);
GET_PARAMETER(0, name + "->info", "%d", &info);
GET_PARAMETER(0, name + "->max refinement level", "%d", &maxRefineLevel);
GET_PARAMETER(0, name + "->min refinement level", "%d", &minRefineLevel);
}
/// destructor
......@@ -172,8 +174,11 @@ namespace AMDiS {
/// Counter for elements marked for coarsening
int elMarkCoarsen;
/// Maximal depth for element refinement.
/// Maximal level of all elements.
int maxRefineLevel;
/// Minimal level of all elements.
int minRefineLevel;
};
......
......@@ -345,7 +345,6 @@ namespace AMDiS {
int i = info_stack[stack_used];
info_stack[stack_used]++;
elinfo_stack[stack_used + 1]->fillElInfo(i, elinfo_stack[stack_used]);
stack_used++;
......
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