|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "output.h"Go to the source code of this file.
Data Structures | |
| struct | timing |
| struct | norm |
| struct | stats |
| The statsf() function returns the minimum, maximum, volume sum, standard deviation and volume for field f. More... | |
Functions | |
| void | update_perf () |
| Performance statistics are gathered by this function, which is typically called by the run() loop. | |
| timing | timer_timing (timer t, int i, size_t tnc, double *mpi) |
| Given a timer, iteration count i, total number of cells tnc and array of MPI timings mpi (with a size equal to the number of processes), this function returns the statistics above. | |
| void | timer_print (timer t, int i, size_t tnc) |
| This function writes timing statistics on standard output. | |
| norm | normf (scalar f) |
| stats | statsf (scalar f) |
| static double | generic_limiter (double r, double beta) |
| double | minmod (double s0, double s1, double s2) |
| double | superbee (double s0, double s1, double s2) |
| double | sweby (double s0, double s1, double s2) |
| double | minmod2 (double s0, double s1, double s2) |
| void | gradients (scalar *f, vector *g) |
| Given a list of scalar fields f, this function fills the gradient fields g with the corresponding gradients. | |
| void | vorticity (const vector u, scalar omega) |
| double | change (scalar s, scalar sn) |
| Given two scalar fields s and sn this function returns the maximum of their absolute difference. | |
| scalar | lookup_field (const char *name) |
| These functions return the scalar/vector fields called name, or -1 if they don't exist. | |
| vector | lookup_vector (const char *name) |
| macro | foreach_segment (coord S[2], coord p[2], Reduce reductions=None) |
| The macro below traverses the set of sub-segments intersecting the mesh and spanning the [A:B] segment. | |
| void | fields_stats (scalar *list=all) |
| This function returns a summary of the currently-defined fields. | |
Variables | ||
| double | DT = HUGE [0,1] | |
| double | CFL = 0.5 [0] | |
| struct { | ||
| long nc | ||
| long tnc | ||
| double t | ||
| double tp | ||
| double speed | ||
| double ispeed | ||
| timer gt | ||
| } | perf = {0} | |
| Performance statistics are stored in this structure. | ||
| double | theta = 1.3 [0] | |
| This is the generalised minmod limiter. | ||
The macro below traverses the set of sub-segments intersecting the mesh and spanning the [A:B] segment.
The pair of coordinates defining the sub-segment contained in each cell are defined by p[0] and p[1].
Definition at line 349 of file utils.h.
References _i, a, alpha, clamp(), dimension, p, reductions, S, sq(), t, vector::x, x, coord::x, vector::y, and y.
Referenced by segment_flux().
Given three values, these slope limiters return the corresponding slope-limited gradient.
Definition at line 197 of file utils.h.
References beta, max, min, and x.
Referenced by minmod(), superbee(), and sweby().
Given a list of scalar fields f, this function fills the gradient fields g with the corresponding gradients.
If the gradient attribute of a field is set (typically to one of the limiting functions above), it is used to compute the gradient, otherwise simple centered differencing is used.
Definition at line 247 of file utils.h.
References _i, assert, dimension, f, fs, g, list_len(), s, v, vectors_len(), vector::x, and x.
Referenced by tracer_fluxes(), update_conservation(), and update_saint_venant().
These functions return the scalar/vector fields called name, or -1 if they don't exist.
Definition at line 321 of file utils.h.
Referenced by assemble_node(), and slave_interpolate().
Definition at line 204 of file utils.h.
References generic_limiter(), and x.
Definition at line 208 of file utils.h.
References generic_limiter(), and x.
Definition at line 212 of file utils.h.
References generic_limiter(), and x.
This function writes timing statistics on standard output.
Definition at line 110 of file utils.h.
References datasize, fflush(), glFinish, GRIDNAME, i, npe, s, t, timer_timing(), tnc, and x.
Referenced by run(), and run().
Given a timer, iteration count i, total number of cells tnc and array of MPI timings mpi (with a size equal to the number of processes), this function returns the statistics above.
Definition at line 64 of file utils.h.
References i, mpi, n, npe, s, t, timer_elapsed(), tnc, and x.
Referenced by timer_print().
| void update_perf | ( | ) |
Performance statistics are gathered by this function, which is typically called by the run() loop.
Definition at line 34 of file utils.h.
References grid, Grid::n, perf, timer_elapsed(), and Grid::tn.
Referenced by run(), and run().
Given a velocity field \(\mathbf{u}\), this function fills a scalar field \(\omega\) with the vorticity field
\[ \omega = \partial_x u_y - \partial_y u_x \]
To properly take the metric into account, \(\omega\) is computed as an average over the (surface) element, which is easily obtained as the circulation of \(\mathbf{u}\) along the boundary of the element. Using the definitions of the metric factors fm and cm, this gives the expression below.
Definition at line 290 of file utils.h.
References _i, cm, fm, omega, SEPS, u, vector::x, x, and vector::y.
| double CFL = 0.5 [0] |
Definition at line 10 of file utils.h.
Referenced by advect(), event_defaults(), event_face_fields(), event_stability(), hllc(), kinetic(), kurganov(), riemann(), timestep(), and timestep().
The default maximum timestep and CFL number.
Definition at line 10 of file utils.h.
Referenced by event_init(), event_velocity(), run(), and timestep().
| long nc |
Definition at line 17 of file utils.h.
Referenced by args(), embed_fraction_refine(), fine(), for(), and fraction_refine().
| struct { ... } perf |
Performance statistics are stored in this structure.
Referenced by event_perfs(), event_runtime(), run(), run(), and update_perf().
| double t |
Definition at line 21 of file utils.h.
Referenced by fields_stats(), foreach_segment(), timer_print(), and timer_timing().
| double theta = 1.3 [0] |
This is the generalised minmod limiter.
The \(\theta\) global variable can be used to tune the limiting ( \(\theta=1\) gives minmod, the most dissipative limiter and \(\theta=2\) gives superbee, the least dissipative).
Definition at line 223 of file utils.h.
Referenced by eigenvalues(), event_defaults(), event_tracer_diffusion(), if(), minmod2(), and VARIABLES().
| long tnc |
Definition at line 19 of file utils.h.
Referenced by timer_print(), and timer_timing().
| double tp |
Definition at line 21 of file utils.h.
Referenced by poisson_thermal(), relax_thermal(), and residual_thermal().