| 1 |
|
| 2 |
// Header Lorene: |
| 3 |
#include "nbr_spx.h" |
| 4 |
#include "utilitaires.h" |
| 5 |
#include "graphique.h" |
| 6 |
#include "math.h" |
| 7 |
#include "metric.h" |
| 8 |
#include "param.h" |
| 9 |
#include "param_elliptic.h" |
| 10 |
#include "vector.h" |
| 11 |
#include "scalar.h" |
| 12 |
#include "spheroid.h" |
| 13 |
#include "diff.h" |
| 14 |
#include "proto.h" |
| 15 |
#include "unites.h" |
| 16 |
#include "tensor.h" |
| 17 |
#include "sym_tensor.h" |
| 18 |
|
| 19 |
// Spectral cutoff used in tensor elliptic solvers, and solving for stationary black hole spacetimes |
| 20 |
|
| 21 |
|
| 22 |
namespace Lorene { |
| 23 |
void coupe_l_tous( Sym_tensor& hij,Sym_tensor& aa, Scalar& nn,Scalar& ppsi,Vector& bb, int ntt, int cutoff){ |
| 24 |
|
| 25 |
nn.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 26 |
ppsi.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); // Warning! only true for SYMMETRY in theta and phi. |
| 27 |
Scalar bb1 = bb.set(1); |
| 28 |
bb1.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 29 |
Scalar mmu = bb.mu(); |
| 30 |
Scalar etta = bb.eta(); |
| 31 |
|
| 32 |
mmu.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 33 |
etta.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 34 |
|
| 35 |
bb.set_vr_eta_mu(bb1, etta, mmu); |
| 36 |
|
| 37 |
tensor_coupe_l(aa, ntt, cutoff); |
| 38 |
tensor_coupe_l(hij, ntt, cutoff); |
| 39 |
|
| 40 |
// hij_new.set_auxiliary(hrrBC, tilde_etaBC, mmuAsr, wwBC, xxA, hh -hrrBC); |
| 41 |
|
| 42 |
|
| 43 |
return; |
| 44 |
|
| 45 |
} |
| 46 |
|
| 47 |
void tensor_coupe_l( Sym_tensor& ten, int ntt, int cutoff){ |
| 48 |
|
| 49 |
Scalar ten1 = ten.set(1,1); |
| 50 |
ten1.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); // Warning! only true for SYMMETRY in theta and phi. |
| 51 |
int dzp = ten1.get_dzpuis(); |
| 52 |
|
| 53 |
Scalar eta = ten.eta(); |
| 54 |
Scalar mmu = ten.mu(); |
| 55 |
Scalar xxx = ten.xxx(); |
| 56 |
Scalar www = ten.www(); |
| 57 |
Scalar smalltrace = ten.set(2,2) + ten.set(3,3); |
| 58 |
|
| 59 |
eta.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 60 |
mmu.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 61 |
xxx.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 62 |
www.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 63 |
smalltrace.annule_l(2*(ntt-1) - cutoff, 2*(ntt-1)); |
| 64 |
|
| 65 |
eta.div_r_dzpuis(dzp); |
| 66 |
mmu.div_r_dzpuis(dzp); // set_auxiliary needs quantities rescaled over r |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
ten.set_auxiliary(ten1, eta, mmu, www, xxx, smalltrace); |
| 71 |
|
| 72 |
return; |
| 73 |
} |
| 74 |
|
| 75 |
} |