| 1 |
// Lorene headers |
| 2 |
#include "metric.h" |
| 3 |
#include "nbr_spx.h" |
| 4 |
#include "utilitaires.h" |
| 5 |
#include "graphique.h" |
| 6 |
|
| 7 |
using namespace Lorene ; |
| 8 |
|
| 9 |
int main() { |
| 10 |
|
| 11 |
// Construction of a multi-grid (Mg3d) |
| 12 |
// ----------------------------------- |
| 13 |
const int nz = 4 ; // Number of domains |
| 14 |
int nr = 33 ; // Number of collocation points in r in each domain |
| 15 |
int nt = 17 ; // Number of collocation points in theta in each domain |
| 16 |
int np = 4 ; // Number of collocation points in phi in each domain |
| 17 |
int symmetry_theta = SYM ; // symmetry with respect to the equatorial plane |
| 18 |
int symmetry_phi = SYM ; // symmetric with respect to (x,y) -> (-x,-y) |
| 19 |
bool compact = true ; |
| 20 |
assert(nz > 1) ; |
| 21 |
|
| 22 |
Mg3d mgrid(nz, nr, nt, np, symmetry_theta, symmetry_phi, compact) ; |
| 23 |
|
| 24 |
// Construction of an affine mapping (Map_af) |
| 25 |
// ------------------------------------------ |
| 26 |
|
| 27 |
// Boundaries of each domains |
| 28 |
double Rlim = 4. ; |
| 29 |
Tbl r_limits(nz+1) ; |
| 30 |
r_limits.set_etat_qcq() ; |
| 31 |
for (int i=0; i<nz; i++) |
| 32 |
r_limits.set(i) = double(i)/double(nz-1) *Rlim ; |
| 33 |
r_limits.set(nz) = __infinity ; |
| 34 |
|
| 35 |
Map_af map(mgrid, r_limits) ; |
| 36 |
|
| 37 |
// Definition of coordinate fields |
| 38 |
//-------------------------------- |
| 39 |
const Coord& rr1 = map.r ; |
| 40 |
|
| 41 |
cout << "Here there's a mapping..." << endl ; |
| 42 |
cout << map ; |
| 43 |
|
| 44 |
|
| 45 |
return EXIT_SUCCESS ; |
| 46 |
} |