23 char comb_lin_helmholtz_plusC[] =
"$Header $" ;
54 #include "type_parite.h" 60 Matrice _cl_helmholtz_plus_pas_prevu (
const Matrice& so) {
61 cout <<
"CL Helmholtz plus not implemented" << endl ;
73 Matrice _cl_helmholtz_plus_r_chebp (
const Matrice &source) {
76 assert (n == source.get_dim(1)) ;
78 Matrice barre(source) ;
81 for (
int i=0 ; i<n-2 ; i++) {
82 for (
int j=0 ; j<n ; j++)
83 barre.set(i, j) = (1+dirac)*source(i, j)-source(i+2, j) ;
87 Matrice tilde(barre) ;
88 for (
int i=0 ; i<n-4 ; i++)
89 for (
int j=0 ; j<n ; j++)
90 tilde.set(i, j) = barre(i, j)-barre(i+2, j) ;
93 for (
int i=0 ; i<n-4 ; i++)
94 for (
int j=0 ; j<n ; j++)
95 res.set(i, j) = tilde(i, j)-tilde(i+1, j) ;
105 Matrice _cl_helmholtz_plus_r_cheb (
const Matrice& source) {
109 assert (n==source.get_dim(1)) ;
111 Matrice barre(source) ;
113 for (
int i=0 ; i<n-2 ; i++) {
114 for (
int j=0 ; j<n ; j++)
115 barre.set(i, j) = ((1+dirac)*source(i, j)-source(i+2, j))
117 if (i==0) dirac = 0 ;
121 for (
int i=0 ; i<n-4 ; i++)
122 for (
int j=0 ; j<n ; j++)
123 res.set(i, j) = barre(i, j)-barre(i+2, j) ;
133 Matrice cl_helmholtz_plus (
const Matrice &source,
int base_r) {
136 static Matrice (*cl_helmholtz_plus[
MAX_BASE]) (
const Matrice &) ;
143 cl_helmholtz_plus[i] = _cl_helmholtz_plus_pas_prevu ;
146 cl_helmholtz_plus[
R_CHEB >>
TRA_R] = _cl_helmholtz_plus_r_cheb ;
147 cl_helmholtz_plus[
R_CHEBP >>
TRA_R] = _cl_helmholtz_plus_r_chebp ;
150 Matrice res(cl_helmholtz_plus[base_r](source)) ;
160 Tbl _cl_helmholtz_plus_pas_prevu (
const Tbl &so) {
162 cout <<
"Linear combination for Helmholtz plus not implemented..." << endl ;
172 Tbl _cl_helmholtz_plus_r_chebp (
const Tbl& source) {
178 for (
int i=0 ; i<n-2 ; i++) {
179 barre.set(i) = (1+dirac)*source(i)-source(i+2) ;
180 if (i==0) dirac = 0 ;
184 for (
int i=0 ; i<n-4 ; i++)
185 tilde.set(i) = barre(i)-barre(i+2) ;
188 for (
int i=0 ; i<n-4 ; i++)
189 res.set(i) = tilde(i)-tilde(i+1) ;
197 Tbl _cl_helmholtz_plus_r_cheb (
const Tbl& source) {
203 for (
int i=0 ; i<n-2 ; i++) {
204 barre.set(i) = ((1+dirac)*source(i)-source(i+2))
206 if (i==0) dirac = 0 ;
210 for (
int i=0 ; i<n-4 ; i++)
211 res.set(i) = barre(i)-barre(i+2) ;
219 Tbl cl_helmholtz_plus (
const Tbl &source,
int base_r) {
222 static Tbl (*cl_helmholtz_plus[
MAX_BASE])(
const Tbl &) ;
229 cl_helmholtz_plus[i] = _cl_helmholtz_plus_pas_prevu ;
232 cl_helmholtz_plus[
R_CHEB >>
TRA_R] = _cl_helmholtz_plus_r_cheb ;
233 cl_helmholtz_plus[
R_CHEBP >>
TRA_R] = _cl_helmholtz_plus_r_chebp ;
236 Tbl res(cl_helmholtz_plus[base_r](source)) ;
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEBP
base de Cheb. paire (rare) seulement
int get_dim(int i) const
Returns the dimension of the matrix.
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEB
base de Chebychev ordinaire (fin)