#include "BC_Handlers.h"Go to the source code of this file.
Data Structures | |
| struct | InletConstantData |
| Private data structure for the Constant Velocity Inlet handler. More... | |
| struct | InletParabolicData |
| Private data structure for the Parabolic Velocity Inlet handler. More... | |
| struct | InletProfileFileData |
| struct | DrivenFluxData |
| Private data structure shared by both periodic driven-flux handlers. More... | |
Macros | |
| #define | __FUNCT__ "Validate_DrivenFlowConfiguration" |
| #define | __FUNCT__ "Create_WallNoSlip" |
| #define | __FUNCT__ "Apply_WallNoSlip" |
| #define | __FUNCT__ "Create_InletConstantVelocity" |
| #define | __FUNCT__ "Initialize_InletConstantVelocity" |
| #define | __FUNCT__ "PreStep_InletConstantVelocity" |
| #define | __FUNCT__ "PostStep_InletConstantVelocity" |
| #define | __FUNCT__ "Destroy_InletConstantVelocity" |
| #define | __FUNCT__ "Create_InletParabolicProfile" |
| #define | __FUNCT__ "Initialize_InletParabolicProfile" |
| #define | __FUNCT__ "PreStep_InletParabolicProfile" |
| #define | __FUNCT__ "PostStep_InletParabolicProfile" |
| #define | __FUNCT__ "Destroy_InletParabolicProfile" |
| #define | __FUNCT__ "Create_InletProfileFromFile" |
| #define | __FUNCT__ "Initialize_InletProfileFromFile" |
| #define | __FUNCT__ "PreStep_InletProfileFromFile" |
| #define | __FUNCT__ "PostStep_InletProfileFromFile" |
| #define | __FUNCT__ "Destroy_InletProfileFromFile" |
| #define | __FUNCT__ "Create_OutletConservation" |
| #define | __FUNCT__ "PreStep_OutletConservation" |
| #define | __FUNCT__ "Apply_OutletConservation" |
| #define | __FUNCT__ "PostStep_OutletConservation" |
| #define | __FUNCT__ "MeasureDrivenFluxes" |
| #define | __FUNCT__ "Create_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Initialize_PeriodicDrivenConstant" |
| #define | __FUNCT__ "PreStep_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Apply_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Destroy_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Create_PeriodicDrivenInitial" |
| #define | __FUNCT__ "Initialize_PeriodicDrivenInitial" |
| #define | __FUNCT__ "PreStep_PeriodicDrivenInitial" |
Functions | |
| PetscErrorCode | Validate_DrivenFlowConfiguration (UserCtx *user) |
Internal helper implementation: Validate_DrivenFlowConfiguration(). | |
| static PetscErrorCode | Apply_WallNoSlip (BoundaryCondition *self, BCContext *ctx) |
| Apply no-slip velocity values to wall-adjacent cells for this boundary condition. | |
| PetscErrorCode | Create_WallNoSlip (BoundaryCondition *bc) |
| Implementation of Create_WallNoSlip(). | |
| static PetscErrorCode | Initialize_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx) |
| Initialize persistent state for a constant-velocity inlet boundary. | |
| static PetscErrorCode | PreStep_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Update constant-inlet data required before the next solver step. | |
| static PetscErrorCode | Apply_InletVelocity (BoundaryCondition *self, BCContext *ctx) |
| Applies a Cartesian inlet velocity through the common face-layout path. | |
| static PetscErrorCode | PostStep_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Perform post-step bookkeeping for a constant-velocity inlet boundary. | |
| static PetscErrorCode | Destroy_InletConstantVelocity (BoundaryCondition *self) |
| Release resources owned by a constant-velocity inlet boundary. | |
| PetscErrorCode | Create_InletConstantVelocity (BoundaryCondition *bc) |
| Implementation of Create_InletConstantVelocity(). | |
| static PetscErrorCode | Initialize_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx) |
| Initialize the geometric data used to evaluate a parabolic inlet profile. | |
| static PetscErrorCode | PreStep_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Refresh parabolic-inlet values required before the solver step. | |
| static PetscErrorCode | PostStep_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Perform post-step bookkeeping for a parabolic inlet boundary. | |
| static PetscErrorCode | Destroy_InletParabolicProfile (BoundaryCondition *self) |
| Release resources owned by a parabolic inlet boundary. | |
| PetscErrorCode | Create_InletParabolicProfile (BoundaryCondition *bc) |
| Implementation of Create_InletParabolicProfile(). | |
| static PetscErrorCode | Initialize_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx) |
| Initializes a file-prescribed inlet profile handler for one boundary face. | |
| static PetscErrorCode | PreStep_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Pre-step hook for the static file-prescribed inlet profile handler. | |
| static PetscErrorCode | PostStep_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Accumulates the applied inlet flux for a file-prescribed profile. | |
| static PetscErrorCode | Destroy_InletProfileFromFile (BoundaryCondition *self) |
| Releases private storage owned by a file-prescribed inlet profile handler. | |
| static PetscErrorCode | GetBCParamStringLocal (BC_Param *params, const char *key, const char **value_out, PetscBool *found) |
| Looks up a string-valued boundary-condition parameter in a BC_Param list. | |
| static PetscErrorCode | GetProfileFileExpectedDims (UserCtx *user, BCFace face_id, PetscInt *n1, PetscInt *n2) |
| Computes the expected PICSLICE dimensions for an inlet face. | |
| static PetscErrorCode | ReadPicSliceProfile (const char *source_file, PetscInt expected_n1, PetscInt expected_n2, InletProfileFileData *data) |
| Reads and validates a static scalar inlet profile from a canonical PICSLICE file. | |
| static PetscReal | ProfileSpeedAt (const InletProfileFileData *data, PetscInt a, PetscInt b) |
| Returns one scalar speed from the flattened PICSLICE profile. | |
| static Cmpnts | EvaluateInletCartesianVelocity (const BoundaryCondition *self, BCFace face_id, PetscInt i, PetscInt j, PetscInt k, Cmpnts metric, PetscReal sign) |
| Evaluates one existing inlet mode as a Cartesian boundary velocity. | |
| PetscErrorCode | Create_InletProfileFromFile (BoundaryCondition *bc) |
| Implementation of Create_InletProfileFromFile(). | |
| static PetscErrorCode | PreStep_OutletConservation (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Prepare the outlet-conservation correction before advancing the solver. | |
| static PetscErrorCode | Apply_OutletConservation (BoundaryCondition *self, BCContext *ctx) |
| (Handler Action) Applies mass conservation correction to the outlet face. | |
| static PetscErrorCode | PostStep_OutletConservation (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Update outlet-conservation state after a completed solver step. | |
| PetscErrorCode | Create_OutletConservation (BoundaryCondition *bc) |
| Implementation of Create_OutletConservation(). | |
| PetscErrorCode | Create_PeriodicGeometric (BoundaryCondition *bc) |
| Implementation of Create_PeriodicGeometric(). | |
| static PetscErrorCode | MeasureDrivenFluxes (UserCtx *user, char direction, PetscReal *boundaryFlux, PetscReal *planarAverageFlux) |
| Measure the two volumetric fluxes the driven-flow controller senses. | |
| static PetscErrorCode | Initialize_PeriodicDrivenConstant (BoundaryCondition *self, BCContext *ctx) |
| Initialize constant forcing data for a periodically driven boundary. | |
| static PetscErrorCode | PreStep_PeriodicDrivenConstant (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Prepare constant periodic-driving data before the solver step. | |
| static PetscErrorCode | Apply_PeriodicDrivenConstant (BoundaryCondition *self, BCContext *ctx) |
| Apply the configured constant driving term to the periodic boundary. | |
| static PetscErrorCode | Destroy_PeriodicDrivenConstant (BoundaryCondition *self) |
| Release resources owned by the constant periodic-driving boundary. | |
| PetscErrorCode | Create_PeriodicDrivenConstant (BoundaryCondition *bc) |
Internal helper implementation: Create_PeriodicDrivenConstant(). | |
| static PetscErrorCode | Initialize_PeriodicDrivenInitial (BoundaryCondition *self, BCContext *ctx) |
| Initialize forcing data for a periodic boundary driven to its initial flux. | |
| static PetscErrorCode | PreStep_PeriodicDrivenInitial (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Latch the initial-state flux once, then drive to it like a constant target. | |
| PetscErrorCode | Create_PeriodicDrivenInitial (BoundaryCondition *bc) |
Internal helper implementation: Create_PeriodicDrivenInitial(). | |
| struct InletConstantData |
Private data structure for the Constant Velocity Inlet handler.
Definition at line 310 of file BC_Handlers.c.
| Data Fields | ||
|---|---|---|
| PetscReal | normal_velocity | |
| struct InletParabolicData |
Private data structure for the Parabolic Velocity Inlet handler.
Stores the peak velocity and pre-computed cross-stream geometry needed to evaluate the parabolic profile at each boundary node.
Definition at line 563 of file BC_Handlers.c.
| struct InletProfileFileData |
Definition at line 822 of file BC_Handlers.c.
| Data Fields | ||
|---|---|---|
| PetscInt | n1 | |
| PetscInt | n2 | |
| PetscReal * | profile | |
| PetscReal | min_speed | |
| PetscReal | max_speed | |
| char * | source_file | |
| struct DrivenFluxData |
Private data structure shared by both periodic driven-flux handlers.
constant_flux fills targetVolumetricFlux from the bcs file at initialization; initial_flux latches it from the starting field at the first PreStep. Everything downstream of the target is identical, so both handlers reuse this struct and the PreStep/Apply/Destroy implementations below.
Definition at line 2084 of file BC_Handlers.c.
| Data Fields | ||
|---|---|---|
| char | direction | |
| PetscReal | targetVolumetricFlux | |
| PetscBool | isMasterController | |
| PetscBool | enforceSeamFlux | |
| PetscInt | lastBulkCorrectionStep | |
| #define __FUNCT__ "Validate_DrivenFlowConfiguration" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_WallNoSlip" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_WallNoSlip" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "MeasureDrivenFluxes" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_PeriodicDrivenInitial" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_PeriodicDrivenInitial" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_PeriodicDrivenInitial" |
Definition at line 10 of file BC_Handlers.c.
| PetscErrorCode Validate_DrivenFlowConfiguration | ( | UserCtx * | user | ) |
Internal helper implementation: Validate_DrivenFlowConfiguration().
(Private) Validates all consistency rules for a driven flow (channel/pipe) setup.
Local to this translation unit.
Definition at line 15 of file BC_Handlers.c.
|
static |
Apply no-slip velocity values to wall-adjacent cells for this boundary condition.
Definition at line 143 of file BC_Handlers.c.
| PetscErrorCode Create_WallNoSlip | ( | BoundaryCondition * | bc | ) |
Implementation of Create_WallNoSlip().
Configures a BoundaryCondition object to behave as a no-slip, stationary wall.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 114 of file BC_Handlers.c.
|
static |
Initialize persistent state for a constant-velocity inlet boundary.
Definition at line 350 of file BC_Handlers.c.
|
static |
Update constant-inlet data required before the next solver step.
Definition at line 399 of file BC_Handlers.c.
|
static |
Applies a Cartesian inlet velocity through the common face-layout path.
The provider evaluation is mode-specific, while ownership clipping, immersed-cell exclusion, metric projection, Ubcs placement, and the normal staggered Ucont write are shared by every inlet profile mode.
Definition at line 1078 of file BC_Handlers.c.
|
static |
Perform post-step bookkeeping for a constant-velocity inlet boundary.
Definition at line 421 of file BC_Handlers.c.
|
static |
Release resources owned by a constant-velocity inlet boundary.
Definition at line 515 of file BC_Handlers.c.
| PetscErrorCode Create_InletConstantVelocity | ( | BoundaryCondition * | bc | ) |
Implementation of Create_InletConstantVelocity().
Configures a BoundaryCondition object to behave as a constant velocity inlet.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 322 of file BC_Handlers.c.
|
static |
Initialize the geometric data used to evaluate a parabolic inlet profile.
Definition at line 607 of file BC_Handlers.c.
|
static |
Refresh parabolic-inlet values required before the solver step.
Definition at line 681 of file BC_Handlers.c.
|
static |
Perform post-step bookkeeping for a parabolic inlet boundary.
Definition at line 701 of file BC_Handlers.c.
|
static |
Release resources owned by a parabolic inlet boundary.
Definition at line 794 of file BC_Handlers.c.
| PetscErrorCode Create_InletParabolicProfile | ( | BoundaryCondition * | bc | ) |
Implementation of Create_InletParabolicProfile().
Configures a BoundaryCondition object for a parabolic inlet profile.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 579 of file BC_Handlers.c.
|
static |
Initializes a file-prescribed inlet profile handler for one boundary face.
Reads the source_file BC parameter, validates the target face dimensions, loads the PICSLICE scalar speed profile, and records summary statistics for logging.
| self | BoundaryCondition object configured by Create_InletProfileFromFile(). |
| ctx | Runtime boundary context containing the UserCtx and face id. |
Definition at line 1228 of file BC_Handlers.c.
|
static |
Pre-step hook for the static file-prescribed inlet profile handler.
Static profiles require no per-step preparation. The hook is implemented so future time-varying profile support can reuse the same handler lifecycle.
| self | BoundaryCondition object for this inlet handler. |
| ctx | Runtime boundary context. |
| local_inflow_contribution | Inflow accumulator, intentionally unchanged. |
| local_outflow_contribution | Outflow accumulator, intentionally unchanged. |
Definition at line 1273 of file BC_Handlers.c.
|
static |
Accumulates the applied inlet flux for a file-prescribed profile.
Sums the face-normal Ucont component over the same interior face slots populated by the common inlet application hook.
| self | BoundaryCondition object for this inlet handler. |
| ctx | Runtime boundary context containing the UserCtx and face id. |
| local_inflow_contribution | Accumulator incremented by the measured inlet flux. |
| local_outflow_contribution | Outflow accumulator, intentionally unchanged. |
Definition at line 1300 of file BC_Handlers.c.
|
static |
Releases private storage owned by a file-prescribed inlet profile handler.
| self | BoundaryCondition object whose data field stores InletProfileFileData. |
Definition at line 1376 of file BC_Handlers.c.
|
static |
Looks up a string-valued boundary-condition parameter in a BC_Param list.
| params | Head of the boundary-condition parameter linked list. | |
| key | Case-insensitive key to search for. | |
| [out] | value_out | Borrowed pointer to the matching value string, or NULL if absent. |
| [out] | found | PETSC_TRUE when the key is present, PETSC_FALSE otherwise. |
Definition at line 840 of file BC_Handlers.c.
|
static |
Computes the expected PICSLICE dimensions for an inlet face.
| user | User context containing global grid node counts. | |
| face_id | Boundary face whose tangential profile dimensions are requested. | |
| [out] | n1 | First PICSLICE dimension in handler storage order. |
| [out] | n2 | Second PICSLICE dimension in handler storage order. |
Definition at line 865 of file BC_Handlers.c.
|
static |
Reads and validates a static scalar inlet profile from a canonical PICSLICE file.
The file must contain magic token PICSLICE, frame count 1, the expected two-dimensional face shape, and exactly one finite nonnegative scalar speed value per interior face slot. Values are stored row-major in data->profile.
| source_file | Path to the PICSLICE profile file. | |
| expected_n1 | Expected first slice dimension. | |
| expected_n2 | Expected second slice dimension. | |
| [in,out] | data | Handler-private storage that receives dimensions, profile values, and min/max speeds. |
Definition at line 910 of file BC_Handlers.c.
|
inlinestatic |
Returns one scalar speed from the flattened PICSLICE profile.
| data | Handler-private profile storage. |
| a | First profile index in face-specific storage order. |
| b | Second profile index in face-specific storage order. |
(a, b). Definition at line 995 of file BC_Handlers.c.
|
inlinestatic |
Evaluates one existing inlet mode as a Cartesian boundary velocity.
Constant, parabolic, and PICSLICE modes currently supply a scalar normal speed. This evaluator performs their mode-specific sampling and lifts that speed onto the signed unit face normal. A future vector-valued mode can return Cartesian components here without changing the application loop.
| self | Inlet handler whose type selects the provider data interpretation. |
| face_id | Physical inlet face. |
| i | Logical I index of the staggered face slot. |
| j | Logical J index of the staggered face slot. |
| k | Logical K index of the staggered face slot. |
| metric | Face-area vector in the increasing computational direction. |
| sign | Positive on a negative-side inlet and negative on a positive-side inlet. |
Definition at line 1017 of file BC_Handlers.c.
| PetscErrorCode Create_InletProfileFromFile | ( | BoundaryCondition * | bc | ) |
Implementation of Create_InletProfileFromFile().
Configures a BoundaryCondition object for a file-prescribed inlet profile.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 1188 of file BC_Handlers.c.
|
static |
Prepare the outlet-conservation correction before advancing the solver.
Definition at line 1448 of file BC_Handlers.c.
|
static |
(Handler Action) Applies mass conservation correction to the outlet face.
This function calculates a global correction factor based on the total inflow and outflow fluxes and applies it to the contravariant velocity (ucont) on the outlet face to ensure mass conservation.
Definition at line 1584 of file BC_Handlers.c.
|
static |
Update outlet-conservation state after a completed solver step.
Definition at line 1796 of file BC_Handlers.c.
| PetscErrorCode Create_OutletConservation | ( | BoundaryCondition * | bc | ) |
Implementation of Create_OutletConservation().
Configures a BoundaryCondition object for conservative outlet treatment.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 1420 of file BC_Handlers.c.
| PetscErrorCode Create_PeriodicGeometric | ( | BoundaryCondition * | bc | ) |
Implementation of Create_PeriodicGeometric().
Configures a BoundaryCondition object for geometric periodic coupling.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 1935 of file BC_Handlers.c.
|
static |
Measure the two volumetric fluxes the driven-flow controller senses.
Both periodic driven handlers steer on the same pair of measurements, so they are taken here in a single sweep of lUcont:
*boundaryFlux is the flux through the single periodic boundary plane. It is fast and responsive but noisy, and drives the boundary trim.*planarAverageFlux is the flux averaged over every cross-sectional plane in the driven direction. It is stable and inertial, and drives the momentum source. It is also the quantity initial_flux latches at t=0.| [in] | user | Block context supplying lUcont, lNvert and info. |
| [in] | direction | Driven direction, 'X', 'Y' or 'Z'. |
| [out] | boundaryFlux | Globally reduced flux through the boundary plane. |
| [out] | planarAverageFlux | Globally reduced plane-averaged flux. |
Definition at line 1975 of file BC_Handlers.c.
|
static |
Initialize constant forcing data for a periodically driven boundary.
Definition at line 2144 of file BC_Handlers.c.
|
static |
Prepare constant periodic-driving data before the solver step.
Definition at line 2214 of file BC_Handlers.c.
|
static |
Apply the configured constant driving term to the periodic boundary.
Definition at line 2298 of file BC_Handlers.c.
|
static |
Release resources owned by the constant periodic-driving boundary.
Definition at line 2401 of file BC_Handlers.c.
| PetscErrorCode Create_PeriodicDrivenConstant | ( | BoundaryCondition * | bc | ) |
Internal helper implementation: Create_PeriodicDrivenConstant().
Configures a BoundaryCondition object for periodic driven-flow forcing.
Local to this translation unit.
Definition at line 2101 of file BC_Handlers.c.
|
static |
Initialize forcing data for a periodic boundary driven to its initial flux.
InitializeEulerianState() runs, so at this point Ucont still holds zeros. The measurement is deferred to the first PreStep, by which time either the initial condition has been applied or the restart target has been restored from the checkpoint manifest. Definition at line 2494 of file BC_Handlers.c.
|
static |
Latch the initial-state flux once, then drive to it like a constant target.
The latch is one-shot and guarded by simCtx->drivenFluxTargetLatched:
Ucont now holds the initial condition, so the plane-averaged flux is measured and stored.ReadSimulationFields() restored both the target and the flag from the checkpoint manifest, so the original target survives instead of being re-measured from a drifted field. Definition at line 2566 of file BC_Handlers.c.
| PetscErrorCode Create_PeriodicDrivenInitial | ( | BoundaryCondition * | bc | ) |
Internal helper implementation: Create_PeriodicDrivenInitial().
Configures a BoundaryCondition object for initial-flux periodic driving.
Local to this translation unit.
Definition at line 2447 of file BC_Handlers.c.