Authoritative persistent-Eulerian-field catalog and runtime view resolver. More...
Go to the source code of this file.
Macros | |
| #define | FIELD_ENTRY(field_id_, name_, alias1_, alias2_, dof_, dm_, layout_, sync_, availability_, capabilities_, global_member_, local_member_, dimension_) |
Functions | |
| PetscErrorCode | FieldGetDescriptor (FieldId field_id, const FieldDescriptor **descriptor) |
| Returns the immutable catalog descriptor for one typed field identity. | |
| PetscErrorCode | FieldIdFromName (const char *field_name, FieldId *field_id) |
| Resolves a canonical field name or registered alias to a typed identity. | |
| PetscErrorCode | FieldTryIdFromName (const char *field_name, FieldId *field_id, PetscBool *found) |
| Searches canonical names and aliases, reporting a miss instead of failing. | |
| PetscErrorCode | FieldDimensionReferenceScale (const ScalingCtx *scaling, FieldDimension dimension, PetscReal *scale) |
| Multiplies the reference scales raised to the dimension's exponents. | |
| PetscErrorCode | FieldDimensionLabel (FieldDimension dimension, char *label, size_t length) |
| Formats the nonzero exponents, or names the non-fixed kinds. | |
| const char * | FieldCanonicalName (FieldId field_id) |
| Returns catalog-owned printable text for a field identity. | |
| const char * | FieldLayoutName (FieldLayout layout) |
| Converts layout metadata to the stable diagnostic label used by field loggers. | |
| PetscErrorCode | FieldGetView (UserCtx *user, FieldId field_id, FieldView *view) |
| Binds one descriptor to the PETSc objects already owned by a UserCtx. | |
Variables | |
| static const FieldDescriptor | gFieldCatalog [FIELD_ID_COUNT] |
Authoritative persistent-Eulerian-field catalog and runtime view resolver.
Definition in file field_catalog.c.
| #define FIELD_ENTRY | ( | field_id_, | |
| name_, | |||
| alias1_, | |||
| alias2_, | |||
| dof_, | |||
| dm_, | |||
| layout_, | |||
| sync_, | |||
| availability_, | |||
| capabilities_, | |||
| global_member_, | |||
| local_member_, | |||
| dimension_ | |||
| ) |
Definition at line 10 of file field_catalog.c.
| PetscErrorCode FieldGetDescriptor | ( | FieldId | field_id, |
| const FieldDescriptor ** | descriptor | ||
| ) |
Returns the immutable catalog descriptor for one typed field identity.
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 285 of file field_catalog.c.
| PetscErrorCode FieldIdFromName | ( | const char * | field_name, |
| FieldId * | field_id | ||
| ) |
Resolves a canonical field name or registered alias to a typed 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 307 of file field_catalog.c.
| PetscErrorCode FieldTryIdFromName | ( | const char * | field_name, |
| FieldId * | field_id, | ||
| PetscBool * | found | ||
| ) |
Searches canonical names and aliases, reporting a miss instead of failing.
Look a name up without treating an unknown name as an error.
Definition at line 324 of file field_catalog.c.
| PetscErrorCode FieldDimensionReferenceScale | ( | const ScalingCtx * | scaling, |
| FieldDimension | dimension, | ||
| PetscReal * | scale | ||
| ) |
Multiplies the reference scales raised to the dimension's exponents.
Return the factor that turns a solver value of one dimension into physical units.
Definition at line 356 of file field_catalog.c.
| PetscErrorCode FieldDimensionLabel | ( | FieldDimension | dimension, |
| char * | label, | ||
| size_t | length | ||
| ) |
Formats the nonzero exponents, or names the non-fixed kinds.
Write a printable form of a dimension, such as L^2 U or dimensionless.
Definition at line 376 of file field_catalog.c.
| const char * FieldCanonicalName | ( | FieldId | field_id | ) |
Returns catalog-owned printable text for a field identity.
Return the canonical printable name for an ID.
Invalid enum values return a non-null diagnostic sentinel string.
Definition at line 417 of file field_catalog.c.
| const char * FieldLayoutName | ( | FieldLayout | layout | ) |
Converts layout metadata to the stable diagnostic label used by field loggers.
Return a stable printable label for a field layout.
Definition at line 430 of file field_catalog.c.
Binds one descriptor to the PETSc objects already owned by a UserCtx.
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 453 of file field_catalog.c.
|
static |
Definition at line 16 of file field_catalog.c.