PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
field_catalog.c
Go to the documentation of this file.
1/**
2 * @file field_catalog.c
3 * @brief Authoritative persistent-Eulerian-field catalog and runtime view resolver.
4 */
5
6#include "field_catalog.h"
7#include "logging.h"
8
9
10#define FIELD_ENTRY(field_id_, name_, alias1_, alias2_, dof_, dm_, layout_, sync_, availability_, capabilities_, global_member_, local_member_, dimension_) \
11 [field_id_] = { \
12 field_id_, name_, alias1_, alias2_, dof_, dm_, layout_, sync_, availability_, capabilities_, \
13 offsetof(UserCtx, global_member_), offsetof(UserCtx, local_member_), dimension_ \
14 }
15
23 FIELD_CAPABILITY_CHECKPOINT, Ucat, lUcat,
28 FIELD_CAPABILITY_CHECKPOINT, Ucont, lUcont,
32 FIELD_CAPABILITY_GHOST_UPDATE, Ucont_o, lUcont_o,
43 FIELD_ENTRY(FIELD_ID_NU_T, "Nu_t", "Eddy Viscosity", NULL, 1, FIELD_DM_DA, FIELD_LAYOUT_CELL_CENTERED,
46 FIELD_CAPABILITY_CHECKPOINT, Nu_t, lNu_t,
48 /* Holds the model coefficient C that multiplies Delta^2 |S|, which is Cs^2 in the
49 classical notation and is signed once backscatter is admitted. Exists only for
50 the dynamic model; the constant model prescribes its coefficient from config. */
56 /* Wall-model friction velocity, nonzero only in the first interior cell of a WALL
57 face (the RMS over the cell's wall faces). It is the quantity a wall model is scored
58 against, and it is computed from the reference cell rather than the cell it is stored
59 in, so it is checkpointed and exposed to postprocessing rather than recomputed. */
60 FIELD_ENTRY(FIELD_ID_U_TAU, "Utau", "Friction Velocity", NULL, 1, FIELD_DM_DA,
64 FIELD_CAPABILITY_CHECKPOINT, Friction_Velocity, lFriction_Velocity,
66 /* The wall model's kinematic wall shear stress, one vector per wall-face element,
67 stored in that face's dummy cell (no two wall faces share one) and oriented as the
68 face's viscous flux per unit area. The viscous operator applies it on the wall face
69 in place of a gradient flux. Derived state, rebuilt every wall pass, so not
70 checkpointed. */
71 FIELD_ENTRY(FIELD_ID_WALL_STRESS, "WallStress", "Wall Shear Stress", NULL, 3, FIELD_DM_FDA,
75 Wall_Stress, lWall_Stress,
77 /* The synthetic-inflow time filter's state: three unit-variance components per inlet face
78 cell, stored in that face's dummy plane. It carries the inflow's memory, so a restart
79 reads it back. Only its inlets read it, through the global vector; the restart's ghost
80 refresh of the local copy is harmless. */
81 FIELD_ENTRY(FIELD_ID_INFLOW_FLUCTUATION, "InflowFluctuation", NULL, NULL, 3, FIELD_DM_FDA,
84 FIELD_CAPABILITY_GHOST_UPDATE | FIELD_CAPABILITY_CHECKPOINT, InflowFluctuation, lInflowFluctuation,
90 FIELD_ENTRY(FIELD_ID_DIFFUSIVITY_GRADIENT, "DiffusivityGradient", NULL, NULL, 3, FIELD_DM_FDA,
92 FIELD_CAPABILITY_GHOST_UPDATE | FIELD_CAPABILITY_PERIODIC_CELL_SYNC, DiffusivityGradient, lDiffusivityGradient,
109 FIELD_CAPABILITY_CHECKPOINT, Nvert, lNvert,
115 FIELD_ENTRY(FIELD_ID_CENT, "Cent", "Center-Coordinates", NULL, 3, FIELD_DM_FDA, FIELD_LAYOUT_CELL_CENTERED,
118 FIELD_ENTRY(FIELD_ID_CENTX, "Centx", "X-Face-Centers", NULL, 3, FIELD_DM_FDA, FIELD_LAYOUT_I_FACE,
123 FIELD_ENTRY(FIELD_ID_CENTY, "Centy", "Y-Face-Centers", NULL, 3, FIELD_DM_FDA, FIELD_LAYOUT_J_FACE,
128 FIELD_ENTRY(FIELD_ID_CENTZ, "Centz", "Z-Face-Centers", NULL, 3, FIELD_DM_FDA, FIELD_LAYOUT_K_FACE,
192 FIELD_CAPABILITY_GHOST_UPDATE, Nvert_o, lNvert_o,
196 FIELD_CAPABILITY_GHOST_UPDATE | FIELD_CAPABILITY_CHECKPOINT, ParticleCount, lParticleCount,
198 /* Corner-staging workspace. Node-centered by construction: the interpolation
199 * writes cell-centered data onto grid corners. Not checkpointed, since it is
200 * transient scratch rebuilt on every conversion. */
201 FIELD_ENTRY(FIELD_ID_CELL_SCALAR_AT_CORNER, "CellScalarAtCorner", NULL, NULL, 1,
204 FIELD_CAPABILITY_GHOST_UPDATE, CellScalarAtCorner, lCellScalarAtCorner,
206 FIELD_ENTRY(FIELD_ID_CELL_VECTOR_AT_CORNER, "CellVectorAtCorner", NULL, NULL, 3,
209 FIELD_CAPABILITY_GHOST_UPDATE, CellVectorAtCorner, lCellVectorAtCorner,
211 /* Post-processing staging fields. A derived statistic is config-counted and so
212 * has no compile-time offset of its own; staging the result here lets the
213 * existing ghost, nodal-average, and logging paths address it by name instead
214 * of each growing a second, view-based entry point. */
215 FIELD_ENTRY(FIELD_ID_POST_SCALAR, "PostScalar", NULL, NULL, 1,
220 FIELD_ENTRY(FIELD_ID_POST_VECTOR, "PostVector", NULL, NULL, 3,
225 /* The Q-criterion is computed at cell centres. It is catalogued only so the nodal
226 * average can refresh its ghosts by name: a cell value written as point data sits
227 * half a cell away from the node the file assigns it. Post-processor only. */
228 FIELD_ENTRY(FIELD_ID_QCRIT, "Qcrit", NULL, NULL, 1,
233 /* Particle face planes (MetricComputeFacePlanes()). The dual-cell planes are anchored at cell
234 * centres, so they take the cell-centred layout and the standard scatter. */
237 PlaneNormalI, lPlaneNormalI, FIELD_DIM_DIMENSIONLESS),
240 PlaneNormalJ, lPlaneNormalJ, FIELD_DIM_DIMENSIONLESS),
243 PlaneNormalK, lPlaneNormalK, FIELD_DIM_DIMENSIONLESS),
246 PlaneCentroidI, lPlaneCentroidI, FIELD_DIM_LENGTH),
249 PlaneCentroidJ, lPlaneCentroidJ, FIELD_DIM_LENGTH),
252 PlaneCentroidK, lPlaneCentroidK, FIELD_DIM_LENGTH),
255 SearchCellSize, lSearchCellSize, FIELD_DIM_LENGTH),
258 DualPlaneNormalI, lDualPlaneNormalI, FIELD_DIM_DIMENSIONLESS),
261 DualPlaneNormalJ, lDualPlaneNormalJ, FIELD_DIM_DIMENSIONLESS),
264 DualPlaneNormalK, lDualPlaneNormalK, FIELD_DIM_DIMENSIONLESS),
267 DualPlaneCentroidI, lDualPlaneCentroidI, FIELD_DIM_LENGTH),
270 DualPlaneCentroidJ, lDualPlaneCentroidJ, FIELD_DIM_LENGTH),
273 DualPlaneCentroidK, lDualPlaneCentroidK, FIELD_DIM_LENGTH)
274};
275
276_Static_assert(sizeof(gFieldCatalog) / sizeof(gFieldCatalog[0]) == FIELD_ID_COUNT,
277 "Field catalog must contain one entry per FieldId.");
278
279/**
280 * @brief Returns the immutable catalog descriptor for one typed field identity.
281 * @details Validates the enum range and the table's ID/index invariant before
282 * exposing the catalog-owned descriptor.
283 * @see FieldGetDescriptor()
284 */
285PetscErrorCode FieldGetDescriptor(FieldId field_id, const FieldDescriptor **descriptor)
286{
287 PetscFunctionBeginUser;
289 PetscCheck(descriptor != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
290 "Field descriptor output cannot be NULL.");
291 PetscCheck(field_id >= 0 && field_id < FIELD_ID_COUNT, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE,
292 "Invalid FieldId value %d.", (int)field_id);
293 PetscCheck(gFieldCatalog[field_id].id == field_id, PETSC_COMM_SELF, PETSC_ERR_PLIB,
294 "Field catalog entry %d is not initialized consistently.", (int)field_id);
295
296 *descriptor = &gFieldCatalog[field_id];
298 PetscFunctionReturn(0);
299}
300
301/**
302 * @brief Resolves a canonical field name or registered alias to a typed identity.
303 * @details Name comparison is intentionally confined to ingress; numerical
304 * consumers receive the resolved @ref FieldId.
305 * @see FieldIdFromName()
306 */
307PetscErrorCode FieldIdFromName(const char *field_name, FieldId *field_id)
308{
309 PetscBool found = PETSC_FALSE;
310
311 PetscFunctionBeginUser;
313 PetscCall(FieldTryIdFromName(field_name, field_id, &found));
314 PetscCheck(found, PETSC_COMM_SELF, PETSC_ERR_ARG_UNKNOWN_TYPE,
315 "Field name '%s' is not registered in the Eulerian field catalog.", field_name);
317 PetscFunctionReturn(0);
318}
319
320/**
321 * @brief Searches canonical names and aliases, reporting a miss instead of failing.
322 * @see FieldTryIdFromName()
323 */
324PetscErrorCode FieldTryIdFromName(const char *field_name, FieldId *field_id, PetscBool *found)
325{
326 PetscFunctionBeginUser;
328 PetscCheck(field_name != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
329 "Field name cannot be NULL.");
330 PetscCheck(field_id != NULL && found != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
331 "FieldId and found outputs cannot be NULL.");
332
333 *field_id = FIELD_ID_INVALID;
334 *found = PETSC_FALSE;
335 for (PetscInt index = 0; index < FIELD_ID_COUNT; ++index) {
336 const FieldDescriptor *descriptor = &gFieldCatalog[index];
337 PetscBool match = PETSC_FALSE;
338
339 PetscCall(PetscStrcasecmp(field_name, descriptor->canonical_name, &match));
340 if (!match && descriptor->alias_1) PetscCall(PetscStrcasecmp(field_name, descriptor->alias_1, &match));
341 if (!match && descriptor->alias_2) PetscCall(PetscStrcasecmp(field_name, descriptor->alias_2, &match));
342 if (match) {
343 *field_id = descriptor->id;
344 *found = PETSC_TRUE;
345 break;
346 }
347 }
349 PetscFunctionReturn(0);
350}
351
352/**
353 * @brief Multiplies the reference scales raised to the dimension's exponents.
354 * @see FieldDimensionReferenceScale()
355 */
356PetscErrorCode FieldDimensionReferenceScale(const ScalingCtx *scaling, FieldDimension dimension,
357 PetscReal *scale)
358{
359 PetscFunctionBeginUser;
361 PetscCheck(scaling != NULL && scale != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
362 "Scaling context and scale output cannot be NULL.");
363 PetscCheck(dimension.kind == FIELD_DIMENSION_FIXED, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE,
364 "Only a field with a fixed physical dimension has a reference scale.");
365 *scale = PetscPowRealInt(scaling->L_ref, dimension.length) *
366 PetscPowRealInt(scaling->U_ref, dimension.velocity) *
367 PetscPowRealInt(scaling->rho_ref, dimension.density);
369 PetscFunctionReturn(0);
370}
371
372/**
373 * @brief Formats the nonzero exponents, or names the non-fixed kinds.
374 * @see FieldDimensionLabel()
375 */
376PetscErrorCode FieldDimensionLabel(FieldDimension dimension, char *label, size_t length)
377{
378 const char *symbols[3] = {"L", "U", "rho"};
379 const int exponents[3] = {dimension.length, dimension.velocity, dimension.density};
380 size_t used = 0;
381
382 PetscFunctionBeginUser;
384 PetscCheck(label != NULL && length > 0, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
385 "Dimension label buffer cannot be NULL or empty.");
386 label[0] = '\0';
387 if (dimension.kind == FIELD_DIMENSION_NOT_A_QUANTITY) {
388 PetscCall(PetscStrncpy(label, "not a physical quantity", length));
390 PetscFunctionReturn(0);
391 }
392 if (dimension.kind == FIELD_DIMENSION_FROM_SOURCE) {
393 PetscCall(PetscStrncpy(label, "dimension of its source field", length));
395 PetscFunctionReturn(0);
396 }
397 for (int index = 0; index < 3; ++index) {
398 if (!exponents[index]) continue;
399 if (exponents[index] == 1) {
400 PetscCall(PetscSNPrintf(label + used, length - used, "%s%s", used ? " " : "", symbols[index]));
401 } else {
402 PetscCall(PetscSNPrintf(label + used, length - used, "%s%s^%d", used ? " " : "",
403 symbols[index], exponents[index]));
404 }
405 PetscCall(PetscStrlen(label, &used));
406 }
407 if (!used) PetscCall(PetscStrncpy(label, "dimensionless", length));
409 PetscFunctionReturn(0);
410}
411
412/**
413 * @brief Returns catalog-owned printable text for a field identity.
414 * @details Invalid enum values return a non-null diagnostic sentinel string.
415 * @see FieldCanonicalName()
416 */
417const char *FieldCanonicalName(FieldId field_id)
418{
420 const char *name = (field_id >= 0 && field_id < FIELD_ID_COUNT && gFieldCatalog[field_id].id == field_id)
421 ? gFieldCatalog[field_id].canonical_name : "InvalidField";
423 return name;
424}
425
426/**
427 * @brief Converts layout metadata to the stable diagnostic label used by field loggers.
428 * @see FieldLayoutName()
429 */
430const char *FieldLayoutName(FieldLayout layout)
431{
433 const char *name;
434 switch (layout) {
435 case FIELD_LAYOUT_NODE_CENTERED: name = "Node-Centered"; break;
436 case FIELD_LAYOUT_CELL_CENTERED: name = "Cell-Centered"; break;
437 case FIELD_LAYOUT_I_FACE: name = "I-Face"; break;
438 case FIELD_LAYOUT_J_FACE: name = "J-Face"; break;
439 case FIELD_LAYOUT_K_FACE: name = "K-Face"; break;
440 case FIELD_LAYOUT_COMPONENT_STAGGERED: name = "Component-Staggered"; break;
441 default: name = "Invalid-Layout"; break;
442 }
444 return name;
445}
446
447/**
448 * @brief Binds one descriptor to the PETSc objects already owned by a UserCtx.
449 * @details Resolves DM and Vec handles without allocating, referencing, or
450 * destroying PETSc storage.
451 * @see FieldGetView()
452 */
453PetscErrorCode FieldGetView(UserCtx *user, FieldId field_id, FieldView *view)
454{
455 const FieldDescriptor *descriptor = NULL;
456
457 PetscFunctionBeginUser;
459 PetscCheck(user != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
460 "UserCtx cannot be NULL when resolving a field view.");
461 PetscCheck(view != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_NULL,
462 "Field view output cannot be NULL.");
463 PetscCall(FieldGetDescriptor(field_id, &descriptor));
464
465 view->descriptor = descriptor;
466 view->dm = NULL;
467 view->global_vec = NULL;
468 view->local_vec = NULL;
469
470 switch (descriptor->dm_kind) {
471 case FIELD_DM_DA:
472 view->dm = user->da;
473 break;
474 case FIELD_DM_FDA:
475 view->dm = user->fda;
476 break;
477 default:
478 SETERRQ(PETSC_COMM_SELF, PETSC_ERR_PLIB,
479 "Field '%s' has an invalid DM selector.", descriptor->canonical_name);
480 }
481
482 view->global_vec = *(Vec *)((char *)user + descriptor->global_vec_offset);
483 view->local_vec = *(Vec *)((char *)user + descriptor->local_vec_offset);
484
485 PetscCheck(view->dm != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE,
486 "DM for field '%s' is unavailable in this UserCtx.", descriptor->canonical_name);
487 PetscCheck(view->global_vec != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE,
488 "Global vector for field '%s' is unavailable in this UserCtx.", descriptor->canonical_name);
489 PetscCheck(view->local_vec != NULL, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE,
490 "Local vector for field '%s' is unavailable in this UserCtx.", descriptor->canonical_name);
491
493 PetscFunctionReturn(0);
494}
495
496#undef FIELD_ENTRY
PetscErrorCode FieldIdFromName(const char *field_name, FieldId *field_id)
Resolves a canonical field name or registered alias to a typed identity.
PetscErrorCode FieldDimensionReferenceScale(const ScalingCtx *scaling, FieldDimension dimension, PetscReal *scale)
Multiplies the reference scales raised to the dimension's exponents.
#define FIELD_ENTRY(field_id_, name_, alias1_, alias2_, dof_, dm_, layout_, sync_, availability_, capabilities_, global_member_, local_member_, dimension_)
static const FieldDescriptor gFieldCatalog[FIELD_ID_COUNT]
const char * FieldCanonicalName(FieldId field_id)
Returns catalog-owned printable text for a field identity.
PetscErrorCode FieldGetView(UserCtx *user, FieldId field_id, FieldView *view)
Binds one descriptor to the PETSc objects already owned by a UserCtx.
PetscErrorCode FieldTryIdFromName(const char *field_name, FieldId *field_id, PetscBool *found)
Searches canonical names and aliases, reporting a miss instead of failing.
const char * FieldLayoutName(FieldLayout layout)
Converts layout metadata to the stable diagnostic label used by field loggers.
PetscErrorCode FieldDimensionLabel(FieldDimension dimension, char *label, size_t length)
Formats the nonzero exponents, or names the non-fixed kinds.
PetscErrorCode FieldGetDescriptor(FieldId field_id, const FieldDescriptor **descriptor)
Returns the immutable catalog descriptor for one typed field identity.
Authoritative identities and storage metadata for persistent Eulerian fields.
#define FIELD_DIM_VELOCITY_SQUARED
const char * alias_1
#define FIELD_DIM_INVERSE_VOLUME
@ FIELD_DIMENSION_FROM_SOURCE
Staging storage: carries whatever was written into it.
@ FIELD_DIMENSION_NOT_A_QUANTITY
Integer bookkeeping: identities, flags, ranks.
@ FIELD_DIMENSION_FIXED
The exponents are the field's dimension.
#define FIELD_DIM_DIFFUSIVITY
@ FIELD_CAPABILITY_CHECKPOINT
@ FIELD_CAPABILITY_PARTICLE_SAMPLED
Defined only where a cell holds particles; elsewhere the stored value is a placeholder,...
@ FIELD_CAPABILITY_GHOST_UPDATE
@ FIELD_CAPABILITY_PERIODIC_GEOMETRY_SHIFT
@ FIELD_CAPABILITY_PERIODIC_CELL_SYNC
@ FIELD_CAPABILITY_PERIODIC_FACE_SYNC
@ FIELD_CAPABILITY_PERIODIC_STAGGERED_SYNC
@ FIELD_AVAILABILITY_WALL_MODEL
@ FIELD_AVAILABILITY_FINEST_LEVEL
@ FIELD_AVAILABILITY_PARTICLES
@ FIELD_AVAILABILITY_TURBULENCE
@ FIELD_AVAILABILITY_LES_DYNAMIC
@ FIELD_AVAILABILITY_ALWAYS
@ FIELD_AVAILABILITY_INFLOW_FLUCTUATION
@ FIELD_SYNC_STANDARD
@ FIELD_SYNC_K_FACE
@ FIELD_SYNC_J_FACE
@ FIELD_SYNC_COMPONENT_STAGGERED
@ FIELD_SYNC_I_FACE
#define FIELD_DIM_INVERSE_TIME_SQUARED
const FieldDescriptor * descriptor
#define FIELD_DIM_DIMENSIONLESS
signed char velocity
#define FIELD_DIM_AREA
#define FIELD_DIM_LENGTH
signed char density
FieldDMKind dm_kind
#define FIELD_DIM_FROM_SOURCE
signed char length
FieldLayout
Logical storage topology of a field.
@ FIELD_LAYOUT_K_FACE
@ FIELD_LAYOUT_I_FACE
@ FIELD_LAYOUT_CELL_CENTERED
@ FIELD_LAYOUT_COMPONENT_STAGGERED
@ FIELD_LAYOUT_NODE_CENTERED
@ FIELD_LAYOUT_J_FACE
FieldDimensionKind kind
const char * canonical_name
const char * alias_2
#define FIELD_DIM_PRESSURE
#define FIELD_DIM_VOLUME_FLUX
#define FIELD_DIM_VELOCITY
@ FIELD_DM_FDA
@ FIELD_DM_DA
FieldId
Compile-time identity for a catalogued Eulerian field.
@ FIELD_ID_DUAL_PLANE_CENTROID_I
@ FIELD_ID_PLANE_NORMAL_J
@ FIELD_ID_PSI
@ FIELD_ID_JETA
@ FIELD_ID_CENTZ
@ FIELD_ID_PLANE_CENTROID_I
@ FIELD_ID_CSI
@ FIELD_ID_IAJ
@ FIELD_ID_CELL_SCALAR_AT_CORNER
@ FIELD_ID_NVERT
@ FIELD_ID_PLANE_NORMAL_K
@ FIELD_ID_UCAT
@ FIELD_ID_NVERT_O
@ FIELD_ID_KETA
@ FIELD_ID_PLANE_CENTROID_K
@ FIELD_ID_JAJ
@ FIELD_ID_COORDINATES
@ FIELD_ID_PLANE_NORMAL_I
@ FIELD_ID_UCONT_O
@ FIELD_ID_KAJ
@ FIELD_ID_CELL_VECTOR_AT_CORNER
@ FIELD_ID_AJ
@ FIELD_ID_NU_T
@ FIELD_ID_CENTY
@ FIELD_ID_DUAL_PLANE_CENTROID_J
@ FIELD_ID_INFLOW_FLUCTUATION
@ FIELD_ID_DUAL_PLANE_CENTROID_K
@ FIELD_ID_KZET
@ FIELD_ID_IETA
@ FIELD_ID_DIFFUSIVITY_GRADIENT
@ FIELD_ID_UCONT
@ FIELD_ID_U_TAU
@ FIELD_ID_ICSI
@ FIELD_ID_POST_VECTOR
@ FIELD_ID_ETA
@ FIELD_ID_PHI
@ FIELD_ID_POST_SCALAR
@ FIELD_ID_WALL_STRESS
@ FIELD_ID_CS
@ FIELD_ID_CENT
@ FIELD_ID_QCRIT
@ FIELD_ID_JCSI
@ FIELD_ID_JZET
@ FIELD_ID_PLANE_CENTROID_J
@ FIELD_ID_DUAL_PLANE_NORMAL_I
@ FIELD_ID_INVALID
@ FIELD_ID_DUAL_PLANE_NORMAL_J
@ FIELD_ID_DUAL_PLANE_NORMAL_K
@ FIELD_ID_P
@ FIELD_ID_IZET
@ FIELD_ID_UCONT_RM1
@ FIELD_ID_ZET
@ FIELD_ID_KCSI
@ FIELD_ID_CENTX
@ FIELD_ID_PARTICLE_COUNT
@ FIELD_ID_COUNT
@ FIELD_ID_DIFFUSIVITY
@ FIELD_ID_SEARCH_CELL_SIZE
Immutable metadata for one field identity.
Physical dimension as exponents of the reference length, velocity, and density.
Non-owning runtime objects resolved for one field and UserCtx.
Logging utilities and macros for PETSc-based applications.
#define PROFILE_HELPER_BEGIN
Marks the beginning of a profiled helper: timed only when enabled by name.
Definition logging.h:1014
#define PROFILE_HELPER_END
Alias of PROFILE_FUNCTION_END for a function that began with PROFILE_HELPER_BEGIN.
Definition logging.h:1033
#define PROFILE_FUNCTION_END
Marks the end of a profiled code block.
Definition logging.h:1029
#define PROFILE_FUNCTION_BEGIN
Marks the beginning of a profiled function: an always-on aggregate timer.
Definition logging.h:1000
PetscReal L_ref
Definition variables.h:898
PetscReal rho_ref
Definition variables.h:900
PetscReal U_ref
Definition variables.h:899
User-defined context containing data specific to a single computational grid level.
Definition variables.h:1157