28char vector_poisson_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/vector_poisson.C,v 1.24 2014/10/13 08:53:45 j_novak Exp $" ;
126#include "param_elliptic.h"
134 for (
int i=0;
i<3;
i++) {
142 resu.set_etat_zero() ;
151 poten.set_etat_zero() ;
167 divf.set_etat_zero() ;
172 int nz =
mp->get_mg()->get_nzone() ;
184 for (
int lz=0;
lz<nz;
lz++) {
185 int np =
mp->get_mg()->get_np(
lz) ;
186 int nt =
mp->get_mg()->get_nt(
lz) ;
187 int nr =
mp->get_mg()->get_nr(
lz) ;
188 if (
va_div.c_cf->operator()(
lz).get_etat() != ETATZERO)
189 for (
int k=0;
k<np+1;
k++)
190 for (
int j=0;
j<nt;
j++) {
192 if (nullite_plm(
j, nt,
k, np,
va_div.base) == 1) {
195 for (
int i=0;
i<nr;
i++)
202 source_r.set_spectral_va().ylm_i() ;
213 if (
source_r.get_etat() != ETATZERO) {
219 for (
int lz=0;
lz<nz;
lz++)
225 f_r.set_etat_zero() ;
241 for (
int i=0;
i<3;
i++) {
251 resu_p.change_triad(
mp->get_bvect_spher() ) ;
253 for (
int i=1;
i<=3;
i++)
263 for (
int i=0;
i<3;
i++) {
271 resu_p.change_triad(
mp->get_bvect_spher() ) ;
273 for (
int i=1;
i<=3;
i++)
282 divf.set_etat_zero() ;
287 int nz =
mp->get_mg()->get_nzone() ;
296 if (
div_tmp.get_etat() != ETATZERO) {
298 for (
int lz=0;
lz<nz;
lz++) {
299 int np =
mp->get_mg()->get_np(
lz) ;
300 int nt =
mp->get_mg()->get_nt(
lz) ;
301 int nr =
mp->get_mg()->get_nr(
lz) ;
302 if (
va_div.c_cf->operator()(
lz).get_etat() != ETATZERO)
303 for (
int k=0;
k<np+1;
k++)
304 for (
int j=0;
j<nt;
j++) {
306 if (nullite_plm(
j, nt,
k, np,
va_div.base) == 1) {
309 for (
int i=0;
i<nr;
i++)
316 source_r.set_spectral_va().ylm_i() ;
327 if (
source_r.get_etat() != ETATZERO) {
333 for (
int lz=0;
lz<nz;
lz++)
339 f_r.set_etat_zero() ;
351 dfrsr.div_r_dzpuis(4) ;
353 frsr2.div_r_dzpuis(2) ;
354 frsr2.div_r_dzpuis(4) ;
366 for (
int lz=0;
lz<nz;
lz++) {
367 bool ced = (
mp->get_mg()->get_type_r(
lz) == UNSURR) ;
368 int np =
mp->get_mg()->get_np(
lz) ;
369 int nt =
mp->get_mg()->get_nt(
lz) ;
370 int nr =
mp->get_mg()->get_nr(
lz) ;
371 if (
va_eta.c_cf->operator()(
lz).get_etat() != ETATZERO)
372 for (
int k=0;
k<np+1;
k++)
373 for (
int j=0;
j<nt;
j++) {
375 if (nullite_plm(
j, nt,
k, np,
va_eta.base) == 1) {
378 for (
int i=0;
i<nr;
i++) {
379 if (
va_div.c_cf->operator()(
lz).get_etat() != ETATZERO)
383 if (
va_fsr.c_cf->operator()(
lz).get_etat() != ETATZERO) {
406 for (
int lz=0;
lz<nz;
lz++)
418 divf.set_etat_zero() ;
423 int nz =
mp->get_mg()->get_nzone() ;
435 for (
int lz=0;
lz<nz;
lz++) {
436 int np =
mp->get_mg()->get_np(
lz) ;
437 int nt =
mp->get_mg()->get_nt(
lz) ;
438 int nr =
mp->get_mg()->get_nr(
lz) ;
439 if (
va_div.c_cf->operator()(
lz).get_etat() != ETATZERO)
440 for (
int k=0;
k<np+1;
k++)
441 for (
int j=0;
j<nt;
j++) {
443 if (nullite_plm(
j, nt,
k, np,
va_div.base) == 1) {
446 for (
int i=0;
i<nr;
i++)
453 source_r.set_spectral_va().ylm_i() ;
464 if (
source_r.get_etat() != ETATZERO) {
471 for (
int lz=0;
lz<nz;
lz++)
477 f_r.set_etat_zero() ;
483 f_r.set_spectral_va().ylm() ;
485 tmp.div_r_dzpuis(2) ;
488 tmp.mult_r_dzpuis(0) ;
491 f_r.set_spectral_va().ylm_i() ;
504 cout <<
"Vector::poisson : unexpected type of method !" <<
endl
528 met_f = &(
mp->flat_met_spher()) ;
533 met_f = &(
mp->flat_met_cart()) ;
546 for (
int i=0;
i<3;
i++)
560 double relax =
par.get_double(0) ;
561 double precis =
par.get_double(1) ;
570 par_phi.add_double(precis, 1) ;
575 poten.set_etat_zero() ;
603 for (
int i=0;
i<3;
i++) {
610 for (
int i=0;
i<3 ;
i++){
621 resu_p.change_triad(
mp->get_bvect_spher() ) ;
623 for (
int i=1;
i<=3;
i++)
630 cout <<
"Vector::poisson : unexpected type of method !" <<
endl
Cartesian vectorial bases (triads).
Spherical orthonormal vectorial bases (triads).
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Time evolution with partial storage (*** under development ***).
Flat metric for tensor calculation.
This class contains the parameters needed to call the general elliptic solver.
Tensor field of valence 0 (or component of a tensorial field).
const Scalar & stdsdp() const
Returns of *this .
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Values and coefficients of a (real-value) function.
Tensor field of valence 1.
Vector poisson(double lambda, int method=6) const
Solves the vector Poisson equation with *this as a source.
virtual const Scalar & mu() const
Gives the field such that the angular components of the vector are written:
const Vector_divfree & div_free(const Metric &) const
Returns the div-free vector in the Helmholtz decomposition.
const Scalar & potential(const Metric &) const
Returns the potential in the Helmholtz decomposition.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Scalar ** cmp
Array of size n_comp of pointers onto the components.
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.