|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Authoritative identities and storage metadata for persistent Eulerian fields. More...
Go to the source code of this file.
Data Structures | |
| struct | FieldDescriptor |
| Immutable metadata for one field identity. More... | |
| struct | FieldView |
| Non-owning runtime objects resolved for one field and UserCtx. More... | |
Functions | |
| PetscErrorCode | FieldGetDescriptor (FieldId field_id, const FieldDescriptor **descriptor) |
| Return immutable metadata for a valid field identifier. | |
| PetscErrorCode | FieldIdFromName (const char *field_name, FieldId *field_id) |
| Resolve a user-facing field name once into its typed identity. | |
| const char * | FieldCanonicalName (FieldId field_id) |
| Return the canonical printable name for an ID. | |
| const char * | FieldLayoutName (FieldLayout layout) |
| Return a stable printable label for a field layout. | |
| PetscErrorCode | FieldGetView (UserCtx *user, FieldId field_id, FieldView *view) |
| Resolve the existing DM and global/local vectors for one field. | |
Authoritative identities and storage metadata for persistent Eulerian fields.
Field identifiers describe conceptual fields at compile time. They do not own, allocate, or modify PETSc objects. A FieldView resolves one identifier against an existing UserCtx after the normal setup lifecycle has created its DMs and vectors.
Definition in file field_catalog.h.
| struct FieldDescriptor |
Immutable metadata for one field identity.
Definition at line 114 of file field_catalog.h.
| Data Fields | ||
|---|---|---|
| FieldId | id | |
| const char * | canonical_name | |
| const char * | alias_1 | |
| const char * | alias_2 | |
| PetscInt | dof | |
| FieldDMKind | dm_kind | |
| FieldLayout | layout | |
| FieldSyncClass | sync_class | |
| unsigned int | availability | |
| unsigned int | capabilities | |
| size_t | global_vec_offset | |
| size_t | local_vec_offset | |
| struct FieldView |
Non-owning runtime objects resolved for one field and UserCtx.
Definition at line 130 of file field_catalog.h.
| Data Fields | ||
|---|---|---|
| const FieldDescriptor * | descriptor | |
| DM | dm | |
| Vec | global_vec | |
| Vec | local_vec | |
| enum FieldId |
Compile-time identity for a catalogued Eulerian field.
Definition at line 23 of file field_catalog.h.
| enum FieldLayout |
Logical storage topology of a field.
| Enumerator | |
|---|---|
| FIELD_LAYOUT_NODE_CENTERED | |
| FIELD_LAYOUT_CELL_CENTERED | |
| FIELD_LAYOUT_I_FACE | |
| FIELD_LAYOUT_J_FACE | |
| FIELD_LAYOUT_K_FACE | |
| FIELD_LAYOUT_COMPONENT_STAGGERED | |
Definition at line 67 of file field_catalog.h.
| enum FieldDMKind |
UserCtx DM family used to store a field.
| Enumerator | |
|---|---|
| FIELD_DM_DA | |
| FIELD_DM_FDA | |
| FIELD_DM_FDA2 | |
| FIELD_DM_COORDINATES | |
Definition at line 77 of file field_catalog.h.
| enum FieldSyncClass |
Extra repair required after the normal PETSc global-to-local scatter.
| Enumerator | |
|---|---|
| FIELD_SYNC_STANDARD | |
| FIELD_SYNC_I_FACE | |
| FIELD_SYNC_J_FACE | |
| FIELD_SYNC_K_FACE | |
| FIELD_SYNC_COMPONENT_STAGGERED | |
Definition at line 85 of file field_catalog.h.
| enum FieldAvailability |
Conditions controlling when a field can have runtime storage.
| Enumerator | |
|---|---|
| FIELD_AVAILABILITY_ALWAYS | |
| FIELD_AVAILABILITY_FINEST_LEVEL | |
| FIELD_AVAILABILITY_TURBULENCE | |
| FIELD_AVAILABILITY_LES | |
| FIELD_AVAILABILITY_RANS | |
| FIELD_AVAILABILITY_PARTICLES | |
Definition at line 94 of file field_catalog.h.
| enum FieldCapabilities |
Operations supported by a catalog entry.
Definition at line 104 of file field_catalog.h.
| PetscErrorCode FieldGetDescriptor | ( | FieldId | field_id, |
| const FieldDescriptor ** | descriptor | ||
| ) |
Return immutable metadata for a valid field identifier.
| [in] | field_id | Compile-time field identity. |
| [out] | descriptor | Catalog entry owned by the field-catalog module. |
Return immutable metadata for a valid field identifier.
Validates the enum range and the table's ID/index invariant before exposing the catalog-owned descriptor.
Definition at line 149 of file field_catalog.c.
| PetscErrorCode FieldIdFromName | ( | const char * | field_name, |
| FieldId * | field_id | ||
| ) |
Resolve a user-facing field name once into its typed identity.
| [in] | field_name | Canonical name or registered alias. |
| [out] | field_id | Resolved field identity. |
Resolve a user-facing field name once into its typed identity.
Name comparison is intentionally confined to ingress; numerical consumers receive the resolved FieldId.
Definition at line 169 of file field_catalog.c.
| const char * FieldCanonicalName | ( | FieldId | field_id | ) |
Return the canonical printable name for an ID.
| [in] | field_id | Field identity. |
Return the canonical printable name for an ID.
Invalid enum values return a non-null diagnostic sentinel string.
Definition at line 200 of file field_catalog.c.
| const char * FieldLayoutName | ( | FieldLayout | layout | ) |
Return a stable printable label for a field layout.
| [in] | layout | Layout enum to describe. |
Invalid-Layout for an invalid enum.Return a stable printable label for a field layout.
Definition at line 211 of file field_catalog.c.
Resolve the existing DM and global/local vectors for one field.
This function never creates storage. Optional fields whose setup conditions were not enabled retain valid descriptors but return PETSC_ERR_ARG_WRONGSTATE because their runtime vectors are absent.
| [in] | user | Existing per-grid context. |
| [in] | field_id | Field identity to resolve. |
| [out] | view | Non-owning runtime view. |
Resolve the existing DM and global/local vectors for one field.
Resolves DM and Vec handles without allocating, referencing, or destroying PETSc storage.
Definition at line 230 of file field_catalog.c.