proteus  1.8.1
C/C++/Fortran libraries
WaveTools.h
Go to the documentation of this file.
1 #ifndef WAVETOOLS_H
2 #define WAVETOOLS_H
3 
4 #include <cmath>
5 #include <iostream>
6 #include <valarray>
7 namespace proteus
8 {
9  const int nDim(3);
10  const double PI_ = M_PI;
11  const double Pi2_ = (2.*PI_);
12  const double Pi2inv_ = (1./Pi2_);
13  const double Pihalf_ = (0.5*PI_);
14  const double Pihalfinv_ = (1./Pihalf_);
15  const double Pi03_ = (0.3*PI_);
16  const double Pi07_ = (0.7*PI_);
17  const double Pi17_ = (1.7*PI_);
18 
19 
20  inline void fastcosh(double * hype, double k, double Z, bool fast )
21  {
22 
23  double Kd = k * Z;
24  double Kd2 = Kd * Kd *0.5;
25  double Kd3 = Kd2 * Kd * 3.3333333333E-01;
26  double Kd4 = Kd3 * Kd* 2.5000000000E-01;
27  double Kd5 = Kd4 * Kd *2.0000000000E-01;
28  double Kd6 = Kd5 * Kd*1.6666666667E-01;
29  double Kd7 = Kd6 * Kd*1.4285714286E-01;
30  double Kd8 = Kd7 * Kd*1.2500000000E-01;
31  double Kd9 = Kd8 * Kd*1.1111111111E-01;
32  double Kd10 =Kd9 * Kd*0.1;
33  if(fast)
34  {
35  hype[0] = 1. + Kd2 + Kd4 + Kd6 + Kd8 + Kd10;
36  hype[1] = Kd + Kd3 + Kd5 + Kd7 + Kd9;
37  }
38  else
39  {
40  hype[0] = cosh(Kd);
41  hype[1] = sinh(Kd);
42  }
43 
44  }
45 
46  inline double fastcos(double phi, bool fast)
47  {
48  if(fast)
49  {
50 
51 
52 // Setting the phase between 0 and 2pi
53  double phiphi = phi - Pi2_ * int(phi * Pi2inv_);
54  if(phiphi<0.){phiphi += Pi2_;}
55 
56  int signcos = 1;
57  //Setting the 1.7pi -> 2p branch to -Pi/4 to 0
58  if(phiphi > Pi17_){ phiphi = phiphi - Pi2_; }
59  //The angle phi must be between -0.3Pi to 0.7Pi for the polynomials
60  if(phiphi > Pi07_ ){ phiphi = phiphi - PI_; signcos = -1;}
61 
62 
63 
64 
65  //Calculating approximation. Accuracy <0.4%
66 
67  double phi2 = phiphi * phiphi *0.5;
68  double phi4 = phi2*phi2*0.16666666666666666667;
69  double fastc = 1. - phi2 + phi4;
70  double fastcos = signcos*fastc;
71 
72  //Choosing the right Quadrant
73  if(phiphi >= Pi03_){
74 
75  double phi1 = phiphi - Pihalf_;
76  double phi3 = phi1 * phi1 *phi1 * 0.166666666666667;
77  double fastc1 = - phi1 + phi3;
78 
79  fastcos = signcos*fastc1;}
80 
81  return fastcos;
82  }
83  else
84  {
85  return cos(phi);
86  }
87  }
88 
89 
90 
91 
92  inline double __cpp_eta_mode(double x[nDim], double t, double kDir[nDim], double omega, double phi, double amplitude, bool fast)
93  {
94 
95  double phase = x[0]*kDir[0]+x[1]*kDir[1]+x[2]*kDir[2] - omega*t + phi;
96  double eta = amplitude*fastcos(phase,fast);
97  return eta;
98 
99  }
100 
101  /*
102  inline double* __cpp_vel_mode(double * x, double t, double *kDir,double kAbs, double omega, double phi, double amplitude,double mwl, double depth, double *waveDir, double *vDir, double tanhkd)
103  {
104 
105  double phase = x[0]*kDir[0]+x[1]*kDir[1]+x[2]*kDir[2] - omega*t + phi;
106  double Z = (vDir[0]*x[0] + vDir[1]*x[1]+ vDir[2]*x[2]) - mwl;
107  double* VV;
108  VV = new double[nDim];
109  double Uhype =0.;
110  double Vhype =0.;
111  double fcosh =0.;
112  double fsinh =0.;
113 
114 
115  if(kAbs*Z > -2*PI_)
116  {
117  fcosh = fastcosh(kAbs, Z, true);
118  fsinh = fastcosh(kAbs, Z, false);
119  Uhype = fcosh / tanhkd + fsinh;
120  Vhype = fsinh / tanhkd + fcosh;
121  }
122  double fcos = fastcos(phase);
123  double fsin = fastcos(Pihalf_ - phase);
124 
125  double UH=amplitude*omega*Uhype*fcos;
126  double UV=amplitude*omega*Vhype*fsin;
127  //Setting wave direction
128  for(int ii=0; ii<nDim ; ii++)
129  {
130  VV[ii] = UH*waveDir[ii] + UV*vDir[ii];
131  }
132  return VV;
133  delete [] VV;
134  }
135  */
136  inline void __cpp_vel_mode_p(double* U, double x[nDim], double t, double kDir[nDim],double kAbs, double omega, double phi, double amplitude,double mwl, double depth, double waveDir[nDim], double vDir[nDim], double tanhkd, double gAbs, bool fast)
137  {
138  double phase = x[0]*kDir[0]+x[1]*kDir[1]+x[2]*kDir[2] - omega*t + phi;
139  double Z = (vDir[0]*x[0] + vDir[1]*x[1]+ vDir[2]*x[2]) - mwl;
140  double Uhype =0.;
141  double Vhype =0.;
142  double hype[2] = {0};
143 
144  if(fast)
145  {
146  if(kAbs*Z > -PI_)
147  {
148  fastcosh(hype,kAbs, Z, fast);
149 
150  Uhype = hype[0] / tanhkd + hype[1];
151  Vhype = hype[1]/ tanhkd + hype[0];
152  }
153  }
154  else
155  { fastcosh(hype,kAbs, Z, fast);
156 
157  Uhype = hype[0] / tanhkd + hype[1];
158  Vhype = hype[1]/ tanhkd + hype[0];
159 
160  }
161  double fcos = fastcos(phase,fast);
162  double fsin = fastcos(Pihalf_ - phase,fast);
163 
164  double C = omega / kAbs;
165  double Udrift = 0.5*gAbs*amplitude*amplitude/(C*depth);
166  double UH=amplitude*omega*Uhype*fcos;
167  double UV=amplitude*omega*Vhype*fsin;
168  //Setting wave direction
169  for(int ii=0; ii<nDim ; ii++)
170  {
171  U[ii] += (UH-Udrift)*waveDir[ii] + UV*vDir[ii];
172  }
173 
174  }
175 
176 
177 
178 
179 //=======================================================LINEAR - USE above directly================================================================
180 
181 
182 //---------------------------------------------------------NONLINEAR FENTON-------------------------------------------------------------------------
183 
184  inline double __cpp_etaFenton(double x[nDim], double t, double kDir[nDim], double kAbs, double omega,
185  double phi0, double amplitude, int Nf, double* Ycoeff, bool fast)
186 
187 
188  {
189 
190  int ii =0;
191  double HH = 0.;
192  double om = 0.;
193  double kw[3] = {0.,0.,0.};
194  double phi = 0.;
195 
196  for (int nn=0; nn<Nf; nn++)
197  {
198  ii= nn + 1;
199  om = ii*omega;
200  kw[0] = ii*kDir[0];
201  kw[1] = ii*kDir[1];
202  kw[2] = ii*kDir[2];
203  phi = ii*phi0;
204  HH= HH + __cpp_eta_mode(x,t,kw,om,phi,Ycoeff[nn],fast);
205  }
206  return HH/kAbs;
207  }
208 
209  inline void __cpp_uFenton(double* U, double x[nDim],double t,double kDir[nDim],double kAbs,double omega,double phi0,double amplitude,
210  double mwl, double depth, double gAbs, int Nf, double* Bcoeff ,double mV[nDim], double waveDir[nDim], double vDir[nDim], double* tanhF, bool fast)
211 
212 
213  {
214 
215  int ii =0;
216  double om = 0.;
217  double kw[nDim] = {0.,0.,0.};
218  double phi = 0.;
219  double kmode = 0.;
220  double amp = 0.;
221 
222  double sqrtAbs(sqrt(gAbs/kAbs));
223 
224 
225 
226  for ( int nn=0; nn<Nf; nn++)
227  {
228  ii=nn+1;
229  om = ii*omega;
230  kmode = ii*kAbs;
231  kw[0] = ii*kDir[0];
232  kw[1] = ii*kDir[1];
233  kw[2] = ii*kDir[2];
234  phi = ii*phi0;
235  amp = tanhF[nn]*sqrtAbs*Bcoeff[nn]/omega;
236  __cpp_vel_mode_p(U,x, t ,kw, kmode, om, phi, amp, mwl, depth, waveDir, vDir, tanhF[nn],gAbs, fast);
237 
238  }
239 
240  for ( int kk = 0; kk<3; kk++)
241  {
242  U[kk] = U[kk]+mV[kk];
243  }
244 
245 
246 
247 
248  }
249 
250 
251 
252 
253 
254 //---------------------------------------------------------PLANE RANDOM-------------------------------------------------------------------------
255 
256  inline double __cpp_etaRandom(double x[nDim], double t, double* kDir, double* omega, double* phi, double* amplitude, int N, bool fast)
257 
258 
259  {
260 
261  double HH = 0.;
262  double kw[nDim] = {0.,0.,0.};
263  int ii =0;
264 
265  for (int nn=0; nn<N; nn++)
266  {
267  ii = 3*nn;
268  kw[0] = kDir[ii];
269  kw[1] = kDir[ii+1];
270  kw[2] = kDir[ii+2];
271  HH= HH + __cpp_eta_mode(x,t,kw,omega[nn],phi[nn],amplitude[nn], fast);
272  }
273  return HH;
274  }
275 
276  inline void __cpp_uRandom(double * U, double x[nDim],double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double waveDir[nDim], double vDir[nDim], double* tanhF, double gAbs, bool fast )
277 
278 
279  {
280 
281  double kw[nDim] = {0.,0.,0.};
282 
283 
284  int ii =0;
285 
286  for (int nn=0; nn<N; nn++)
287  {
288  ii = 3*nn;
289  kw[0] = kDir[ii];
290  kw[1] = kDir[ii+1];
291  kw[2] = kDir[ii+2];
292  __cpp_vel_mode_p(U,x, t ,kw, kAbs[nn], omega[nn], phi[nn], amplitude[nn], mwl, depth, waveDir, vDir, tanhF[nn], gAbs, fast);
293 
294  }
295 
296 
297 
298 
299 
300  }
301 //---------------------------------------------------------Directional RANDOM / Velocity-------------------------------------------------------------------------
302 
303  inline void __cpp_uDir(double * U, double x[nDim],double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double vDir[nDim], double* tanhF , double gAbs, bool fast)
304 
305 
306  {
307 
308  double kw[nDim] = {0.,0.,0.};
309  double wd[nDim] = {0.,0.,0.};
310 
311  int ii =0;
312 
313  for (int nn=0; nn<N; nn++)
314  {
315  ii = 3*nn;
316  kw[0] = kDir[ii];
317  kw[1] = kDir[ii+1];
318  kw[2] = kDir[ii+2];
319  wd[0] = waveDir[ii];
320  wd[1] = waveDir[ii+1];
321  wd[2] = waveDir[ii+2];
322  __cpp_vel_mode_p(U,x, t ,kw, kAbs[nn], omega[nn], phi[nn], amplitude[nn], mwl, depth, wd, vDir, tanhF[nn], gAbs, fast);
323 
324  }
325 
326 
327 
328  }
329 
330 //---------------------------------------------------------Time series/ Velocity-------------------------------------------------------------------------
331 
332  inline int __cpp_findWindow(double t, double handover, double t0, double Twindow, int Nwindows, double* windows_handover)
333  {
334  double term = 1. - handover;
335  int Nw = 0;
336  if (t-t0 >= term*Twindow)
337  {
338  Nw = std::min(int((t-t0 - term*Twindow)/(Twindow - 2. * handover * Twindow)) + 1, Nwindows-1);
339  if (t-t0 < windows_handover[Nw-1] - t0)
340  {
341  Nw =Nw - 1;
342  }
343  }
344  return Nw;
345  }
346 
347 
348  inline double __cpp_etaDirect(double x[nDim], double x0[nDim], double t, double* kDir, double* omega, double* phi, double* amplitude, int N, bool fast)
349 
350 
351 {
352  double xx[3];
353  xx[0] = x[0] - x0[0];
354  xx[1] = x[1] - x0[1];
355  xx[2] = x[2] - x0[2];
356 
357  return __cpp_etaRandom(xx, t, kDir, omega, phi, amplitude, N, fast);
358 }
359 
360 
361 
362 
363 
364 
365  inline void __cpp_uDirect(double * U, double x[nDim], double x0[nDim], double t, double* kDir, double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double vDir[nDim], double* tanhKd, double gAbs, bool fast )
366 
367 
368 
369  {
370  double xx[3];
371  xx[0] = x[0] - x0[0];
372  xx[1] = x[1] - x0[1];
373  xx[2] = x[2] - x0[2];
374 
375  __cpp_uRandom(U, xx, t, kDir, kAbs, omega, phi, amplitude, mwl, depth, N, waveDir, vDir, tanhKd, gAbs, fast );
376 
377  }
378 
379 
380  inline double __cpp_etaWindow(double x[nDim], double x0[nDim], double t, double* t0, double* kDir, double* omega, double* phi, double* amplitude, int N, int Nw, bool fast)
381 
382 
383 {
384  int Is = Nw*N;
385  double xx[3];
386  xx[0] = x[0] - x0[0];
387  xx[1] = x[1] - x0[1];
388  xx[2] = x[2] - x0[2];
389  t = t-t0[Nw];
390  double HH = 0.;
391  double kw[nDim] = {0.,0.,0.};
392  int ii =0;
393 
394  for (int nn=Is; nn<Is+N; nn++)
395  {
396  ii = 3*nn;
397  kw[0] = kDir[ii];
398  kw[1] = kDir[ii+1];
399  kw[2] = kDir[ii+2];
400  HH= HH + __cpp_eta_mode(xx,t,kw,omega[nn],phi[nn],amplitude[nn], fast);
401  }
402  return HH;
403 
404 
405 }
406 
407 
408 
409  inline void __cpp_uWindow(double* U, double x[nDim], double x0[nDim], double t, double* t0, double* kDir, double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N,int Nw, double* waveDir, double* vDir, double* tanhF, double gAbs , bool fast)
410 
411 
412  {
413  int Is = Nw*N;
414  double xx[3];
415  xx[0] = x[0] - x0[0];
416  xx[1] = x[1] - x0[1];
417  xx[2] = x[2] - x0[2];
418  t = t-t0[Nw];
419 
420  double kw[nDim] = {0.,0.,0.};
421 
422 
423  int ii =0;
424 
425  for (int nn=Is; nn<Is+N; nn++)
426  {
427  ii = 3*nn;
428  kw[0] = kDir[ii];
429  kw[1] = kDir[ii+1];
430  kw[2] = kDir[ii+2];
431  __cpp_vel_mode_p(U, xx, t ,kw, kAbs[nn], omega[nn], phi[nn], amplitude[nn], mwl, depth, waveDir, vDir, tanhF[nn], gAbs, fast);
432 
433  }
434 
435 
436  }
437  //=========================================2nd order correction==============================================
438 
439  inline double __cpp_eta2nd(double x[nDim], double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, bool fast)
440 
441 
442  {
443 
444 
445 
446  double HH = 0.;
447  double kw[nDim] = {0.,0.,0.};
448  int ii =0;
449  double ai_2nd=0.;
450 
451 
452  for (int nn=0; nn<N; nn++)
453  {
454  ii = 3*nn;
455  kw[0] =2.* kDir[ii];
456  kw[1] =2.* kDir[ii+1];
457  kw[2] =2.* kDir[ii+2];
458  ai_2nd = (amplitude[nn]*amplitude[nn] * ki[nn]*(2+3./(sinhKd[nn]*sinhKd[nn]) )/(4.*tanhKd[nn] ));
459  HH= HH + __cpp_eta_mode(x,t,kw,2.*omega[nn],2.*phi[nn],ai_2nd, fast);
460  }
461  return HH;
462  }
463 
464  inline double __cpp_eta_short(double x[nDim], double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, double gAbs, bool fast)
465 
466 
467  {
468 
469 
470 
471  double HH = 0.;
472  double kw[nDim] = {0.,0.,0.};
473  double kw2[nDim] = {0.,0.,0.};
474  int ii =0;
475  int jj =0;
476  double Dp=0.;
477  double Bp=0.;
478  double tanhSum = 0.;
479  double ai =0.;
480  for (int i=0; i<N-1; i++)
481  {
482  ii = 3*i;
483  kw[0] = kDir[ii];
484  kw[1] = kDir[ii+1];
485  kw[2] = kDir[ii+2];
486 
487  for (int j=i+1; j<N; j++)
488  {
489  jj = 3*j;
490  kw2[0] = kDir[jj]+kw[0];
491  kw2[1] = kDir[jj+1]+kw[1];
492  kw2[2] = kDir[jj+2]+kw[2];
493 
494  tanhSum = (tanhKd[i]+tanhKd[j])/(1.+tanhKd[i]*tanhKd[j]);
495 
496  Dp = pow(omega[i]+omega[j],2) - gAbs*(ki[i]+ki[j])*tanhSum;
497  Bp = (pow(omega[i],2)+pow(omega[j],2))/(2*gAbs);
498  Bp = Bp -((omega[i]*omega[j])/(2*gAbs))*(1-1./(tanhKd[i]*tanhKd[j]) )*((pow(omega[i]+omega[j],2) + gAbs*(ki[i]+ki[j])*tanhSum)/Dp);
499  Bp = Bp + ((omega[i]+omega[j])/(2*gAbs*Dp))*((pow(omega[i],3)/pow(sinhKd[i],2)) + (pow(omega[j],3)/pow(sinhKd[j],2)));
500 
501  ai = amplitude[i]*amplitude[j]*Bp;
502  HH= HH + __cpp_eta_mode(x,t,kw2,omega[i]+omega[j],phi[i]+phi[j],ai, fast);
503  }
504  }
505  return HH;
506  }
507 
508  inline double __cpp_eta_long(double x[nDim], double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, double gAbs, bool fast)
509 
510 
511  {
512 
513 
514 
515  double HH = 0.;
516  double kw[nDim] = {0.,0.,0.};
517  double kw2[nDim] = {0.,0.,0.};
518  int ii =0;
519  int jj =0;
520  double Dp=0.;
521  double Bp=0.;
522  double tanhSum = 0.;
523  double ai =0.;
524  for (int i=0; i<N-1; i++)
525  {
526  ii = 3*i;
527  kw[0] = kDir[ii];
528  kw[1] = kDir[ii+1];
529  kw[2] = kDir[ii+2];
530 
531  for (int j=i+1; j<N; j++)
532  {
533  jj = 3*j;
534  kw2[0] = -kDir[jj]+kw[0];
535  kw2[1] = -kDir[jj+1]+kw[1];
536  kw2[2] = -kDir[jj+2]+kw[2];
537 
538  tanhSum = (tanhKd[i]-tanhKd[j])/(1.-tanhKd[i]*tanhKd[j]);
539 
540  Dp = pow(omega[i]-omega[j],2) - gAbs*(ki[i]-ki[j])*tanhSum;
541  Bp = (pow(omega[i],2)+pow(omega[j],2))/(2*gAbs);
542  Bp = Bp + ((omega[i]*omega[j])/(2*gAbs))*(1+1./(tanhKd[i]*tanhKd[j]) )*((pow(omega[i]-omega[j],2) + gAbs*(ki[i]-ki[j])*tanhSum)/Dp);
543  Bp = Bp + ((omega[i]-omega[j])/(2*gAbs*Dp))*((pow(omega[i],3)/pow(sinhKd[i],2)) - (pow(omega[j],3)/pow(sinhKd[j],2)));
544 
545  ai = amplitude[i]*amplitude[j]*Bp;
546  HH= HH + __cpp_eta_mode(x,t,kw2,omega[i]-omega[j],phi[i]-phi[j],ai, fast);
547  }
548  }
549  return HH;
550  }
551 
552 
553 
554 
555 };
556 
557 
558 #endif
proteus::__cpp_vel_mode_p
void __cpp_vel_mode_p(double *U, double x[nDim], double t, double kDir[nDim], double kAbs, double omega, double phi, double amplitude, double mwl, double depth, double waveDir[nDim], double vDir[nDim], double tanhkd, double gAbs, bool fast)
Definition: WaveTools.h:136
proteus::__cpp_uDir
void __cpp_uDir(double *U, double x[nDim], double t, double *kDir, double *kAbs, double *omega, double *phi, double *amplitude, double mwl, double depth, int N, double *waveDir, double vDir[nDim], double *tanhF, double gAbs, bool fast)
Definition: WaveTools.h:303
proteus::Pihalf_
const double Pihalf_
Definition: WaveTools.h:13
proteus::__cpp_eta2nd
double __cpp_eta2nd(double x[nDim], double t, double *kDir, double *ki, double *omega, double *phi, double *amplitude, int N, double *sinhKd, double *tanhKd, bool fast)
Definition: WaveTools.h:439
proteus::Pi03_
const double Pi03_
Definition: WaveTools.h:15
proteus::__cpp_eta_long
double __cpp_eta_long(double x[nDim], double t, double *kDir, double *ki, double *omega, double *phi, double *amplitude, int N, double *sinhKd, double *tanhKd, double gAbs, bool fast)
Definition: WaveTools.h:508
proteus::__cpp_etaWindow
double __cpp_etaWindow(double x[nDim], double x0[nDim], double t, double *t0, double *kDir, double *omega, double *phi, double *amplitude, int N, int Nw, bool fast)
Definition: WaveTools.h:380
proteus::__cpp_uFenton
void __cpp_uFenton(double *U, double x[nDim], double t, double kDir[nDim], double kAbs, double omega, double phi0, double amplitude, double mwl, double depth, double gAbs, int Nf, double *Bcoeff, double mV[nDim], double waveDir[nDim], double vDir[nDim], double *tanhF, bool fast)
Definition: WaveTools.h:209
proteus::Pi2inv_
const double Pi2inv_
Definition: WaveTools.h:12
proteus::fastcos
double fastcos(double phi, bool fast)
Definition: WaveTools.h:46
proteus::Pi07_
const double Pi07_
Definition: WaveTools.h:16
proteus::nDim
const int nDim(3)
min
#define min(a, b)
Definition: jf.h:71
U
Double U
Definition: Headers.h:88
proteus::__cpp_eta_mode
double __cpp_eta_mode(double x[nDim], double t, double kDir[nDim], double omega, double phi, double amplitude, bool fast)
Definition: WaveTools.h:92
proteus::__cpp_findWindow
int __cpp_findWindow(double t, double handover, double t0, double Twindow, int Nwindows, double *windows_handover)
Definition: WaveTools.h:332
proteus::__cpp_uWindow
void __cpp_uWindow(double *U, double x[nDim], double x0[nDim], double t, double *t0, double *kDir, double *kAbs, double *omega, double *phi, double *amplitude, double mwl, double depth, int N, int Nw, double *waveDir, double *vDir, double *tanhF, double gAbs, bool fast)
Definition: WaveTools.h:409
proteus::phi
double phi(const double &g, const double &h, const double &hL, const double &hR, const double &uL, const double &uR)
Definition: SW2DCV.h:62
proteus::__cpp_etaFenton
double __cpp_etaFenton(double x[nDim], double t, double kDir[nDim], double kAbs, double omega, double phi0, double amplitude, int Nf, double *Ycoeff, bool fast)
Definition: WaveTools.h:184
proteus::__cpp_eta_short
double __cpp_eta_short(double x[nDim], double t, double *kDir, double *ki, double *omega, double *phi, double *amplitude, int N, double *sinhKd, double *tanhKd, double gAbs, bool fast)
Definition: WaveTools.h:464
proteus::Pi2_
const double Pi2_
Definition: WaveTools.h:11
proteus::PI_
const double PI_
Definition: WaveTools.h:10
proteus::Pihalfinv_
const double Pihalfinv_
Definition: WaveTools.h:14
proteus
Definition: ADR.h:17
proteus::__cpp_uDirect
void __cpp_uDirect(double *U, double x[nDim], double x0[nDim], double t, double *kDir, double *kAbs, double *omega, double *phi, double *amplitude, double mwl, double depth, int N, double *waveDir, double vDir[nDim], double *tanhKd, double gAbs, bool fast)
Definition: WaveTools.h:365
proteus::Pi17_
const double Pi17_
Definition: WaveTools.h:17
proteus::__cpp_etaDirect
double __cpp_etaDirect(double x[nDim], double x0[nDim], double t, double *kDir, double *omega, double *phi, double *amplitude, int N, bool fast)
Definition: WaveTools.h:348
proteus::__cpp_uRandom
void __cpp_uRandom(double *U, double x[nDim], double t, double *kDir, double *kAbs, double *omega, double *phi, double *amplitude, double mwl, double depth, int N, double waveDir[nDim], double vDir[nDim], double *tanhF, double gAbs, bool fast)
Definition: WaveTools.h:276
proteus::__cpp_etaRandom
double __cpp_etaRandom(double x[nDim], double t, double *kDir, double *omega, double *phi, double *amplitude, int N, bool fast)
Definition: WaveTools.h:256
proteus::fastcosh
void fastcosh(double *hype, double k, double Z, bool fast)
Definition: WaveTools.h:20