calculus

moment_kinetics.calculus.elementwise_derivative!Function
elementwise_derivative!(coord, f, adv_fac, spectral)
elementwise_derivative!(coord, f, spectral)

Generic function for element-by-element derivatives

First signature, with adv_fac, calculates an upwind derivative, the second signature calculates a derivative without upwinding information.

Result is stored in coord.scratch_2d.

source
moment_kinetics.calculus.reconcile_element_boundaries_upwind!Method

if at the boundary point within the element, must carefully choose which value of df to use; this is because df is multi-valued at the overlapping point at the boundary between neighboring elements. here we choose to use the value of df from the upwind element.

source