File gyro_average.cxx#

Functions

Field3D gyroTaylor0(const Field3D &f, const Field3D &rho)#

Gyro-average using Taylor series approximation

\f$ \Gamma(f) = f + \rho^2 \nabla_\perp^2(f)\f$
Note: Faster, but less robust than Pade approximations

Parameters:
  • f[in] The field to gyro-average

  • rho[in] Gyro-radius

Field3D gyroPade0(const Field3D &f, BoutReal rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade0(const Field3D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade0(const Field3D &f, const Field3D &rho, int inner_boundary_flags, int outer_boundary_flags)#

Gyro-average using Pade approximation

\f$ \Gamma_0 = (1 - \rho^2 \nabla_\perp^2)g = f\f$
NOTE: Uses Z average of rho for efficient inversion

Parameters:
  • f[in] The field to gyro-average

  • rho[in] Gyro-radius

  • inner_boundary_flags[in] Flags for the inner boundary to be passed to the Laplacian inversion operator

  • outer_boundary_flags[in] Flags for the outer boundary to be passed to the Laplacian inversion operator

Field3D gyroPade1(const Field3D &f, BoutReal rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade1(const Field3D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade1(const Field3D &f, const Field3D &rho, int inner_boundary_flags, int outer_boundary_flags)#

Pade approximation \(Gamma_1 = (1 - \frac{1}{2} \rho^2 \nabla_\perp^2)g = f\)

Note: Have to use Z average of rho for efficient inversion

Parameters:
  • f[in] The field to gyro-average

  • rho[in] Gyro-radius

  • inner_boundary_flags[in] Flags for the inner boundary to be passed to the Laplacian inversion operator

  • outer_boundary_flags[in] Flags for the outer boundary to be passed to the Laplacian inversion operator

Field2D gyroPade1(const Field2D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade2(const Field3D &f, BoutReal rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade2(const Field3D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)#
Field3D gyroPade2(const Field3D &f, const Field3D &rho, int inner_boundary_flags, int outer_boundary_flags)#

Pade approximation

\[ \Gamma_2(f) = \frac{1}{2}\rho^2 \nabla_\perp^2 ( 1 - \frac{1}{2} \rho^2 \nabla_\perp^2)^{-1}\Gamma_1(f) \]

Note: Have to use Z average of rho for efficient inversion

Parameters:
  • f[in] The field to gyro-average

  • [in – for the inner boundary] rho Gyro-radius

  • inner_boundary_flags[in] Flags for the inner boundary to be passed to Laplacian inversion operator

  • outer_boundary_flags[in] Flags for the outer boundary to be passed to Laplacian inversion operator