calculus
moment_kinetics.calculus
— Modulemoment_kinetics.calculus.derivative!
— Methodderivative!(df, f, coord, spectral)
Non-upwinding derivative.
moment_kinetics.calculus.derivative!
— Methodderivative!(df, f, coord, adv_fac, spectral)
Upwinding derivative.
moment_kinetics.calculus.derivative_elements_to_full_grid!
— Methodmoment_kinetics.calculus.derivative_elements_to_full_grid!
— Methodmoment_kinetics.calculus.elements_to_full_grid_interior_pts!
— Methodmaps the derivative at points away from element boundaries from the grid/element representation to the full grid representation
moment_kinetics.calculus.elementwise_derivative!
— Functionelementwise_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.
moment_kinetics.calculus.integral
— MethodComputes the integral of the 3D integrand, using the input wgts
moment_kinetics.calculus.integral
— MethodComputes the integral of the integrand multiplied by v^n, using the input wgts
moment_kinetics.calculus.integral
— MethodComputes the integral of the 2D integrand, using the input wgts
moment_kinetics.calculus.integral
— MethodComputes the integral of the integrand multiplied by v, using the input wgts
moment_kinetics.calculus.integral
— MethodComputes the integral of the integrand, using the input wgts
moment_kinetics.calculus.mass_matrix_solve!
— Functionmass_matrix_solve!(f, b, spectral::weak_discretization_info)
Solve
\[M.f = b\]
for $a$, where $M$ is the mass matrix of a weak-form finite element method and $b$ is an input.
moment_kinetics.calculus.reconcile_element_boundaries_upwind!
— Methodif 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.