PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
initialcondition.c
Go to the documentation of this file.
1/**
2 * @file initialcondition.c // Setup the Initial conditions for different cases.
3 * @brief Test program for DMSwarm interpolation using the fdf-curvIB method.
4 **/
5
6 #include "initialcondition.h"
7
8#undef __FUNCT__
9#define __FUNCT__ "SetInitialInteriorField"
10/**
11 * @brief Internal helper implementation: `SetInitialInteriorField()`.
12 * @details Local to this translation unit.
13 */
14PetscErrorCode SetInitialInteriorField(UserCtx *user, const char *fieldName)
15{
16 PetscErrorCode ierr;
17 PetscFunctionBeginUser;
18
20
21 SimCtx *simCtx = user->simCtx;
22
23 LOG_ALLOW(GLOBAL, LOG_INFO, "Setting initial INTERIOR field for '%s' with mode %d.\n", fieldName, simCtx->initialConditionMode);
24
25 // This function currently only implements logic for Ucont.
26 if (strcmp(fieldName, "Ucont") != 0) {
27 LOG_ALLOW(GLOBAL, LOG_DEBUG, "Skipping SetInitialInteriorField for non-Ucont field '%s'.\n", fieldName);
28
30
31 PetscFunctionReturn(0);
32 }
33
34 // --- 1. Get DMDA info and grid dimensions ---
35 DMDALocalInfo info;
36 ierr = DMDAGetLocalInfo(user->fda, &info); CHKERRQ(ierr);
37
38 const PetscInt im_phys = info.mx - 1;
39 const PetscInt jm_phys = info.my - 1;
40 const PetscInt km_phys = info.mz - 1;
41
42 const PetscReal u_cart = simCtx->InitialConstantContra.x;
43 const PetscReal v_cart = simCtx->InitialConstantContra.y;
44 const PetscReal w_cart = simCtx->InitialConstantContra.z;
45
46 LOG_ALLOW(GLOBAL, LOG_DEBUG, "IC cartesian=(%.3f,%.3f,%.3f) ic_velocity_physical=%.3f mode=%d\n",
47 (double)u_cart, (double)v_cart, (double)w_cart,
48 (double)simCtx->icVelocityPhysical, (int)simCtx->initialConditionMode);
49
50 // --- 2. Early dispatch: cartesian Constant delegates to the uniform converter ---
52 ierr = UniformCart2Contra(user, u_cart, v_cart, w_cart); CHKERRQ(ierr);
54 PetscFunctionReturn(0);
55 }
56
57 // --- 3. Resolve flow direction for streamwise Constant and Poiseuille ---
58 const PetscBool needs_flow_dir = (PetscBool)(
62 PetscInt flow_axis = 0;
63 PetscReal flow_dir_sign = 1.0;
64
65 if (needs_flow_dir) {
66 if (user->inletFaceDefined)
68 else if (simCtx->flowDirection != FLOW_DIR_UNSET)
69 fd = simCtx->flowDirection;
70 else
71 SETERRQ(PETSC_COMM_SELF, PETSC_ERR_USER,
72 "Streamwise Constant and Poiseuille IC modes require either an INLET face or -flow_direction.");
73 flow_axis = (PetscInt)fd / 2;
74 flow_dir_sign = ((PetscInt)fd % 2 == 0) ? 1.0 : -1.0;
75 LOG_ALLOW(GLOBAL, LOG_DEBUG, "IC flow_direction=%d (axis=%d sign=%.1f)\n",
76 (int)fd, (int)flow_axis, (double)flow_dir_sign);
77 }
78
79 // --- 4. Open arrays for non-cartesian modes ---
80 Cmpnts ***csi_arr, ***eta_arr, ***zet_arr;
81 ierr = DMDAVecGetArrayRead(user->fda, user->lCsi, &csi_arr); CHKERRQ(ierr);
82 ierr = DMDAVecGetArrayRead(user->fda, user->lEta, &eta_arr); CHKERRQ(ierr);
83 ierr = DMDAVecGetArrayRead(user->fda, user->lZet, &zet_arr); CHKERRQ(ierr);
84
85 Cmpnts ***ucont_arr;
86 ierr = DMDAVecGetArray(user->fda, user->Ucont, &ucont_arr); CHKERRQ(ierr);
87
88 PetscInt i, j, k;
89 const PetscInt xs = info.xs, xe = info.xs + info.xm;
90 const PetscInt ys = info.ys, ye = info.ys + info.ym;
91 const PetscInt zs = info.zs, ze = info.zs + info.zm;
92
93 for (k = zs; k < ze; k++) {
94 for (j = ys; j < ye; j++) {
95 for (i = xs; i < xe; i++) {
96
97 // Check to ensure we only set initial conditions for PHYSICAL cells, not ghost cells.
98 // Ghost cells (at indices 0 and n) will be set later by ApplyBoundaryConditions.
99 //
100 // Grid structure: For n physical grid points, DMDA has size n+1
101 // - im_phys = mx - 1 = n (number of coordinate points, also equals number of cells + 1)
102 // - Physical cell indices: [1, im_phys-1] = [1, n-1] (gives n-1 physical cells)
103 // - Ghost cells at boundaries: index 0 and index im_phys (= n)
104 //
105 // Example: n=25 physical points → im_phys=25
106 // - Physical cells: indices 1..24 (24 cells)
107 // - Ghost cells: indices 0 and 25
108 const PetscBool is_interior = (i > 0 && i < im_phys &&
109 j > 0 && j < jm_phys &&
110 k > 0 && k < km_phys);
111
112 if (is_interior) {
113 Cmpnts ucont_val = {0.0, 0.0, 0.0}; // Default to zero velocity
114 PetscReal normal_velocity_mag = 0.0;
115
116 switch (simCtx->initialConditionMode) {
117 case IC_MODE_ZERO:
118 break;
120 normal_velocity_mag = simCtx->icVelocityPhysical;
121 break;
123 {
124 PetscInt cs1, cs2, n1, n2;
125 if (flow_axis == 0) { cs1 = j; cs2 = k; n1 = jm_phys; n2 = km_phys; }
126 else if (flow_axis == 1) { cs1 = i; cs2 = k; n1 = im_phys; n2 = km_phys; }
127 else { cs1 = i; cs2 = j; n1 = im_phys; n2 = jm_phys; }
128 const PetscReal w1 = (PetscReal)(n1 - 2);
129 const PetscReal w2 = (PetscReal)(n2 - 2);
130 const PetscReal n1_norm = (cs1 - (1.0 + w1 / 2.0)) / (w1 / 2.0);
131 const PetscReal n2_norm = (cs2 - (1.0 + w2 / 2.0)) / (w2 / 2.0);
132 normal_velocity_mag = simCtx->icVelocityPhysical *
133 (1.0 - n1_norm * n1_norm) * (1.0 - n2_norm * n2_norm);
134 if (normal_velocity_mag < 0.0) normal_velocity_mag = 0.0;
135 }
136 break;
137 default:
138 LOG_ALLOW(LOCAL, LOG_WARNING, "Unrecognized initial-condition mode %d. Defaulting to zero.\n", simCtx->initialConditionMode);
139 break;
140 }
141
142 // Step B: apply flow direction and set the single contravariant flux component.
143 if (normal_velocity_mag != 0.0) {
144 const PetscReal signed_vel = normal_velocity_mag * flow_dir_sign * user->GridOrientation;
145 if (flow_axis == 0) {
146 const PetscReal area = sqrt(csi_arr[k][j][i].x * csi_arr[k][j][i].x +
147 csi_arr[k][j][i].y * csi_arr[k][j][i].y +
148 csi_arr[k][j][i].z * csi_arr[k][j][i].z);
149 ucont_val.x = signed_vel * area;
150 } else if (flow_axis == 1) {
151 const PetscReal area = sqrt(eta_arr[k][j][i].x * eta_arr[k][j][i].x +
152 eta_arr[k][j][i].y * eta_arr[k][j][i].y +
153 eta_arr[k][j][i].z * eta_arr[k][j][i].z);
154 ucont_val.y = signed_vel * area;
155 } else {
156 const PetscReal area = sqrt(zet_arr[k][j][i].x * zet_arr[k][j][i].x +
157 zet_arr[k][j][i].y * zet_arr[k][j][i].y +
158 zet_arr[k][j][i].z * zet_arr[k][j][i].z);
159 ucont_val.z = signed_vel * area;
160 }
161 }
162 ucont_arr[k][j][i] = ucont_val;
163 } // end if(is_interior)
164 }
165 }
166 }
167 ierr = DMDAVecRestoreArray(user->fda, user->Ucont, &ucont_arr); CHKERRQ(ierr);
168
169 // --- 5. Restore arrays ---
170 ierr = DMDAVecRestoreArrayRead(user->fda, user->lCsi, &csi_arr); CHKERRQ(ierr);
171 ierr = DMDAVecRestoreArrayRead(user->fda, user->lEta, &eta_arr); CHKERRQ(ierr);
172 ierr = DMDAVecRestoreArrayRead(user->fda, user->lZet, &zet_arr); CHKERRQ(ierr);
173
175
176 PetscFunctionReturn(0);
177}
178
179#undef __FUNCT__
180#define __FUNCT__ "LoadInitialUcont"
181/**
182 * @brief Load a staged file IC and return with Ucont populated.
183 */
184static PetscErrorCode LoadInitialUcont(UserCtx *user)
185{
186 PetscErrorCode ierr;
187 SimCtx *simCtx = user->simCtx;
188
189 PetscFunctionBeginUser;
190 ierr = PetscStrncpy(simCtx->_io_context_buffer, simCtx->initialConditionDirectory,
191 sizeof(simCtx->_io_context_buffer)); CHKERRQ(ierr);
193
194 if (simCtx->initialConditionField == IC_FIELD_UCAT) {
195 ierr = ReadFieldData(user, "ufield", user->Ucat, 0, "dat"); CHKERRQ(ierr);
196 {
197 const char *cell_fields[] = {"Ucat"};
198 ierr = SynchronizePeriodicCellFields(user, 1, cell_fields); CHKERRQ(ierr);
199 }
200 ierr = UpdateLocalGhosts(user, "Ucat"); CHKERRQ(ierr);
201 ierr = Cart2Contra(user); CHKERRQ(ierr);
202 } else if (simCtx->initialConditionField == IC_FIELD_UCONT) {
203 ierr = ReadFieldData(user, "vfield", user->Ucont, 0, "dat"); CHKERRQ(ierr);
204 } else {
205 SETERRQ(PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE,
206 "Unsupported file initial-condition field selector %d.",
207 simCtx->initialConditionField);
208 }
209
210 simCtx->current_io_directory = NULL;
211 PetscFunctionReturn(0);
212}
213
214#undef __FUNCT__
215#define __FUNCT__ "PopulateInitialUcont"
216/**
217 * @brief Dispatch one fresh-start IC and return with Ucont populated.
218 */
219PetscErrorCode PopulateInitialUcont(UserCtx *user)
220{
221 PetscErrorCode ierr;
222 SimCtx *simCtx = user->simCtx;
223
224 PetscFunctionBeginUser;
225 if (simCtx->initialConditionMode == IC_MODE_FILE) {
226 ierr = LoadInitialUcont(user); CHKERRQ(ierr);
227 } else {
228 ierr = SetInitialInteriorField(user, "Ucont"); CHKERRQ(ierr);
229 }
230 PetscFunctionReturn(0);
231}
232
233#undef __FUNCT__
234#define __FUNCT__ "FinalizeBlockState"
235/**
236 * @brief Internal helper implementation: `FinalizeBlockState()`.
237 * @details Local to this translation unit.
238 */
239static PetscErrorCode FinalizeBlockState(UserCtx *user)
240{
241 PetscErrorCode ierr;
242 PetscFunctionBeginUser;
243
245
246 // This sequence ensures a fully consistent state for a single block.
247 ierr = ApplyBoundaryConditions(user); CHKERRQ(ierr);
248 LOG_ALLOW(GLOBAL,LOG_TRACE," Boundary condition applied.\n");
249 // 2. Sync contravariant velocity field.
250 const char *staggered_fields[] = {"Ucont"};
251 ierr = SynchronizePeriodicStaggeredFields(user, 1, staggered_fields); CHKERRQ(ierr);
252 LOG_ALLOW(GLOBAL,LOG_TRACE," Ucont field ghosts updated.\n");
253
254 // 3. Convert to Cartesian velocity.
255 ierr = Contra2Cart(user); CHKERRQ(ierr);
256 LOG_ALLOW(GLOBAL,LOG_TRACE," Converted Ucont to Ucat.\n");
257
258 // 4. Finalize periodic endpoint values, then refresh local Cartesian velocity.
259 {
260 const char *cell_fields[] = {"Ucat"};
261 ierr = SynchronizePeriodicCellFields(user, 1, cell_fields); CHKERRQ(ierr);
262 }
263 ierr = UpdateLocalGhosts(user, "Ucat"); CHKERRQ(ierr);
264 LOG_ALLOW(GLOBAL,LOG_TRACE," Ucat field ghosts updated.\n");
265
267
268 PetscFunctionReturn(0);
269}
270
271
272#undef __FUNCT__
273#define __FUNCT__ "SetInitialFluidState_FreshStart"
274/**
275 * @brief Internal helper implementation: `SetInitialFluidState_FreshStart()`.
276 * @details Local to this translation unit.
277 */
278static PetscErrorCode SetInitialFluidState_FreshStart(SimCtx *simCtx)
279{
280 PetscErrorCode ierr;
281 UserCtx *user_finest = simCtx->usermg.mgctx[simCtx->usermg.mglevels - 1].user;
282 PetscFunctionBeginUser;
283
285
286 for (PetscInt bi = 0; bi < simCtx->block_number; bi++) {
287 LOG_ALLOW(LOCAL, LOG_INFO, "Rank %d, Block %d: Setting t=0 state.\n", simCtx->rank, bi);
288
289 // 1. Set an initial guess for the INTERIOR of the domain.
290 // Replaces the legacy `if(InitialGuessOne)` block.
291
292 LOG_ALLOW(GLOBAL,LOG_TRACE," Initializing Interior Ucont field.\n");
293 ierr = PopulateInitialUcont(&user_finest[bi]); CHKERRQ(ierr);
294 LOG_ALLOW(GLOBAL,LOG_TRACE," Interior Ucont field initialized.\n");
295
296 // 2. Apply all boundary conditions, convert to Cartesian, and sync ghosts.
297 LOG_ALLOW(GLOBAL,LOG_TRACE," Boundary condition application and state finalization initiated.\n");
298 ierr = FinalizeBlockState(&user_finest[bi]); CHKERRQ(ierr);
299 LOG_ALLOW(GLOBAL,LOG_TRACE," Boundary condition application and state finalization complete.\n");
300 }
301
302 // If using multiple grid blocks, handle the interface conditions between them.
303 if (simCtx->block_number > 1) {
304 // LOG_ALLOW(GLOBAL, LOG_INFO, "Updating multi-block interfaces for t=0.\n");
305 // ierr = Block_Interface_U(user_finest); CHKERRQ(ierr);
306 // After interface update, ghost regions might be stale. Refresh them.
307 for (PetscInt bi = 0; bi < simCtx->block_number; bi++) {
308 const char *staggered_fields[] = {"Ucont"};
309 ierr = SynchronizePeriodicStaggeredFields(&user_finest[bi], 1, staggered_fields); CHKERRQ(ierr);
310 ierr = UpdateLocalGhosts(&user_finest[bi], "Ucat"); CHKERRQ(ierr);
311 }
312 }
313
315
316 PetscFunctionReturn(0);
317}
318
319#undef __FUNCT__
320#define __FUNCT__ "SetInitialFluidState_Load"
321/**
322 * @brief Internal helper implementation: `SetInitialFluidState_Load()`.
323 * @details Local to this translation unit.
324 */
325static PetscErrorCode SetInitialFluidState_Load(SimCtx *simCtx)
326{
327 PetscErrorCode ierr;
328 UserCtx *user_finest = simCtx->usermg.mgctx[simCtx->mglevels - 1].user;
329 PetscFunctionBeginUser;
330
332
333 for (PetscInt bi = 0; bi < simCtx->block_number; bi++) {
334 LOG_ALLOW(LOCAL, LOG_INFO, "Rank %d, Block %d: Reading restart files for step %d.\n",
335 simCtx->rank, bi, simCtx->StartStep);
336
337 // ReadSimulationFields handles all file I/O for one block.
338 ierr = ReadSimulationFields(&user_finest[bi], simCtx->StartStep); CHKERRQ(ierr);
339
340 // Apply Boundary Conditions on Read fields
341 ierr = ApplyBoundaryConditions(&user_finest[bi]); CHKERRQ(ierr);
342 // After reading from a file, the local ghost regions MUST be updated
343 // to ensure consistency across process boundaries for the first time step.
344 //ierr = UpdateLocalGhosts(&user_finest[bi], "Ucat"); CHKERRQ(ierr);
345 //ierr = UpdateLocalGhosts(&user_finest[bi], "P"); CHKERRQ(ierr);
346 // ... add ghost updates for any other fields read from file ...
347 }
348
350
351 PetscFunctionReturn(0);
352}
353
354#undef __FUNCT__
355#define __FUNCT__ "InitializeEulerianState"
356/**
357 * @brief Internal helper implementation: `InitializeEulerianState()`.
358 * @details Local to this translation unit.
359 */
360PetscErrorCode InitializeEulerianState(SimCtx *simCtx)
361{
362 PetscErrorCode ierr;
363 UserCtx *user_finest = simCtx->usermg.mgctx[simCtx->usermg.mglevels - 1].user;
364
365 PetscFunctionBeginUser;
366
368
369 LOG_ALLOW(GLOBAL, LOG_INFO, "--- Initializing Eulerian State ---\n");
370
371 if (simCtx->StartStep > 0) {
372 if(strcmp(simCtx->eulerianSource,"analytical")==0){
373 LOG_ALLOW(GLOBAL,LOG_INFO,"Initializing Analytical Solution type: %s (t=%.4f, step=%d).\n",simCtx->AnalyticalSolutionType,simCtx->StartTime,simCtx->StartStep);
374 ierr = AnalyticalSolutionEngine(simCtx);
375 }
376 else{
377 LOG_ALLOW(GLOBAL, LOG_INFO, "Starting from RESTART files (t=%.4f, step=%d).\n",
378 simCtx->StartTime, simCtx->StartStep);
379 ierr = SetInitialFluidState_Load(simCtx); CHKERRQ(ierr);
380 }
381 } else { // StartStep = 0
382 LOG_ALLOW(GLOBAL, LOG_INFO, "Performing a FRESH START (t=0, step=0).\n");
383 if(strcmp(simCtx->eulerianSource,"solve")==0){
384 ierr = SetInitialFluidState_FreshStart(simCtx); CHKERRQ(ierr);
385 }else if(strcmp(simCtx->eulerianSource,"load")==0){
386 LOG_ALLOW(GLOBAL,LOG_INFO,"FRESH START in LOAD mode. Reading files (t=%.4f,step=%d).\n",
387 simCtx->StartTime,simCtx->StartStep);
388 ierr=SetInitialFluidState_Load(simCtx);CHKERRQ(ierr);
389 }else if(strcmp(simCtx->eulerianSource,"analytical")==0){
390 LOG_ALLOW(GLOBAL,LOG_INFO,"FRESH START in ANALYTICAL mode. Initializing Analytical Solution type: %s (t=%.4f,step=%d).\n",
391 simCtx->AnalyticalSolutionType,simCtx->StartTime,simCtx->StartStep);
392 ierr=AnalyticalSolutionEngine(simCtx);CHKERRQ(ierr);
393 }
394 }
395
396 // This crucial step, taken from the end of the legacy setup, ensures
397 // that the history vectors (Ucont_o, Ucont_rm1, etc.) are correctly
398 // populated before the first call to the time-stepping loop.
399 for (PetscInt bi = 0; bi < simCtx->block_number; bi++) {
400 ierr = UpdateSolverHistoryVectors(&user_finest[bi]); CHKERRQ(ierr);
401 }
402
403 LOG_ALLOW(GLOBAL, LOG_INFO, "--- Eulerian State Initialized and History Vectors Populated ---\n");
404
406 PetscFunctionReturn(0);
407}
PetscErrorCode AnalyticalSolutionEngine(SimCtx *simCtx)
Dispatches to the appropriate analytical solution function based on simulation settings.
PetscErrorCode SynchronizePeriodicStaggeredFields(UserCtx *user, PetscInt num_fields, const char *field_names[])
Synchronizes persistent component-staggered vector fields.
PetscErrorCode ApplyBoundaryConditions(UserCtx *user)
Main boundary-condition orchestrator executed during solver timestepping.
PetscErrorCode SynchronizePeriodicCellFields(UserCtx *user, PetscInt num_fields, const char *field_names[])
Synchronizes periodic endpoint cells for a list of cell-centered fields.
static PetscErrorCode SetInitialFluidState_Load(SimCtx *simCtx)
Internal helper implementation: SetInitialFluidState_Load().
static PetscErrorCode SetInitialFluidState_FreshStart(SimCtx *simCtx)
Internal helper implementation: SetInitialFluidState_FreshStart().
PetscErrorCode SetInitialInteriorField(UserCtx *user, const char *fieldName)
Internal helper implementation: SetInitialInteriorField().
static PetscErrorCode LoadInitialUcont(UserCtx *user)
Load a staged file IC and return with Ucont populated.
PetscErrorCode InitializeEulerianState(SimCtx *simCtx)
Internal helper implementation: InitializeEulerianState().
PetscErrorCode PopulateInitialUcont(UserCtx *user)
Dispatch one fresh-start IC and return with Ucont populated.
static PetscErrorCode FinalizeBlockState(UserCtx *user)
Internal helper implementation: FinalizeBlockState().
PetscErrorCode ReadSimulationFields(UserCtx *user, PetscInt ti)
Reads binary field data for velocity, pressure, and other required vectors.
Definition io.c:1129
PetscErrorCode ReadFieldData(UserCtx *user, const char *field_name, Vec field_vec, PetscInt ti, const char *ext)
Reads data for a specific field from a file into the provided vector.
Definition io.c:901
#define LOCAL
Logging scope definitions for controlling message output.
Definition logging.h:44
#define GLOBAL
Scope for global logging across all processes.
Definition logging.h:45
#define LOG_ALLOW(scope, level, fmt,...)
Logging macro that checks both the log level and whether the calling function is in the allowed-funct...
Definition logging.h:199
#define PROFILE_FUNCTION_END
Marks the end of a profiled code block.
Definition logging.h:827
@ LOG_TRACE
Very fine-grained tracing information for in-depth debugging.
Definition logging.h:32
@ LOG_INFO
Informational messages about program execution.
Definition logging.h:30
@ LOG_WARNING
Non-critical issues that warrant attention.
Definition logging.h:29
@ LOG_DEBUG
Detailed debugging information.
Definition logging.h:31
#define PROFILE_FUNCTION_BEGIN
Marks the beginning of a profiled code block (typically a function).
Definition logging.h:818
PetscErrorCode UpdateSolverHistoryVectors(UserCtx *user)
Copies the current time step's solution fields into history vectors (e.g., U(t_n) -> U_o,...
Definition runloop.c:321
PetscErrorCode UniformCart2Contra(UserCtx *user, PetscReal u, PetscReal v, PetscReal w)
Populate contravariant fluxes from one uniform Cartesian velocity.
Definition setup.c:2953
PetscErrorCode Contra2Cart(UserCtx *user)
Reconstructs Cartesian velocity (Ucat) at cell centers from contravariant velocity (Ucont) defined on...
Definition setup.c:2746
PetscErrorCode Cart2Contra(UserCtx *user)
Convert the ghosted Cartesian velocity field to contravariant face fluxes.
Definition setup.c:2881
PetscErrorCode UpdateLocalGhosts(UserCtx *user, const char *fieldName)
Updates the local vector (including ghost points) from its corresponding global vector.
Definition setup.c:1755
PetscReal icVelocityPhysical
Definition variables.h:747
UserCtx * user
Definition variables.h:569
PetscBool inletFaceDefined
Definition variables.h:897
PetscMPIInt rank
Definition variables.h:687
PetscInt block_number
Definition variables.h:768
BCFace identifiedInletBCFace
Definition variables.h:898
InitialConditionMode initialConditionMode
Definition variables.h:742
SimCtx * simCtx
Back-pointer to the master simulation context.
Definition variables.h:879
PetscReal StartTime
Definition variables.h:698
FlowDirection flowDirection
Definition variables.h:746
Vec lZet
Definition variables.h:927
UserMG usermg
Definition variables.h:821
Vec Ucont
Definition variables.h:904
PetscInt StartStep
Definition variables.h:694
PetscScalar x
Definition variables.h:101
char * current_io_directory
Definition variables.h:711
Vec lCsi
Definition variables.h:927
char eulerianSource[PETSC_MAX_PATH_LEN]
Definition variables.h:704
PetscScalar z
Definition variables.h:101
Vec Ucat
Definition variables.h:904
PetscInt mglevels
Definition variables.h:576
PetscInt mglevels
Definition variables.h:727
FlowDirection
Primary flow direction for streamwise IC and Poiseuille modes.
Definition variables.h:270
@ FLOW_DIR_UNSET
Definition variables.h:277
char initialConditionDirectory[PETSC_MAX_PATH_LEN]
Definition variables.h:744
char AnalyticalSolutionType[PETSC_MAX_PATH_LEN]
Definition variables.h:717
@ IC_MODE_CONSTANT_CARTESIAN
Definition variables.h:151
@ IC_MODE_POISEUILLE
Definition variables.h:152
@ IC_MODE_CONSTANT_STREAMWISE
Definition variables.h:153
@ IC_MODE_FILE
Definition variables.h:154
@ IC_MODE_ZERO
Definition variables.h:150
Cmpnts InitialConstantContra
Definition variables.h:745
PetscInt GridOrientation
Definition variables.h:889
PetscScalar y
Definition variables.h:101
@ IC_FIELD_UCONT
Definition variables.h:160
@ IC_FIELD_UCAT
Definition variables.h:159
char _io_context_buffer[PETSC_MAX_PATH_LEN]
Definition variables.h:710
Vec lEta
Definition variables.h:927
MGCtx * mgctx
Definition variables.h:579
InitialConditionField initialConditionField
Definition variables.h:743
A 3D point or vector with PetscScalar components.
Definition variables.h:100
The master context for the entire simulation.
Definition variables.h:684
User-defined context containing data specific to a single computational grid level.
Definition variables.h:876