125extern PetscErrorCode
VolumeFlux(
UserCtx *user, PetscReal *ibm_Flux, PetscReal *ibm_Area, PetscInt flg);
135extern PetscErrorCode
VolumeFlux_rev(
UserCtx *user, PetscReal *ibm_Flux, PetscReal *ibm_Area, PetscInt flg);
PetscErrorCode PoissonNullSpaceFunction(MatNullSpace nullsp, Vec X, void *ctx)
The callback function for PETSc's MatNullSpace object.
PetscErrorCode PoissonLHSNew(UserCtx *user)
Assembles the Left-Hand-Side (LHS) matrix (Laplacian operator) for the Poisson equation on a single g...
PetscErrorCode Projection(UserCtx *user)
Corrects the contravariant velocity field Ucont to be divergence-free using the gradient of the press...
PetscErrorCode VolumeFlux_rev(UserCtx *user, PetscReal *ibm_Flux, PetscReal *ibm_Area, PetscInt flg)
A specialized version of VolumeFlux, likely for reversed normals.
PetscErrorCode MyRestriction(Mat A, Vec X, Vec F)
The callback function for the multigrid restriction operator (MatShell).
PetscErrorCode UpdatePressure(UserCtx *user)
Updates the pressure field P with the pressure correction Phi computed by the Poisson solver.
PetscErrorCode VolumeFlux(UserCtx *user, PetscReal *ibm_Flux, PetscReal *ibm_Area, PetscInt flg)
Calculates the net flux across the immersed boundary surface.
PetscErrorCode PoissonRHS(UserCtx *user, Vec B)
Computes the Right-Hand-Side (RHS) of the Poisson equation, which is the divergence of the intermedia...
PetscErrorCode MyInterpolation(Mat A, Vec X, Vec F)
The callback function for the multigrid interpolation operator (MatShell).
PetscErrorCode PoissonSolver_MG(UserMG *usermg)
Solves the pressure-Poisson equation using a geometric multigrid method.
Main header file for a complex fluid dynamics solver.
User-defined context containing data specific to a single computational grid level.
User-level context for managing the entire multigrid hierarchy.