23char solp_helmholtz_plus_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/PDE/solp_helmholtz_plus.C,v 1.5 2014/10/13 08:53:31 j_novak Exp $" ;
54#include "type_parite.h"
61Tbl _solp_helmholtz_plus_pas_prevu (
const Matrice &,
const Matrice &,
62 const Tbl &,
double,
double) {
63 cout <<
" Solution homogene pas prevue ..... : "<< endl ;
75Tbl _solp_helmholtz_plus_r_cheb (
const Matrice &lap,
const Matrice &nondege,
76 const Tbl &source,
double alpha,
double beta) {
79 int dege = n-nondege.get_dim(0) ;
82 Tbl source_aux(source*alpha*alpha) ;
84 Tbl xxso(source_aux) ;
85 multx_1d(n, &xso.t,
R_CHEB) ;
86 multx_1d(n, &xxso.t,
R_CHEB) ;
87 multx_1d(n, &xxso.t,
R_CHEB) ;
88 source_aux = beta*beta/alpha/alpha*source_aux+2*beta/alpha*xso+xxso ;
90 source_aux = cl_helmholtz_plus (source_aux,
R_CHEB) ;
94 for (
int i=0 ; i<n-dege ; i++)
95 so.set(i) = source_aux(i) ;
97 Tbl auxi(nondege.inverse(so)) ;
101 for (
int i=dege ; i<n ; i++)
102 res.set(i) = auxi(i-dege) ;
104 for (
int i=0 ; i<dege ; i++)
112Tbl _solp_helmholtz_plus_r_chebp (
const Matrice &lap,
const Matrice &nondege,
113 const Tbl &source,
double alpha,
double) {
116 int dege = n-nondege.get_dim(0) ;
119 Tbl source_aux(source*alpha*alpha) ;
120 source_aux = cl_helmholtz_plus (source_aux,
R_CHEBP) ;
124 for (
int i=0 ; i<n-dege ; i++)
125 so.set(i) = source_aux(i) ;
127 Tbl auxi(nondege.inverse(so)) ;
131 for (
int i=dege ; i<n ; i++)
132 res.set(i) = auxi(i-dege) ;
134 for (
int i=0 ; i<dege ; i++)
143Tbl solp_helmholtz_plus (
const Matrice &lap,
const Matrice &nondege,
144 const Tbl &source,
double alpha,
double beta,
148 static Tbl (*solp_helmholtz_plus[
MAX_BASE]) (
const Matrice&,
const Matrice&,
149 const Tbl&, double, double) ;
156 solp_helmholtz_plus[i] = _solp_helmholtz_plus_pas_prevu ;
159 solp_helmholtz_plus[
R_CHEB >>
TRA_R] = _solp_helmholtz_plus_r_cheb ;
160 solp_helmholtz_plus[
R_CHEBP >>
TRA_R] = _solp_helmholtz_plus_r_chebp ;
163 Tbl res(solp_helmholtz_plus[base_r] (lap, nondege, source, alpha, beta)) ;
int get_dim(int i) const
Gives the i-th dimension (ie dim.dim[i])
#define MAX_BASE
Nombre max. de bases differentes.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEB
base de Chebychev ordinaire (fin)
#define R_CHEBP
base de Cheb. paire (rare) seulement