#include <velocity_grid.hpp>
|
| VelocityGrid ()=default |
|
| VelocityGrid (NLReader::NamelistReader &nlr) |
|
KOKKOS_INLINE_FUNCTION double | vpar_n (int ivz) const |
| Returns the parallel velocity corresponding to a given grid index. More...
|
|
KOKKOS_INLINE_FUNCTION double | vperp_n (int ivr) const |
| Returns the perpendicular velocity corresponding to a given grid index. More...
|
|
KOKKOS_INLINE_FUNCTION double | mu_vol_fac (int ivr) const |
| Returns a volume factor to account for edge effects in the perpendicular velocity grid. More...
|
|
KOKKOS_INLINE_FUNCTION double | vp_vol_fac (int ivz) const |
| Returns a volume factor to account for edge effects in the parallel velocity grid. More...
|
|
KOKKOS_INLINE_FUNCTION VGridWeights | get_weights (double smu, double vp) const |
| Determines velocity grid weights based on input values of smu and vp . More...
|
|
KOKKOS_INLINE_FUNCTION void | weight_by_inv_dsmu (VGridWeights &vgrid_wts) const |
| Adjusts the perpendicular velocity grid weights by dividing by the dsmu value, considering edge effects. More...
|
|
KOKKOS_INLINE_FUNCTION void | weight_by_vol (double vol, VGridWeights &vgrid_wts) const |
| Adjusts velocity grid weights by multiplying with a volume factor, considering edge effects. More...
|
|
KOKKOS_INLINE_FUNCTION void | weight_by_inv_vol (double inv_vol, VGridWeights &vgrid_wts) const |
| Adjusts velocity grid weights by dividing by the inverse volume factor, considering edge effects. More...
|
|
VelocityGrid::VelocityGrid |
( |
| ) |
|
|
default |
KOKKOS_INLINE_FUNCTION VGridWeights VelocityGrid::get_weights |
( |
double |
smu, |
|
|
double |
vp |
|
) |
| const |
|
inline |
Determines velocity grid weights based on input values of smu
and vp
.
This function computes the linear weights for both the perpendicular velocity (smu
) and the parallel velocity (vp
) based on the provided input values. It calculates the appropriate weights and handles edge cases where the indices fall outside the valid grid range.
- Parameters
-
smu | The perpendicular velocity value used to compute the weight for the perpendicular direction. |
vp | The parallel velocity value used to compute the weight for the parallel direction. |
- Returns
- A
VGridWeights
object containing the calculated weights for the velocity grid, or an invalid VGridWeights
if the indices are out of bounds.
KOKKOS_INLINE_FUNCTION double VelocityGrid::mu_vol_fac |
( |
int |
ivr | ) |
const |
|
inline |
Returns a volume factor to account for edge effects in the perpendicular velocity grid.
This function returns a factor to adjust the volume at the boundaries (edges) of the perpendicular velocity grid. The factor is set to 0.5 at the boundaries, and 1.0 elsewhere.
- Parameters
-
ivr | The grid index for perpendicular velocity. |
- Returns
- The volume factor for the given grid index.
KOKKOS_INLINE_FUNCTION double VelocityGrid::vp_vol_fac |
( |
int |
ivz | ) |
const |
|
inline |
Returns a volume factor to account for edge effects in the parallel velocity grid.
This function returns a factor to adjust the volume at the boundaries (edges) of the parallel velocity grid. The factor is set to 0.5 at the boundaries, and 1.0 elsewhere.
- Parameters
-
ivz | The grid index for parallel velocity. |
- Returns
- The volume factor for the given grid index.
KOKKOS_INLINE_FUNCTION double VelocityGrid::vpar_n |
( |
int |
ivz | ) |
const |
|
inline |
Returns the parallel velocity corresponding to a given grid index.
Given a grid index in the parallel velocity direction, this function computes the corresponding velocity by subtracting the base velocity and multiplying by the velocity step size.
- Parameters
-
ivz | The grid index for parallel velocity. |
- Returns
- The parallel velocity corresponding to the grid index.
KOKKOS_INLINE_FUNCTION double VelocityGrid::vperp_n |
( |
int |
ivr | ) |
const |
|
inline |
Returns the perpendicular velocity corresponding to a given grid index.
Given a grid index in the perpendicular velocity direction, this function computes the corresponding velocity by multiplying the grid index by the perpendicular velocity step size.
- Parameters
-
ivr | The grid index for perpendicular velocity. |
- Returns
- The perpendicular velocity corresponding to the grid index.
KOKKOS_INLINE_FUNCTION void VelocityGrid::weight_by_inv_dsmu |
( |
VGridWeights & |
vgrid_wts | ) |
const |
|
inline |
Adjusts the perpendicular velocity grid weights by dividing by the dsmu
value, considering edge effects.
This function modifies the perpendicular velocity grid weights by dividing them by dsmu
and adjusts the values at the edges based on predefined factors determined by the velocity interpolation order (here: linear –> 1/3). The edges are weighted by inv_mu0_factor
for the first index and a similar factor for the last index.
- Parameters
-
KOKKOS_INLINE_FUNCTION void VelocityGrid::weight_by_inv_vol |
( |
double |
inv_vol, |
|
|
VGridWeights & |
vgrid_wts |
|
) |
| const |
|
inline |
Adjusts velocity grid weights by dividing by the inverse volume factor, considering edge effects.
This function divides the grid weights by an inverse volume factor (inv_vol
), with special handling for grid edges. At the edges, the weights are adjusted by multiplying with a factor of 2.0 for the boundary grid points, while for interior points, the factor is 1.0.
- Parameters
-
inv_vol | The inverse volume factor to divide the weights by. |
vgrid_wts | The VGridWeights object containing the current velocity grid weights to be adjusted. |
KOKKOS_INLINE_FUNCTION void VelocityGrid::weight_by_vol |
( |
double |
vol, |
|
|
VGridWeights & |
vgrid_wts |
|
) |
| const |
|
inline |
Adjusts velocity grid weights by multiplying with a volume factor, considering edge effects.
This function multiplies the grid weights by the specified volume (vol
), taking into account edge cases where the grid indices lie on the boundaries. The volume is adjusted using different factors at the edges to account for the smaller volume associated with edge grid points.
- Parameters
-
vol | The volume factor to multiply the weights by. |
vgrid_wts | The VGridWeights object containing the current velocity grid weights to be adjusted. |
double VelocityGrid::dsmu |
grid spacing in parallel velocity
int VelocityGrid::element_order |
velocity grid finite element order (0 = nearest neighbor), (1 = linear), (2 = quadratic), (3 = cubic), ....
double VelocityGrid::inv_mu0_factor = 1.0/3.0 |
Set value of lowest mu in grid –> 1/mu0_factor.
n points in mu (not including zero)
n points in parallel velocity (not including zero)
full grid size (including zero)
full grid size (including negative and zero)
bool VelocityGrid::pseudo_inv_on |
whether pseudo-inverse interpolation is used in velocity space
double VelocityGrid::smu_max |
double VelocityGrid::vp_max |
The documentation for this struct was generated from the following file: