Spatial target resolution for the field-statistics pipeline. More...
Go to the source code of this file.
Macros | |
| #define | __FUNCT__ "SpatialTargetPlanCreate" |
| #define | __FUNCT__ "SpatialTargetPlanGlobalPointCount" |
Functions | |
| PetscErrorCode | PicurvLayoutDimensionIsNodeLike (FieldLayout layout, PetscInt dim, PetscBool *node_like) |
| Implementation of PicurvLayoutDimensionIsNodeLike(). | |
| static void | ResolveLayoutSpan (PetscBool node_like, PetscBool periodic, PetscInt size, PetscInt *lo, PetscInt *hi_exclusive) |
| Internal helper: resolves the layout-valid index span for one dimension. | |
| PetscErrorCode | SpatialTargetPlanCreate (UserCtx *user, FieldId field_id, PicurvStatisticsMask mask, SpatialTargetPlan *plan) |
| Implementation of SpatialTargetPlanCreate(). | |
| PetscErrorCode | SpatialTargetPlanLocalPointCount (const SpatialTargetPlan *plan, PetscInt *count) |
| Implementation of SpatialTargetPlanLocalPointCount(). | |
| PetscErrorCode | SpatialTargetPlanGlobalPointCount (const SpatialTargetPlan *plan, MPI_Comm comm, PetscInt *count) |
| Implementation of SpatialTargetPlanGlobalPointCount(). | |
| PetscBool | SpatialTargetPlanMaskAllows (const SpatialTargetPlan *plan, PetscReal nvert_value) |
| Implementation of SpatialTargetPlanMaskAllows(). | |
| static PetscInt | SpatialAverageSlot (const PetscBool average_direction[3], const PetscInt retained_extent[3], PetscInt i, PetscInt j, PetscInt k) |
| Flattens the retained global indices of one point into a reduction slot. | |
| PetscErrorCode | PicurvSpatialRatioAverage (UserCtx *user, const SpatialTargetPlan *plan, Vec numerator, Vec denominator, Vec inclusion, const PetscBool average_direction[3], MPI_Comm comm, Vec ratio, PetscReal *scalar) |
| Implementation of PicurvSpatialRatioAverage(). | |
Spatial target resolution for the field-statistics pipeline.
Full API contract is documented with the declarations in include/statistics_target.h.
Definition in file statistics_target.c.
| #define __FUNCT__ "SpatialTargetPlanCreate" |
Definition at line 74 of file statistics_target.c.
| #define __FUNCT__ "SpatialTargetPlanGlobalPointCount" |
Definition at line 74 of file statistics_target.c.
| PetscErrorCode PicurvLayoutDimensionIsNodeLike | ( | FieldLayout | layout, |
| PetscInt | dim, | ||
| PetscBool * | node_like | ||
| ) |
Implementation of PicurvLayoutDimensionIsNodeLike().
Reports whether a layout is node-like in one dimension.
Definition at line 16 of file statistics_target.c.
|
static |
Internal helper: resolves the layout-valid index span for one dimension.
Local to this translation unit.
The DMDA carries one extra high-side slot beyond the physical grid, and the solver's shifted convention places boundary/dummy values at index zero. Under periodicity the repair algorithms in Boundaries.c write index 0 and index size-1 from the opposite side, so both are dependent duplicates and the independent span starts at one in every layout.
Definition at line 62 of file statistics_target.c.
| PetscErrorCode SpatialTargetPlanCreate | ( | UserCtx * | user, |
| FieldId | field_id, | ||
| PicurvStatisticsMask | mask, | ||
| SpatialTargetPlan * | plan | ||
| ) |
Implementation of SpatialTargetPlanCreate().
Resolves the iteration domain for one field on one block.
Definition at line 79 of file statistics_target.c.
| PetscErrorCode SpatialTargetPlanLocalPointCount | ( | const SpatialTargetPlan * | plan, |
| PetscInt * | count | ||
| ) |
Implementation of SpatialTargetPlanLocalPointCount().
Counts the points this rank contributes.
Definition at line 145 of file statistics_target.c.
| PetscErrorCode SpatialTargetPlanGlobalPointCount | ( | const SpatialTargetPlan * | plan, |
| MPI_Comm | comm, | ||
| PetscInt * | count | ||
| ) |
Implementation of SpatialTargetPlanGlobalPointCount().
Counts the points contributed across a communicator.
Definition at line 167 of file statistics_target.c.
| PetscBool SpatialTargetPlanMaskAllows | ( | const SpatialTargetPlan * | plan, |
| PetscReal | nvert_value | ||
| ) |
Implementation of SpatialTargetPlanMaskAllows().
Reports whether a point passes the plan's mask.
Definition at line 185 of file statistics_target.c.
|
static |
Flattens the retained global indices of one point into a reduction slot.
A direction being averaged over collapses to a single entry, so the buffer is indexed only by the directions left out.
Definition at line 197 of file statistics_target.c.
| PetscErrorCode PicurvSpatialRatioAverage | ( | UserCtx * | user, |
| const SpatialTargetPlan * | plan, | ||
| Vec | numerator, | ||
| Vec | denominator, | ||
| Vec | inclusion, | ||
| const PetscBool | average_direction[3], | ||
| MPI_Comm | comm, | ||
| Vec | ratio, | ||
| PetscReal * | scalar | ||
| ) |
Implementation of PicurvSpatialRatioAverage().
Averages two fields over a target domain and divides the results.
Definition at line 210 of file statistics_target.c.