forked from fmihpc/vlasiator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamr_refinement_criteria.h
48 lines (32 loc) · 1.06 KB
/
amr_refinement_criteria.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* This file is part of Vlasiator.
* Copyright 2013, 2014 Finnish Meteorological Institute
*/
#ifndef AMR_REFINEMENT_CRITERIA_H
#define AMR_REFINEMENT_CRITERIA_H
#include <iostream>
#include "definitions.h"
namespace amr_ref_criteria {
class Base {
public:
Base();
virtual ~Base();
virtual Realf evaluate(const Realf* velBlock,const int& popID) = 0;
virtual void evaluate(const Realf* velBlost,Realf* result,const int& popID);
virtual bool initialize(const std::string& configRegion) = 0;
protected:
};
void addRefinementCriteria();
class RelativeDifference: public Base {
public:
RelativeDifference();
~RelativeDifference();
Realf evaluate(const Realf* velBlock,const int& popID);
void evaluate(const Realf* velBlost,Realf* result,const int& popID);
bool initialize(const std::string& configRegion);
protected:
Realf df_max;
Realf evaluate(const Realf& f_lef,const Realf& f_cen,const Realf& f_rgt);
};
} // namespace amr_ref_criteria
#endif