aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetRegrid/src/regrid.hh
blob: 05fcfc402d383a933082a1ac340f7bf4012da39b (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/regrid.hh,v 1.9 2003/06/18 18:28:07 schnetter Exp $

#ifndef CARPETREGRID_HH
#define CARPETREGRID_HH

#include <list>

#include "cctk.h"

#include "gf.hh"
#include "gh.hh"

#include "carpet.hh"

#include "regrid.h"



namespace CarpetRegrid {
  
  using namespace std;
  using namespace Carpet;
  
  
  
  typedef vect<int,dim> ivect;
  typedef bbox<int,dim> ibbox;
  
  typedef vect<vect<bool,2>,dim> bvect;
  
  typedef vect<CCTK_REAL,dim> rvect;
  
  
  
  int CarpetRegridRegrid (const cGH * const cctkGH,
			  gh<dim>::rexts& bbsss,
			  gh<dim>::rbnds& obss,
			  gh<dim>::rprocs& pss);
  
  
  
  void MakeRegions_BaseLevel    (const cGH* cctkGH,
				 list<ibbox>& bbl, list<bvect>& obl);
  
  void MakeRegions_RefineCentre (const cGH* cctkGH, const int reflevels,
				 list<ibbox>& bbl, list<bvect>& obl);
  
  void MakeRegions_AsSpecified  (const cGH* cctkGH, const int reflevels,
				 const vector<ivect> lower,
				 const vector<ivect> upper,
				 list<ibbox>& bbl, list<bvect>& obl);
  void MakeRegions_AsSpecified  (const cGH* cctkGH, const int reflevels,
				 const vector<rvect> lower,
				 const vector<rvect> upper,
				 list<ibbox>& bbl, list<bvect>& obl);
  
  void MakeRegions_AsSpecified  (const cGH* cctkGH, const int reflevels,
				 const vector<vector<ibbox> > bbss,
				 const vector<vector<bvect> > obss,
				 list<ibbox>& bbl, list<bvect>& obl);
  
  void MakeRegions_Adaptively   (const cGH* cctkGH,
				 const int minwidth,
				 const CCTK_REAL minfraction,
				 const CCTK_REAL maxerror,
				 const gf<CCTK_REAL,dim>& error,
				 list<ibbox>& bbl, list<bvect>& obl);
  
} // namespace CarpetRegrid

#endif // !defined(CARPETREGRID_HH)