vector_poisson.C
/*
* Methods for solving vector Poisson equation.
*
* (see file vector.h for documentation).
*
*/
/*
* Copyright (c) 2003 Eric Gourgoulhon & Jerome Novak
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char vector_poisson_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tensor/vector_poisson.C,v 1.24 2014/10/13 08:53:45 j_novak Exp $" ;
/*
* $Id: vector_poisson.C,v 1.24 2014/10/13 08:53:45 j_novak Exp $
* $Log: vector_poisson.C,v $
* Revision 1.24 2014/10/13 08:53:45 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.23 2014/10/06 15:13:21 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.22 2005/02/14 13:01:50 j_novak
* p_eta and p_mu are members of the class Vector. Most of associated functions
* have been moved from the class Vector_divfree to the class Vector.
*
* Revision 1.21 2005/01/10 15:36:09 j_novak
* In method 5: added transformation back from the Ylm base.
*
* Revision 1.20 2004/12/23 10:23:06 j_novak
* Improved method 5 in the case when some components are zero.
* Changed Vector_divfree::poisson to deduce eta from the equation.
*
* Revision 1.19 2004/08/24 09:14:50 p_grandclement
* Addition of some new operators, like Poisson in 2d... It now requieres the
* GSL library to work.
*
* Also, the way a variable change is stored by a Param_elliptic is changed and
* no longer uses Change_var but rather 2 Scalars. The codes using that feature
* will requiere some modification. (It should concern only the ones about monopoles)
*
* Revision 1.18 2004/07/27 09:40:05 j_novak
* Yet another method for solving vector Poisson eq. with spherical coordinates.
*
* Revision 1.17 2004/06/14 15:15:58 j_novak
* New method (No.4) to solve the vector Poisson eq. The output is continuous
* for all (spherical) components.
*
* Revision 1.16 2004/05/26 07:30:59 j_novak
* Version 1.15 was not good.
*
* Revision 1.15 2004/05/25 15:15:47 f_limousin
* Function Vector::poisson with parameters now returns a Vector (the
* result) instead of void.
*
* Revision 1.12 2004/03/26 17:05:24 j_novak
* Added new method n.3 using Tenseur::poisson_vect_oohara
*
* Revision 1.11 2004/03/11 08:48:45 f_limousin
* Implement method Vector::poisson with parameters, only with method
* 2 yet.
*
* Revision 1.10 2004/03/10 16:38:38 e_gourgoulhon
* Modified the prototype of poisson with param. to let it
* agree with declaration in vector.h.
*
* Revision 1.9 2004/03/03 09:07:03 j_novak
* In Vector::poisson(double, int), the flat metric is taken from the mapping.
*
* Revision 1.8 2004/02/24 17:00:25 j_novak
* Added a forgotten term.
*
* Revision 1.7 2004/02/24 09:46:20 j_novak
* Correction to cope with SGI compiler's warnings.
*
* Revision 1.6 2004/02/22 15:47:46 j_novak
* Added 2 more methods to solve the vector poisson equation. Method 1 is not
* tested yet.
*
* Revision 1.5 2004/02/20 10:53:41 j_novak
* Minor modifs.
*
* Revision 1.4 2004/02/16 17:40:14 j_novak
* Added a version of poisson with the flat metric as argument (avoids
* unnecessary calculations by decompose_div)
*
* Revision 1.3 2003/10/29 11:04:34 e_gourgoulhon
* dec2_dpzuis() replaced by dec_dzpuis(2).
* inc2_dpzuis() replaced by inc_dzpuis(2).
*
* Revision 1.2 2003/10/22 13:08:06 j_novak
* Better handling of dzpuis flags
*
* Revision 1.1 2003/10/20 15:15:42 j_novak
* New method Vector::poisson().
*
*
* $Headers: $
*
*/
//C headers
#include <cstdlib>
#include <cmath>
// Lorene headers
#include "metric.h"
#include "tenseur.h"
#include "param.h"
#include "param_elliptic.h"
#include "proto.h"
namespace Lorene {
Vector Vector::poisson(double lambda, const Metric_flat& met_f, int method)
const {
bool nullite = true ;
for (int i=0; i<3; i++) {
assert(cmp[i]->check_dzpuis(4)) ;
if (cmp[i]->get_etat() != ETATZERO) nullite = false ;
}
assert ((method>=0) && (method<7)) ;
Vector resu(*mp, CON, triad) ;
if (nullite)
resu.set_etat_zero() ;
else {
switch (method) {
case 0 : {
Scalar poten(*mp) ;
if (fabs(lambda+1) < 1.e-8)
poten.set_etat_zero() ;
else {
poten = (potential(met_f) / (lambda + 1)).poisson() ;
}
Vector grad = poten.derive_con(met_f) ;
grad.dec_dzpuis(2) ;
return ( div_free(met_f).poisson() + grad) ;
break ;
}
case 1 : {
Scalar divf(*mp) ;
if (fabs(lambda+1) < 1.e-8)
divf.set_etat_zero() ;
else {
divf = (potential(met_f) / (lambda + 1)) ;
}
int nz = mp->get_mg()->get_nzone() ;
//-----------------------------------
// Removal of the l=0 part of div(F)
//-----------------------------------
Scalar div_lnot0 = divf ;
div_lnot0.div_r_dzpuis(4) ;
Scalar source_r(*mp) ;
Valeur& va_div = div_lnot0.set_spectral_va() ;
if (div_lnot0.get_etat() != ETATZERO) {
va_div.coef() ;
va_div.ylm() ;
for (int lz=0; lz<nz; lz++) {
int np = mp->get_mg()->get_np(lz) ;
int nt = mp->get_mg()->get_nt(lz) ;
int nr = mp->get_mg()->get_nr(lz) ;
if (va_div.c_cf->operator()(lz).get_etat() != ETATZERO)
for (int k=0; k<np+1; k++)
for (int j=0; j<nt; j++) {
int l_q, m_q, base_r ;
if (nullite_plm(j, nt, k, np, va_div.base) == 1) {
donne_lm(nz, lz, j, k, va_div.base, m_q, l_q, base_r) ;
if (l_q == 0)
for (int i=0; i<nr; i++)
va_div.c_cf->set(lz, k, j, i) = 0. ;
}
}
}
source_r.set_etat_qcq() ;
source_r.set_spectral_va() = 2*(*va_div.c_cf) ; //2*div(F)
source_r.set_spectral_va().ylm_i() ;
source_r.set_dzpuis(4) ;
}
else
source_r.set_etat_zero() ;
//------------------------
// Other source terms ....
//------------------------
source_r += *(cmp[0]) - lambda*divf.dsdr() ;
Scalar f_r(*mp) ;
if (source_r.get_etat() != ETATZERO) {
//------------------------
// The elliptic operator
//------------------------
Param_elliptic param_fr(source_r) ;
for (int lz=0; lz<nz; lz++)
param_fr.set_poisson_vect_r(lz) ;
f_r = source_r.sol_elliptic(param_fr) ;
}
else
f_r.set_etat_zero() ;
divf.dec_dzpuis(1) ;
Scalar source_eta = divf - f_r.dsdr() ;
source_eta.mult_r_dzpuis(0) ;
source_eta -= 2*f_r ;
resu.set_vr_eta_mu(f_r, source_eta.poisson_angu(), mu().poisson());
break ;
}
case 2 : {
Tenseur source_p(*mp, 1, CON, mp->get_bvect_spher() ) ;
source_p.set_etat_qcq() ;
for (int i=0; i<3; i++) {
source_p.set(i) = Cmp(*cmp[i]) ;
}
source_p.change_triad(mp->get_bvect_cart()) ;
Tenseur vect_auxi (*mp, 1, CON, mp->get_bvect_cart()) ;
vect_auxi.set_etat_qcq() ;
Tenseur scal_auxi (*mp) ;
scal_auxi.set_etat_qcq() ;
Tenseur resu_p(source_p.poisson_vect(lambda, vect_auxi, scal_auxi)) ;
resu_p.change_triad(mp->get_bvect_spher() ) ;
for (int i=1; i<=3; i++)
resu.set(i) = resu_p(i-1) ;
break ;
}
case 3 : {
Tenseur source_p(*mp, 1, CON, mp->get_bvect_spher() ) ;
source_p.set_etat_qcq() ;
for (int i=0; i<3; i++) {
source_p.set(i) = Cmp(*cmp[i]) ;
}
source_p.change_triad(mp->get_bvect_cart()) ;
Tenseur scal_auxi (*mp) ;
scal_auxi.set_etat_qcq() ;
Tenseur resu_p(source_p.poisson_vect_oohara(lambda, scal_auxi)) ;
resu_p.change_triad(mp->get_bvect_spher() ) ;
for (int i=1; i<=3; i++)
resu.set(i) = resu_p(i-1) ;
break ;
}
case 4 : {
Scalar divf(*mp) ;
if (fabs(lambda+1) < 1.e-8)
divf.set_etat_zero() ;
else {
divf = (potential(met_f) / (lambda + 1)) ;
}
int nz = mp->get_mg()->get_nzone() ;
//-----------------------------------
// Removal of the l=0 part of div(F)
//-----------------------------------
Scalar div_tmp = divf ;
div_tmp.div_r_dzpuis(4) ;
Scalar source_r(*mp) ;
Valeur& va_div = div_tmp.set_spectral_va() ;
if (div_tmp.get_etat() != ETATZERO) {
va_div.ylm() ;
for (int lz=0; lz<nz; lz++) {
int np = mp->get_mg()->get_np(lz) ;
int nt = mp->get_mg()->get_nt(lz) ;
int nr = mp->get_mg()->get_nr(lz) ;
if (va_div.c_cf->operator()(lz).get_etat() != ETATZERO)
for (int k=0; k<np+1; k++)
for (int j=0; j<nt; j++) {
int l_q, m_q, base_r ;
if (nullite_plm(j, nt, k, np, va_div.base) == 1) {
donne_lm(nz, lz, j, k, va_div.base, m_q, l_q, base_r) ;
if (l_q == 0)
for (int i=0; i<nr; i++)
va_div.c_cf->set(lz, k, j, i) = 0. ;
}
}
}
source_r.set_etat_qcq() ;
source_r.set_spectral_va() = 2*(*va_div.c_cf) ; //2*div(F)
source_r.set_spectral_va().ylm_i() ;
source_r.set_dzpuis(4) ;
}
else
source_r.set_etat_zero() ;
//------------------------
// Other source terms ....
//------------------------
source_r += *(cmp[0]) - lambda*divf.dsdr() ;
Scalar f_r(*mp) ;
if (source_r.get_etat() != ETATZERO) {
//------------------------
// The elliptic operator
//------------------------
Param_elliptic param_fr(source_r) ;
for (int lz=0; lz<nz; lz++)
param_fr.set_poisson_vect_r(lz) ;
f_r = source_r.sol_elliptic(param_fr) ;
}
else
f_r.set_etat_zero() ;
//--------------------------
// Equation for eta
//--------------------------
Scalar source_eta = *cmp[1] ;
source_eta.mult_sint() ;
source_eta = source_eta.dsdt() ;
source_eta.div_sint() ;
source_eta = (source_eta + cmp[2]->stdsdp()).poisson_angu() ;
Scalar dfrsr = f_r.dsdr() ;
dfrsr.div_r_dzpuis(4) ;
Scalar frsr2 = f_r ;
frsr2.div_r_dzpuis(2) ;
frsr2.div_r_dzpuis(4) ;
Valeur& va_dfr = dfrsr.set_spectral_va() ;
Valeur& va_fsr = frsr2.set_spectral_va() ;
va_dfr.ylm() ;
va_fsr.ylm() ;
//Since the operator depends on the domain, the source
//must be transformed accordingly.
Valeur& va_eta = source_eta.set_spectral_va() ;
if (source_eta.get_etat() == ETATZERO) source_eta.annule_hard() ;
va_eta.ylm() ;
for (int lz=0; lz<nz; lz++) {
bool ced = (mp->get_mg()->get_type_r(lz) == UNSURR) ;
int np = mp->get_mg()->get_np(lz) ;
int nt = mp->get_mg()->get_nt(lz) ;
int nr = mp->get_mg()->get_nr(lz) ;
if (va_eta.c_cf->operator()(lz).get_etat() != ETATZERO)
for (int k=0; k<np+1; k++)
for (int j=0; j<nt; j++) {
int l_q, m_q, base_r ;
if (nullite_plm(j, nt, k, np, va_eta.base) == 1) {
donne_lm(nz, lz, j, k, va_eta.base, m_q, l_q, base_r) ;
if (l_q > 0)
for (int i=0; i<nr; i++) {
if (va_div.c_cf->operator()(lz).get_etat() != ETATZERO)
va_eta.c_cf->set(lz, k, j, i)
-= (lambda + 2. / double(ced ? -l_q : (l_q+1) ))
* va_div.c_cf->operator()(lz, k, j, i) ;
if (va_fsr.c_cf->operator()(lz).get_etat() != ETATZERO) {
va_eta.c_cf->set(lz, k, j, i)
+= 2. / double(ced ? -l_q : (l_q+1) )
* va_dfr.c_cf->operator()(lz, k, j, i) ;
va_eta.c_cf->set(lz, k, j, i)
-= 2.*( ced ? double(l_q+2)/double(l_q)
: double(l_q-1)/double(l_q+1) )
* va_fsr.c_cf->set(lz, k, j, i) ;
}
} //Loop on r
} //nullite_plm
} //Loop on theta
} // Loop on domains
if (va_eta.c != 0x0) {
delete va_eta.c;
va_eta.c = 0x0 ;
}
va_eta.ylm_i() ;
//------------------------
// The elliptic operator
//------------------------
Param_elliptic param_eta(source_eta) ;
for (int lz=0; lz<nz; lz++)
param_eta.set_poisson_vect_eta(lz) ;
resu.set_vr_eta_mu(f_r, source_eta.sol_elliptic(param_eta), mu().poisson()) ;
break ;
}
case 5 : {
Scalar divf(*mp) ;
if (fabs(lambda+1) < 1.e-8)
divf.set_etat_zero() ;
else {
divf = (potential(met_f) / (lambda + 1)) ;
}
int nz = mp->get_mg()->get_nzone() ;
//-----------------------------------
// Removal of the l=0 part of div(F)
//-----------------------------------
Scalar div_lnot0 = divf ;
div_lnot0.div_r_dzpuis(4) ;
Scalar source_r(*mp) ;
Valeur& va_div = div_lnot0.set_spectral_va() ;
if (div_lnot0.get_etat() != ETATZERO) {
va_div.coef() ;
va_div.ylm() ;
for (int lz=0; lz<nz; lz++) {
int np = mp->get_mg()->get_np(lz) ;
int nt = mp->get_mg()->get_nt(lz) ;
int nr = mp->get_mg()->get_nr(lz) ;
if (va_div.c_cf->operator()(lz).get_etat() != ETATZERO)
for (int k=0; k<np+1; k++)
for (int j=0; j<nt; j++) {
int l_q, m_q, base_r ;
if (nullite_plm(j, nt, k, np, va_div.base) == 1) {
donne_lm(nz, lz, j, k, va_div.base, m_q, l_q, base_r) ;
if (l_q == 0)
for (int i=0; i<nr; i++)
va_div.c_cf->set(lz, k, j, i) = 0. ;
}
}
}
source_r.set_etat_qcq() ;
source_r.set_spectral_va() = 2*(*va_div.c_cf) ; //2*div(F)
source_r.set_spectral_va().ylm_i() ;
source_r.set_dzpuis(4) ;
}
else
source_r.set_etat_zero() ;
//------------------------
// Other source terms ....
//------------------------
source_r += *(cmp[0]) - lambda*divf.dsdr() ;
Scalar f_r(*mp) ;
if (source_r.get_etat() != ETATZERO) {
//------------------------
// The elliptic operator
//------------------------
Param_elliptic param_fr(source_r) ;
for (int lz=0; lz<nz; lz++)
param_fr.set_poisson_vect_r(lz) ;
f_r = source_r.sol_elliptic(param_fr) ;
}
else
f_r.set_etat_zero() ;
Scalar source_eta = - *(cmp[0]) ;
source_eta.mult_r_dzpuis(3) ;
source_eta -= (lambda+2.)*divf ;
source_eta.dec_dzpuis() ;
f_r.set_spectral_va().ylm() ;
Scalar tmp = 2*f_r + f_r.lapang() ;
tmp.div_r_dzpuis(2) ;
source_eta += tmp ;
tmp = (1.+lambda)*divf ;
tmp.mult_r_dzpuis(0) ;
tmp += f_r ;
source_eta = source_eta.primr() ;
f_r.set_spectral_va().ylm_i() ;
resu.set_vr_eta_mu(f_r, (tmp+source_eta).poisson_angu(), mu().poisson()) ;
break ;
}
case 6 : {
poisson_block(lambda, resu) ;
break ;
}
default : {
cout << "Vector::poisson : unexpected type of method !" << endl
<< " method = " << method << endl ;
abort() ;
break ;
}
} // End of switch
} // End of non-null case
return resu ;
}
Vector Vector::poisson(double lambda, int method) const {
const Base_vect_spher* tspher = dynamic_cast<const Base_vect_spher*>(triad) ;
const Base_vect_cart* tcart = dynamic_cast<const Base_vect_cart*>(triad) ;
assert ((tspher != 0x0) || (tcart != 0x0)) ;
const Metric_flat* met_f = 0x0 ;
if (tspher != 0x0) {
assert (tcart == 0x0) ;
met_f = &(mp->flat_met_spher()) ;
}
if (tcart != 0x0) {
assert (tspher == 0x0) ;
met_f = &(mp->flat_met_cart()) ;
}
return ( poisson(lambda, *met_f, method) );
}
// Version with parameters
// -----------------------
Vector Vector::poisson(const double lambda, Param& par, int method) const {
for (int i=0; i<3; i++)
assert(cmp[i]->check_dzpuis(4)) ;
assert ((method==0) || (method==2)) ;
Vector resu(*mp, CON, triad) ;
switch (method) {
case 0 : {
Metric_flat met_local(*mp, *triad) ;
int nitermax = par.get_int(0) ;
int& niter = par.get_int_mod(0) ;
double relax = par.get_double(0) ;
double precis = par.get_double(1) ;
Cmp& ss_phi = par.get_cmp_mod(0) ;
Cmp& ss_khi = par.get_cmp_mod(1) ;
Cmp& ss_mu = par.get_cmp_mod(2) ;
Param par_phi ;
par_phi.add_int(nitermax, 0) ;
par_phi.add_int_mod(niter, 0) ;
par_phi.add_double(relax, 0) ;
par_phi.add_double(precis, 1) ;
par_phi.add_cmp_mod(ss_phi, 0) ;
Scalar poten(*mp) ;
if (fabs(lambda+1) < 1.e-8)
poten.set_etat_zero() ;
else {
Scalar tmp = potential(met_local) / (lambda + 1) ;
tmp.inc_dzpuis(2) ;
tmp.poisson(par_phi, poten) ;
}
Vector grad = poten.derive_con(met_local) ;
grad.dec_dzpuis(2) ;
Param par_free ;
par_free.add_int(nitermax, 0) ;
par_free.add_int_mod(niter, 0) ;
par_free.add_double(relax, 0) ;
par_free.add_double(precis, 1) ;
par_free.add_cmp_mod(ss_khi, 0) ;
par_free.add_cmp_mod(ss_mu, 1) ;
return div_free(met_local).poisson(par_free) + grad ;
break ;
}
case 2 : {
Tenseur source_p(*mp, 1, CON, mp->get_bvect_spher() ) ;
source_p.set_etat_qcq() ;
for (int i=0; i<3; i++) {
source_p.set(i) = Cmp(*cmp[i]) ;
}
source_p.change_triad(mp->get_bvect_cart()) ;
Tenseur vect_auxi (*mp, 1, CON, mp->get_bvect_cart()) ;
vect_auxi.set_etat_qcq() ;
for (int i=0; i<3 ;i++){
vect_auxi.set(i) = 0. ;
}
Tenseur scal_auxi (*mp) ;
scal_auxi.set_etat_qcq() ;
scal_auxi.set().annule_hard() ;
scal_auxi.set_std_base() ;
Tenseur resu_p(*mp, 1, CON, mp->get_bvect_cart() ) ;
resu_p.set_etat_qcq() ;
source_p.poisson_vect(lambda, par, resu_p, vect_auxi, scal_auxi) ;
resu_p.change_triad(mp->get_bvect_spher() ) ;
for (int i=1; i<=3; i++)
resu.set(i) = resu_p(i-1) ;
break ;
}
default : {
cout << "Vector::poisson : unexpected type of method !" << endl
<< " method = " << method << endl ;
abort() ;
break ;
}
}// End of switch
return resu ;
}
}
Lorene::Base_vect_cart
Cartesian vectorial bases (triads).
Definition base_vect.h:201
Lorene::Base_vect_spher
Spherical orthonormal vectorial bases (triads).
Definition base_vect.h:308
Lorene::Cmp
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Lorene::Cmp::annule_hard
void annule_hard()
Sets the Cmp to zero in a hard way.
Definition cmp.C:338
Lorene::Metric_flat
Flat metric for tensor calculation.
Definition metric.h:261
Lorene::Mtbl_cf::get_etat
int get_etat() const
Returns the logical state.
Definition mtbl_cf.h:456
Lorene::Mtbl_cf::set
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
Definition mtbl_cf.h:294
Lorene::Param_elliptic
This class contains the parameters needed to call the general elliptic solver.
Definition param_elliptic.h:135
Lorene::Param_elliptic::set_poisson_vect_eta
void set_poisson_vect_eta(int zone)
Sets the operator to be a regular elliptic operator to solve for the component of the vector Poisson...
Definition param_elliptic.C:533
Lorene::Param_elliptic::set_poisson_vect_r
void set_poisson_vect_r(int zone, bool only_l_zero=false)
Sets the operator to in all domains, for ; and to in all domains otherwise.
Definition param_elliptic.C:487
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Param::add_double
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Definition param.C:315
Lorene::Param::get_cmp_mod
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
Definition param.C:1049
Lorene::Param::get_int
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
Definition param.C:292
Lorene::Param::get_double
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
Definition param.C:361
Lorene::Param::add_cmp_mod
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
Definition param.C:1004
Lorene::Param::add_int_mod
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Definition param.C:385
Lorene::Param::get_int_mod
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Definition param.C:430
Lorene::Param::add_int
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition param.C:246
Lorene::Scalar::lapang
const Scalar & lapang() const
Returns the angular Laplacian of *this , where .
Definition scalar_deriv.C:461
Lorene::Scalar::div_r_dzpuis
void div_r_dzpuis(int ced_mult_r)
Division by r everywhere but with the output flag dzpuis set to ced_mult_r .
Definition scalar_r_manip.C:147
Lorene::Scalar::dsdt
const Scalar & dsdt() const
Returns of *this .
Definition scalar_deriv.C:208
Lorene::Scalar::div_sint
void div_sint()
Division by .
Definition scalar_th_manip.C:98
Lorene::Scalar::poisson
Scalar poisson() const
Solves the scalar Poisson equation with *this as a source.
Definition scalar_pde.C:136
Lorene::Scalar::set_etat_qcq
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition scalar.C:353
Lorene::Scalar::poisson_angu
Scalar poisson_angu(double lambda=0) const
Solves the (generalized) angular Poisson equation with *this as source.
Definition scalar_pde.C:200
Lorene::Scalar::inc_dzpuis
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Definition scalar_r_manip.C:470
Lorene::Scalar::set_etat_zero
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition scalar.C:324
Lorene::Scalar::dsdr
const Scalar & dsdr() const
Returns of *this .
Definition scalar_deriv.C:113
Lorene::Scalar::set_spectral_va
Valeur & set_spectral_va()
Returns va (read/write version).
Definition scalar.h:604
Lorene::Scalar::annule_hard
void annule_hard()
Sets the Scalar to zero in a hard way.
Definition scalar.C:380
Lorene::Scalar::mult_sint
void mult_sint()
Multiplication by .
Definition scalar_th_manip.C:84
Lorene::Scalar::get_etat
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Definition scalar.h:554
Lorene::Scalar::set_dzpuis
void set_dzpuis(int)
Modifies the dzpuis flag.
Definition scalar.C:808
Lorene::Scalar::sol_elliptic
Scalar sol_elliptic(Param_elliptic &params) const
Resolution of a general elliptic equation, putting zero at infinity.
Definition scalar_pde.C:234
Lorene::Scalar::mult_r_dzpuis
void mult_r_dzpuis(int ced_mult_r)
Multiplication by r everywhere but with the output flag dzpuis set to ced_mult_r .
Definition scalar_r_manip.C:221
Lorene::Scalar::derive_con
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Definition scalar_deriv.C:402
Lorene::Scalar::dec_dzpuis
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Definition scalar_r_manip.C:418
Lorene::Scalar::primr
Scalar primr(bool null_infty=true) const
Computes the radial primitive which vanishes for .
Definition scalar_integ.C:101
Lorene::Tenseur
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:301
Lorene::Tenseur::set
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition tenseur.C:824
Lorene::Tenseur::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tenseur.C:636
Lorene::Tenseur::poisson_vect_oohara
void poisson_vect_oohara(double lambda, Param &par, Tenseur &shift, Tenseur &scal) const
Solves the vectorial Poisson equation .
Definition tenseur_pde.C:218
Lorene::Tenseur::set_std_base
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition tenseur.C:1170
Lorene::Tenseur::change_triad
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition tenseur.C:668
Lorene::Tenseur::poisson_vect
void poisson_vect(double lambda, Param &par, Tenseur &shift, Tenseur &vect, Tenseur &scal) const
Solves the vectorial Poisson equation : .
Definition tenseur_pde.C:118
Lorene::Valeur
Values and coefficients of a (real-value) function.
Definition valeur.h:287
Lorene::Valeur::ylm
void ylm()
Computes the coefficients of *this.
Definition valeur_ylm.C:138
Lorene::Valeur::c
Mtbl * c
Values of the function at the points of the multi-grid.
Definition valeur.h:299
Lorene::Valeur::c_cf
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Definition valeur.h:302
Lorene::Valeur::coef
void coef() const
Computes the coeffcients of *this.
Definition valeur_coef.C:148
Lorene::Valeur::ylm_i
void ylm_i()
Inverse of ylm().
Definition valeur_ylm_i.C:131
Lorene::Valeur::base
Base_val base
Bases on which the spectral expansion is performed.
Definition valeur.h:305
Lorene::Vector_divfree::poisson
Vector_divfree poisson() const
Computes the solution of a vectorial Poisson equation with *this as a source:
Definition vector_df_poisson.C:146
Lorene::Vector::poisson
Vector poisson(double lambda, int method=6) const
Solves the vector Poisson equation with *this as a source.
Definition vector_poisson.C:518
Lorene::Vector::mu
virtual const Scalar & mu() const
Gives the field such that the angular components of the vector are written:
Definition vector_etamu.C:98
Lorene::Vector::Vector
Vector(const Map &map, int tipe, const Base_vect &triad_i)
Standard constructor.
Definition vector.C:156
Lorene::Vector::div_free
const Vector_divfree & div_free(const Metric &) const
Returns the div-free vector in the Helmholtz decomposition.
Definition vector.C:504
Lorene::Vector::potential
const Scalar & potential(const Metric &) const
Returns the potential in the Helmholtz decomposition.
Definition vector.C:492
Lorene::Vector::set
Scalar & set(int)
Read/write access to a component.
Definition vector.C:296
Lorene::Vector::set_vr_eta_mu
void set_vr_eta_mu(const Scalar &vr_i, const Scalar &eta_i, const Scalar &mu_i)
Defines the components through potentials and (see members p_eta and p_mu ), as well as the compon...
Definition vector_etamu.C:189
Lorene::Tensor::dec_dzpuis
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
Definition tensor.C:808
Lorene::Tensor::mp
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Definition tensor.h:295
Lorene::Tensor::cmp
Scalar ** cmp
Array of size n_comp of pointers onto the components.
Definition tensor.h:315
Lorene::Tensor::set_etat_zero
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Definition tensor.C:497
Lorene::Tensor::triad
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
Definition tensor.h:303
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::poisson_angu
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const =0
Computes the solution of the generalized angular Poisson equation.