32 #include "ope_elementary.h" 39 Tbl _cl_helmholtz_minus_pseudo_1d_pas_prevu (
const Tbl & source,
int) {
40 cout <<
"Combinaison lineaire pas prevue..." << endl ;
52 Tbl _cl_helmholtz_minus_pseudo_1d_r_chebu_deux(
const Tbl&) ;
54 Tbl _cl_helmholtz_minus_pseudo_1d_r_chebu (
const Tbl &source,
int puis) {
62 res = _cl_helmholtz_minus_pseudo_1d_r_chebu_deux(source) ;
73 Tbl _cl_helmholtz_minus_pseudo_1d_r_chebu_deux (
const Tbl &source) {
76 int n = source.get_dim(0) ;
79 for (
int i=0 ; i<n-2 ; i++) {
80 barre.set(i) = ((1+dirac)*source(i)-source(i+2)) ;
85 for (
int i=0 ; i<n-4 ; i++)
86 tilde.set(i) = (barre(i)-barre(i+2)) ;
89 for (
int i=0 ; i<n-4 ; i++)
90 bis.set(i) = (tilde(i)+tilde(i+1)) ;
93 for (
int i=0 ; i<n-4 ; i++)
94 res.set(i) = (bis(i)-bis(i+1)) ;
104 Tbl cl_helmholtz_minus_pseudo_1d (
const Tbl &source,
int puis,
int base_r) {
106 static Tbl (*cl_helmholtz_minus_pseudo_1d[
MAX_BASE])(
const Tbl &, int) ;
113 cl_helmholtz_minus_pseudo_1d[i] = _cl_helmholtz_minus_pseudo_1d_pas_prevu ;
116 cl_helmholtz_minus_pseudo_1d[
R_CHEBU >>
TRA_R] = _cl_helmholtz_minus_pseudo_1d_r_chebu ;
120 Tbl res(cl_helmholtz_minus_pseudo_1d[base_r](source, puis)) ;
128 Tbl _solp_helmholtz_minus_pseudo_1d_pas_prevu (
const Matrice &,
const Matrice &,
129 double,
double,
const Tbl &,
int) {
130 cout <<
" Solution homogene pas prevue ..... : "<< endl ;
140 Tbl _solp_helmholtz_minus_pseudo_1d_r_chebu_deux (
const Matrice&,
const Matrice&,
143 Tbl _solp_helmholtz_minus_pseudo_1d_r_chebu (
const Matrice &lap,
const Matrice &nondege,
145 const Tbl &source,
int puis) {
152 res = _solp_helmholtz_minus_pseudo_1d_r_chebu_deux
153 (lap, nondege, source) ;
163 Tbl _solp_helmholtz_minus_pseudo_1d_r_chebu_deux (
const Matrice &lap,
const Matrice &nondege,
167 int dege = n-nondege.get_dim(0) ;
170 Tbl source_cl (cl_helmholtz_minus_pseudo_1d(source, 2,
R_CHEBU)) ;
174 for (
int i=0 ; i<n-dege ; i++)
175 so.set(i) = source_cl(i);
177 Tbl sol (nondege.inverse(so)) ;
181 for (
int i=1 ; i<n-2 ; i++) {
182 res.set(i) += sol(i-1)*(2*i+3) ;
183 res.set(i+1) += -sol(i-1)*(4*i+4) ;
184 res.set(i+2) += sol(i-1)*(2*i+1) ;
198 double, double,
const Tbl&, int) ;
205 solp_helmholtz_minus_pseudo_1d[i] = _solp_helmholtz_minus_pseudo_1d_pas_prevu ;
208 solp_helmholtz_minus_pseudo_1d[
R_CHEBU >>
TRA_R] = _solp_helmholtz_minus_pseudo_1d_r_chebu ;
215 valeurs *=
sqrt(
double(2)) ;
double alpha
Parameter of the associated mapping.
int dzpuis
the associated dzpuis, if in the compactified domain.
Matrice * ope_cl
Pointer on the banded-matrix of the operator.
Cmp sqrt(const Cmp &)
Square root.
double beta
Parameter of the associated mapping.
double dsp_minus
Value of the derivative of the particular solution at the inner boundary.
virtual void do_non_dege() const
Computes the non-degenerated matrix of the operator.
virtual Tbl get_solp(const Tbl &so) const
Computes the particular solution, given the source so .
double sp_minus
Value of the particular solution at the inner boundary.
int base_r
Radial basis of decomposition.
double sp_plus
Value of the particular solution at the outer boundary.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
double dsp_plus
Value of the derivative of the particular solution at the outer boundary.
int get_dim(int i) const
Gives the i-th dimension (ie dim.dim[i])
int get_dim(int i) const
Returns the dimension of the matrix.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
#define MAX_BASE
Nombre max. de bases differentes.
Matrice * non_dege
Pointer on the non-degenerated matrix of the operator.