|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
Go to the source code of this file.
Functions | |
| static double | de (int n, double *ha, double *hx, double **M) |
| void | harmonic_decomposition (scalar s, double t, double *omega, scalar e={-1}) |
| void | event_cleanup (void) |
| Event: cleanup (t = end) | |
Variables | |
| attribute | |
Event: cleanup (t = end)
Definition at line 189 of file harmonic.h.
References free(), matrix_free(), s, x, and Z.
Definition at line 42 of file harmonic.h.
| attribute |
The harmonic_decomposition() function performs a continuous, least-square fit of the coefficients \(Z\) and $(a_i,b_i)$ of the harmonic fonction
\[ Z + \sum_i a_i \cos(\omega_i t) + b_i \sin(\omega_i t) \]
to the scalar field s, with the \(\omega_i\) given as input.
If the optional argument e is given, it is used to store the residual (i.e. the standard deviation) of the fit.
Definition at line 17 of file harmonic.h.