Skip to content

delnflux

DelnFlux

Fortran name is deln_flux The test class is DelnFlux

This class computes the fluxes for damping and also applies them.

__call__(q, fx, fy, d2=None, mass=None)

Del-n damping for fluxes, where n = 2 * nord + 2 Args: q: Field for which to calculate damped fluxes (in) fx: x-flux on A-grid (inout) fy: y-flux on A-grid (inout) d2: A damped copy of the q field (in) mass: Mass to weight the diffusive flux by (in)

__init__(stencil_factory, quantity_factory, damping_coefficients, rarea, nord_col, damp_c)

nord sets the order of damping to apply: nord = 0: del-2 nord = 1: del-4 nord = 2: del-6

nord and damp_c define the damping coefficient used in DelnFluxNoSG

DelnFluxNoSG

This contains the mechanics of del6_vt and some of deln_flux from the Fortran code, since they are very similar routines. The test class is Del6VtFlux

SG stands for signsg

This class only computes damping fluxes, and does not apply them.

__call__(q, fx2, fy2, damp_c, d2, mass=None)

Computes flux fields which would apply del-n damping to q, where n is set by nord.

Can compute diffusion at 2nd, 4th, 6th-order but expresses it as a flux so that it's conservative. Doesn't apply those fluxes in this object.

Parameters:

Name Type Description Default
q in

Field for which to calculate damping fluxes

required
fx2 out

x-flux on A grid to apply damping to q

required
fy2 out

y-flux on A grid to apply damping to q

required
damp_c in

damping coefficient for q

required
d2 out

higher-order damped version of q

required
mass unused

if given, apply d2 damping (does not use this as input)

None

__init__(stencil_factory, damping_coefficients, rarea, nord, nk=None)

nord sets the order of damping to apply: nord = 0: del-2 nord = 1: del-4 nord = 2: del-6

copy_corners_x_nord(q_in, q_out, nord, current_nord)

Parameters:

Name Type Description Default
q_in in
required
q_out out
required

copy_corners_y_nord(q_in, q_out, nord, current_nord)

Parameters:

Name Type Description Default
q_in in
required
q_out out
required

copy_stencil_interval(q_in, q_out, nord)

Parameters:

Name Type Description Default
q_in in
required
q_out out
required

d2_damp_interval(q, d2, damp, nord)

q (in): d2 (out): damp (in):

fx_calc_stencil_nord(q, del6_v, fx, nord)

Parameters:

Name Type Description Default
q in
required
del6_v in
required
fx out
required

fy_calc_stencil_nord(q, del6_u, fy, nord)

Parameters:

Name Type Description Default
q in
required
del6_u in
required
fy out
required