zoomy_core.symsolver.vocabulary#
The finite-volume vocabulary of the hyperbolic solver: one Block per mesh
operation, implemented under the same name by every backend. Arrays are
(rows, cells) or (rows, faces), faces meaning all faces in mesh order,
and mesh is always an argument.
Module Contents#
Classes#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As |
|
As |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Global minimum (all ranks). |
|
|
|
Global any (all ranks). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Output effects; |
|
Effects of one preCICE participant. |
|
Run-time checks. |
Functions#
The message of a failed |
API#
- class zoomy_core.symsolver.vocabulary.cells#
Bases:
zoomy_core.symsolver.core.Block(kernel, Q, Qaux, p, time, dt, mesh)-> kernel in every cell, withtime,dtand the cell centre passed when the kernel declares them.
- class zoomy_core.symsolver.vocabulary.faces#
Bases:
zoomy_core.symsolver.core.Block(kernel, QL, QR, AL, AR, p, mesh)-> kernel on every face with its unit normal (owner to neighbour, outward at a boundary).
- class zoomy_core.symsolver.vocabulary.face_aux#
Bases:
zoomy_core.symsolver.core.Block(Qaux, mesh)->(AL, AR), the owner and neighbour aux per face (the inner cell on both sides at a boundary).
- class zoomy_core.symsolver.vocabulary.face_wavespeed#
Bases:
zoomy_core.symsolver.core.Block(kernel, Q, Qaux, p, mesh)-> max|eigenvalue|per face over its two cells.
- class zoomy_core.symsolver.vocabulary.face_inradius#
Bases:
zoomy_core.symsolver.core.Block(mesh)-> per-face cell size: min inradius of the adjacent cells.
- class zoomy_core.symsolver.vocabulary.boundary_states#
Bases:
zoomy_core.symsolver.core.Block(ghost, Q, Qaux, p, time, mesh)->(Qg, Qauxg): the ghost state per boundary face (kernelboundary_ghost_state) and the inner cell’s aux.
- class zoomy_core.symsolver.vocabulary.boundary_ghosts#
Bases:
zoomy_core.symsolver.core.Block(ghost, Q, Qaux, p, time, mesh)-> the ghost per boundary face, asboundary_stateswithout the aux.
- class zoomy_core.symsolver.vocabulary.boundary_traces#
Bases:
zoomy_core.symsolver.core.Block(bc, Q, QL, QR, Qaux, p, time, mesh)->QRholding the outer face statebc(QL)on boundary faces (the partner face’sQLon a periodic seam).
- class zoomy_core.symsolver.vocabulary.pointwise#
Bases:
zoomy_core.symsolver.core.Block(kernel, X, Xaux, p)-> the kernel in every column ofX(cells, faces or boundary faces); no time, step or position.
- class zoomy_core.symsolver.vocabulary.cell_traces#
Bases:
zoomy_core.symsolver.core.Block(Q, mesh)->(QL, QR), the owner’s and neighbour’s cell value per face;QRon a boundary face is a placeholder forboundary_traces.
- class zoomy_core.symsolver.vocabulary.gradient#
Bases:
zoomy_core.symsolver.core.Block(W, Wg, mesh)-> LSQ gradient of every row ofWper cell, boundary faces closed from the ghost valuesWg.(W, Wg, (eta, h), eps, mesh): in rowetaa neighbourkwithW[h, k] <= epsenters celli’s stencil asmin(W[eta, k], W[eta, i])(the hydrostatic extension of the free surface,reconstruction. shore_extension).References
Mavriplis 2003, https://doi.org/10.2514/6.2003-3986
- class zoomy_core.symsolver.vocabulary.minmod#
Bases:
zoomy_core.symsolver.core.Block(rows, W, Wg, G, mesh)-> limiter factors in [0, 1] per row and cell (1 offrows): the largest keeping every face extrapolation within the bounds of the face neighbours and boundary ghostsWg.(rows, W, Wg, G, (eta, h), eps, mesh): the bounds of rowetafrom the neighbour values ofgradient’s shore form.References
Sweby 1984, https://doi.org/10.1137/0721062
- class zoomy_core.symsolver.vocabulary.venkatakrishnan#
Bases:
zoomy_core.symsolver.core.BlockAs
minmod, the smooth Venkatakrishnan factor (eps^2 = h^2).References
Venkatakrishnan 1995, https://doi.org/10.1006/jcph.1995.1084
- class zoomy_core.symsolver.vocabulary.barth_jespersen#
Bases:
zoomy_core.symsolver.core.BlockAs
minmod, the Barth-Jespersen factor.References
Barth, Jespersen 1989, https://doi.org/10.2514/6.1989-366
- class zoomy_core.symsolver.vocabulary.front_cells#
Bases:
zoomy_core.symsolver.core.Block(Q, G, phi, (depth, w), tol, mesh)-> cell mask: the cells whose depthh_f = Q[depth] + phi[depth] G[w] . r_ffalls below-(1/tol - 1) Q[depth]at a facef(Gthe gradients of the reconstruction variables,phitheir limiter factors,r_ffrom the cell centre to the face centre), i.e. whose positivity factorh / (h - min_f h_f)is belowtol.References
Gallardo, Pares, Castro 2007, https://doi.org/10.1016/j.jcp.2007.08.007
- class zoomy_core.symsolver.vocabulary.extrapolate#
Bases:
zoomy_core.symsolver.core.Block(W, G, phi, mesh)->(WL, WR): each cell’sWmoved to the face centre byphi * G;WRon a boundary face is a placeholder forboundary_traces.References
van Leer 1979, https://doi.org/10.1016/0021-9991(79)90145-1
- class zoomy_core.symsolver.vocabulary.divergence#
Bases:
zoomy_core.symsolver.core.Block(Wm, Wp, mesh)-> per cellsum_f |f| Wm / |V|over the faces it owns plus|f| Wp / |V|over the faces it neighbours.
- class zoomy_core.symsolver.vocabulary.edge_source#
Bases:
zoomy_core.symsolver.core.Block(kernel, Q, QL, QR, Qaux, p, mesh)-> per cell the interior nonconservative integral over each of its edges (order >= 2).References
Pares 2006, https://doi.org/10.1137/050628052
- class zoomy_core.symsolver.vocabulary.derivative_aux#
Bases:
zoomy_core.symsolver.core.Block(spec, Q, Qaux, mesh[, Qg, rows])-> Qaux with the derivative rows ofspecrefilled from mesh gradients; withrows, only those states’ derivatives, their boundary faces taken from the ghostsQg.
- class zoomy_core.symsolver.vocabulary.put#
Bases:
zoomy_core.symsolver.core.Block(Q, rows, values)-> Q with the static state rowsrowsreplaced.
- class zoomy_core.symsolver.vocabulary.take#
Bases:
zoomy_core.symsolver.core.Block(Q, rows)-> the static state rowsrowsofQ.
- class zoomy_core.symsolver.vocabulary.zeros#
Bases:
zoomy_core.symsolver.core.Block(n, mesh)-> an(n, cells)array of zeros.
- class zoomy_core.symsolver.vocabulary.diffusion#
Bases:
zoomy_core.symsolver.core.Block(kernel, bc, Q, Qaux, p, time, mesh)-> per cell div(A grad Q) of the diffusion tensorkernel(explicit; RHS sign, A > 0 diffuses), face fluxn.A.grad_f: the two-point flux plus a correction,grad_fthe mean of the two cells’ LSQ gradients with the two-point difference as its part along the cell-to-cell vector (boundary faces: the ghost ofbc, the tangential part from the cell gradient). A cut face (distributed) carries no flux.References
Eymard, Gallouet, Herbin 2000, https://doi.org/10.1016/s1570-8659(00)07005-8
- class zoomy_core.symsolver.vocabulary.diffusion_tpfa#
Bases:
zoomy_core.symsolver.core.Block(kernel, bc, Q, Qaux, p, time, mesh)-> per cell the two-point part ofdiffusion: per facen.A.n (Q_out - Q_in) / d,Athe mean of the two cells’ tensors,Q_outthe BC ghost across a boundary face, the partner cell across a periodic seam.References
Eymard, Gallouet, Herbin 2000, https://doi.org/10.1016/s1570-8659(00)07005-8
- class zoomy_core.symsolver.vocabulary.diffusion_correction#
Bases:
zoomy_core.symsolver.core.Block(kernel, bc, Q, Qaux, p, time, mesh)-> per cell the rest ofdiffusionbeyonddiffusion_tpfa(the tangential and non-orthogonal part of the face flux; zero in 1-D), so thatdiffusion = diffusion_tpfa + diffusion_correction.References
Eymard, Gallouet, Herbin 2000, https://doi.org/10.1016/s1570-8659(00)07005-8
- class zoomy_core.symsolver.vocabulary.implicit_diffusion#
Bases:
zoomy_core.symsolver.core.Block(kernel, bc, Q, Qaux, p, time, dt, mesh)-> one Crank-Nicolson step of the two-point part ofdiffusionfromtimetotime + dt, its correction explicit atQ(deferred correction).References
Crank, Nicolson 1947, https://doi.org/10.1017/s0305004100023197
- class zoomy_core.symsolver.vocabulary.inadmissible#
Bases:
zoomy_core.symsolver.core.Block(kernel, Q, Qaux, p)-> cell mask: an admissibility row < 0 or a non-finite value.
- class zoomy_core.symsolver.vocabulary.clean_round_off#
Bases:
zoomy_core.symsolver.core.Block(Q, rows, tol)->Qwith the entries of the staticrowsin[-tol, 0)set to 0 (round-off below zero of a quantity declared non-negative).
- class zoomy_core.symsolver.vocabulary.halo#
Bases:
zoomy_core.symsolver.core.Block(X, mesh)->Xwith the copies of other ranks’ cells current (serial:X); after every stencil update.
- class zoomy_core.symsolver.vocabulary.minimum#
Bases:
zoomy_core.symsolver.core.Block(a, b)-> elementwise minimum, NaN propagating, for graph-valued arguments (sp.Minwould walk a shared graph as a tree).- is_commutative#
True
- is_extended_real#
True
- class zoomy_core.symsolver.vocabulary.reduce_min#
Bases:
zoomy_core.symsolver.core.BlockGlobal minimum (all ranks).
- class zoomy_core.symsolver.vocabulary.reduce_max#
Bases:
zoomy_core.symsolver.core.Block(X)-> the largest entry (NaN propagates).
- class zoomy_core.symsolver.vocabulary.reduce_any#
Bases:
zoomy_core.symsolver.core.BlockGlobal any (all ranks).
- class zoomy_core.symsolver.vocabulary.select#
Bases:
zoomy_core.symsolver.core.Block(mask, A, B)-> A where mask else B, per cell or per face.
- class zoomy_core.symsolver.vocabulary.coupled_faces#
Bases:
zoomy_core.symsolver.core.Block(mesh)-> face mask of the coupled boundary faces.
- class zoomy_core.symsolver.vocabulary.interface_states#
Bases:
zoomy_core.symsolver.core.Block(Q, mesh)-> states of the cells next to the coupled faces.
- class zoomy_core.symsolver.vocabulary.interface_flux#
Bases:
zoomy_core.symsolver.core.Block(sides, aux, side, Q, Qaux, peer, p, mesh)-> per face this participant’s row of one Riemann problem posed low -> high (row 0 forside = 0), zero off the coupled faces; both sides pose the same problem.
- class zoomy_core.symsolver.vocabulary.lifted_interface_flux#
Bases:
zoomy_core.symsolver.core.Block(sides, aux, n_aux, side, own, peer, rows, p, mesh)-> per face the rowsrowsof this participant’s side of one Riemann problem posed low -> high in the model ofsides(the interface model) on the interface statesown,peer((rows of that model, coupled faces)), the aux rebuilt from each state alone (auxon a zero aux ofn_auxrows;auxFalse: the zero aux); zero off the coupled faces. Both sides pose the same problem.
- class zoomy_core.symsolver.vocabulary.characteristic_ghost#
Bases:
zoomy_core.symsolver.core.Block(A, own, Aown, peer, p, mesh)-> per coupled face the transmission state towards a peer of another model: withA_n = sum_d A(own, Aown)[:, :, d] n_d(Athe quasilinear matrix kernel,nthe outward normal) the characteristicsl_k . qthat enter (lambda_k < 0) frompeer, those that leave fromown;peerwhere the eigenvectors ofA_nare singular,ownwherepeeris all zero (no peer data yet).own,Aown,peerand the result are(rows, coupled faces).
- class zoomy_core.symsolver.vocabulary.ghost_flux#
Bases:
zoomy_core.symsolver.core.Block(sides, aux, own, Aown, ghost, p, mesh)-> per face the own cell’s row of the Riemann problem(own, ghost)posed along the outward normal of the coupled faces, zero elsewhere;Aownon the own side,aux(ghost)on the other (the pointwise aux formula on a zero aux;auxFalse:Aown).own,Aown,ghostare(rows, coupled faces).
- class zoomy_core.symsolver.vocabulary.replace_row#
Bases:
zoomy_core.symsolver.core.Block(A, i, B)->Awith rowitaken fromB.
- class zoomy_core.symsolver.vocabulary.coupled_ghosts#
Bases:
zoomy_core.symsolver.core.Block(Qg, own, face, mesh)-> the boundary ghostsQgwith the coupled faces’ replaced by2 face - own(own,face:(rows, coupled faces)).
- class zoomy_core.symsolver.vocabulary.overlap_cells#
Bases:
zoomy_core.symsolver.core.Block(mesh)-> cell mask of the overlap: the cells across the coupled interface that hold the peer’s values.
- class zoomy_core.symsolver.vocabulary.overlap_states#
Bases:
zoomy_core.symsolver.core.Block(Q, mesh)->(rows, mirror cells): the own cells the peer holds as its overlap.
- class zoomy_core.symsolver.vocabulary.overlap_fill#
Bases:
zoomy_core.symsolver.core.Block(Q, peer, mesh)->Qwith the overlap cells’ columns frompeer(rows, overlap cells).
- class zoomy_core.symsolver.vocabulary.io#
Output effects;
save_state/load_state: the restart pair of the march state.- write#
‘Effect(…)’
- save_state#
‘Effect(…)’
- load_state#
‘Effect(…)’
- class zoomy_core.symsolver.vocabulary.couple#
Effects of one preCICE participant.
References
Chourdakis et al. 2022, https://doi.org/10.12688/openreseurope.14445.2
- init#
‘Effect(…)’
- max_dt#
‘Effect(…)’
- read#
‘Effect(…)’
- write#
‘Effect(…)’
- advance#
‘Effect(…)’
- window_complete#
‘Effect(…)’
- read_round_trip#
‘Effect(…)’
- read_iterate#
‘Effect(…)’
- repeat#
‘Effect(…)’
- zoomy_core.symsolver.vocabulary.march_error(time, time_end, dt, n_step, q_max)#
The message of a failed
check.march, or None: the march stopped beforetime_end(a step that does not advance the time) or ended with a non-finite state (q_max = max |Q|). The C++ runtimes print the same text (rt_common.H).