#include // Lorene headers #include "metric.h" #include "nbr_spx.h" #include "utilitaires.h" #include "graphique.h" #include "proto.h" #include "diff.h" namespace Lorene { // Inversion of the weakly degenerate eliptic operator associatd with spectral quantity tilde(B), with main characteristics //fit and fit2 (Suitable for tensorial resolution of BH spacetime) //See also function tilde(laplacian) void tensorellipticBt( Scalar source, Scalar& resu, double fit, double fit2, double fit0d2, double fit1d2, double fit0d3, double fit1d3) { const int nz = (*source.get_mp().get_mg()).get_nzone(); // Number of domains int nr = (*source.get_mp().get_mg()).get_nr(1); // Number of collocation points in r in each domain int nt = (*source.get_mp().get_mg()).get_nt(1); // Number of collocation points in theta in each domain int np = (*source.get_mp().get_mg()).get_np(1); // Number of collocation points in phi in each domain const Map_af* map = dynamic_cast(&source.get_mp()) ; const Mg3d* mgrid = (*map).get_mg(); // Some helpful stuff... const Coord& rr = (*map).r ; Scalar rrr (*map) ; rrr = rr ; rrr.set_spectral_va().set_base(source.get_spectral_va().base); Scalar source_coq = source ; source_coq.mult_r() ; source_coq.mult_r() ; source.set_spectral_va().ylm() ; source_coq.set_spectral_va().ylm() ; Scalar phi(source.get_mp()) ; phi.annule_hard() ; // phi.std_spectral_base(); phi.set_spectral_va().set_base(source.get_spectral_va().base) ; phi.set_spectral_va().ylm() ; Mtbl_cf& sol_coef = (*phi.set_spectral_va().c_cf) ; const Base_val& base = source.get_spectral_base() ; Mtbl_cf sol_part(mgrid, base) ; sol_part.annule_hard() ; Mtbl_cf sol_hom1(mgrid, base) ; sol_hom1.annule_hard() ; Mtbl_cf sol_hom2(mgrid, base) ; sol_hom2.annule_hard() ; int l_q, m_q, base_r ; { int lz = 0 ; for (int k=0; k < np; k++) for (int j=0; j 0) { for (int i=0; i0) rhs.set(nr-3) = 0 ; rhs.set(nr-2) = 0 ; rhs.set(nr-1) = 0 ; ope.set_lu() ; Tbl sol = ope.inverse(rhs) ; for (int i=0; i> tryr; // for (int i=0; i