Typed identities and metadata for persistent solver-particle fields. More...
Go to the source code of this file.
Data Structures | |
| struct | ParticleFieldDescriptor |
| Immutable metadata for one persistent particle field. More... | |
Functions | |
| PetscErrorCode | ParticleFieldGetDescriptor (ParticleFieldId field_id, const ParticleFieldDescriptor **descriptor) |
| Return immutable metadata for a valid particle field ID. | |
| PetscErrorCode | ParticleFieldIdFromName (const char *field_name, ParticleFieldId *field_id) |
| Resolve a canonical name or registered alias at a text-ingress boundary. | |
| PetscErrorCode | ParticleFieldTryIdFromName (const char *field_name, ParticleFieldId *field_id, PetscBool *found) |
| Look a name up without treating an unknown name as an error. | |
| PetscErrorCode | ParticleFieldIdFromScatterTarget (FieldId target, ParticleFieldId *field_id) |
| Find the particle field that scatters to an Eulerian field. | |
| const char * | ParticleFieldName (ParticleFieldId field_id) |
| Return the canonical PETSc DMSwarm name for an ID. | |
Typed identities and metadata for persistent solver-particle fields.
Particle fields intentionally use a catalog separate from Eulerian fields. They are registered on a DMSwarm, may use integer storage, and do not own a global/local Vec pair in UserCtx. Text is translated only where PETSc or a user/file interface requires a registered DMSwarm name.
Definition in file particle_field_catalog.h.
| struct ParticleFieldDescriptor |
Immutable metadata for one persistent particle field.
Definition at line 57 of file particle_field_catalog.h.
| Data Fields | ||
|---|---|---|
| ParticleFieldId | id | |
| const char * | canonical_name | |
| const char * | alias_1 | |
| const char * | alias_2 | |
| PetscInt | components | |
| PetscDataType | data_type | |
| ParticleFieldRegistration | registration | |
| unsigned int | capabilities | |
| PetscReal | default_real_value | |
| FieldId | eulerian_scatter_target | |
| FieldDimension | dimension | |
| enum ParticleFieldId |
Compile-time identity for a persistent solver-particle field.
Definition at line 23 of file particle_field_catalog.h.
Owner of a field's DMSwarm registration.
| Enumerator | |
|---|---|
| PARTICLE_FIELD_REGISTRATION_PICURV | |
| PARTICLE_FIELD_REGISTRATION_PETSC | |
Definition at line 39 of file particle_field_catalog.h.
Operations supported by a particle-field catalog entry.
Definition at line 45 of file particle_field_catalog.h.
| PetscErrorCode ParticleFieldGetDescriptor | ( | ParticleFieldId | field_id, |
| const ParticleFieldDescriptor ** | descriptor | ||
| ) |
Return immutable metadata for a valid particle field ID.
| [in] | field_id | Typed particle-field identity. |
| [out] | descriptor | Catalog-owned immutable descriptor. |
Return immutable metadata for a valid particle field ID.
Definition at line 72 of file particle_field_catalog.c.
| PetscErrorCode ParticleFieldIdFromName | ( | const char * | field_name, |
| ParticleFieldId * | field_id | ||
| ) |
Resolve a canonical name or registered alias at a text-ingress boundary.
| [in] | field_name | Canonical particle name or registered alias. |
| [out] | field_id | Resolved typed identity. |
PETSC_ERR_ARG_UNKNOWN_TYPE for unknown text.Resolve a canonical name or registered alias at a text-ingress boundary.
Definition at line 118 of file particle_field_catalog.c.
| PetscErrorCode ParticleFieldTryIdFromName | ( | const char * | field_name, |
| ParticleFieldId * | field_id, | ||
| PetscBool * | found | ||
| ) |
Look a name up without treating an unknown name as an error.
| [in] | field_name | Canonical particle name or registered alias. |
| [out] | field_id | Resolved identity, or PARTICLE_FIELD_ID_INVALID when not found. |
| [out] | found | Whether the name is registered. |
Look a name up without treating an unknown name as an error.
Definition at line 136 of file particle_field_catalog.c.
| PetscErrorCode ParticleFieldIdFromScatterTarget | ( | FieldId | target, |
| ParticleFieldId * | field_id | ||
| ) |
Find the particle field that scatters to an Eulerian field.
| [in] | target | Eulerian field identity. |
| [out] | field_id | The particle field whose scatter target is target. |
PETSC_ERR_ARG_WRONG when no particle field scatters there.Find the particle field that scatters to an Eulerian field.
Definition at line 95 of file particle_field_catalog.c.
| const char * ParticleFieldName | ( | ParticleFieldId | field_id | ) |
Return the canonical PETSc DMSwarm name for an ID.
| [in] | field_id | Typed particle-field identity. |
InvalidParticleField.Return the canonical PETSc DMSwarm name for an ID.
Definition at line 169 of file particle_field_catalog.c.