PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
postprocessing_kernels.h
Go to the documentation of this file.
1#ifndef POSTPROCESSING_KERNELS_H
2#define POSTPROCESSING_KERNELS_H
3
4#include "variables.h"
5#include "logging.h"
6#include "io.h" // For the UpdateLocalGhosts function prototype
7
8// Function prototypes for post-processing kernels
9PetscErrorCode ComputeNodalAverage(UserCtx* user, const char* in_field_name, const char* out_field_name);
10PetscErrorCode ComputeQCriterion(UserCtx* user);
11PetscErrorCode NormalizeRelativeField(UserCtx* user, const char* relative_field_name);
12
13// Add more post-processing kernel prototypes as needed
14
15// ===========================================================================
16// Particle Post-Processing Kernels
17// ===========================================================================
18
19/**
20 * @brief Computes the specific kinetic energy (KE per unit mass) for each particle.
21 *
22 * This kernel calculates SKE = 0.5 * |velocity|^2. It requires that the
23 * velocity field exists and will populate the specific kinetic energy field.
24 * The output field must be registered before this kernel is called.
25 *
26 * @param user The UserCtx containing the DMSwarm.
27 * @param velocity_field The name of the input vector field for particle velocity.
28 * @param ske_field The name of the output scalar field to store specific KE.
29 * @return PetscErrorCode
30 */
31PetscErrorCode ComputeSpecificKE(UserCtx* user, const char* velocity_field, const char* ske_field);
32
33#endif // POSTPROCESSING_KERNELS_H
Public interface for data input/output routines.
Logging utilities and macros for PETSc-based applications.
PetscErrorCode ComputeQCriterion(UserCtx *user)
Computes the Q-Criterion, a scalar value identifying vortex cores.
PetscErrorCode ComputeSpecificKE(UserCtx *user, const char *velocity_field, const char *ske_field)
Computes the specific kinetic energy (KE per unit mass) for each particle.
PetscErrorCode NormalizeRelativeField(UserCtx *user, const char *relative_field_name)
Normalizes a relative field by subtracting a reference value.
PetscErrorCode ComputeNodalAverage(UserCtx *user, const char *in_field_name, const char *out_field_name)
Computes node-centered data by averaging 8 surrounding cell-centered values, exactly replicating the ...
Main header file for a complex fluid dynamics solver.
User-defined context containing data specific to a single computational grid level.
Definition variables.h:630