Estimator.cc 596 Bytes
Newer Older
1
2
3
4
5
6
#include "Estimator.h"
#include "Traverse.h"
#include "Parameters.h"

namespace AMDiS {

7
8
9
10
  Estimator::Estimator(::std::string name_, int r) 
    : name(name_),
      norm(NO_NORM),
      row(r)
11
  {
12
    GET_PARAMETER(0, name + "->error norm", "%d", &norm);
13
14
15
16
17
18
19
  }

  double Estimator::estimate(double ts)
  {
    FUNCNAME("Estimator::estimate()");
  
    init(ts);
20

21
22
    TraverseStack stack;
    ElInfo *elInfo = stack.traverseFirst(mesh, -1, traverseFlag);
23
    while (elInfo) {
24
25
      estimateElement(elInfo);
      elInfo = stack.traverseNext(elInfo);
26
    }  
27
28
29

    exit();

30
    return est_sum;
31
32
  }
}