DMSwarmDataBucketGetDMSwarmDataFieldByName — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# DMSwarmDataBucketGetDMSwarmDataFieldByName

Return the `DMSwarmDataField` handle registered in a `DMSwarmDataBucket` under a given name.

## Synopsis

    PetscErrorCode DMSwarmDataBucketGetDMSwarmDataFieldByName(DMSwarmDataBucket db, const char name[], DMSwarmDataField *gfield)

Not Collective

## Input Parameters

- db - the `DMSwarmDataBucket`

- name - the field name

## Output Parameter

- gfield - the `DMSwarmDataField` handle

## Note

Errors if no field with the given name is registered; use `DMSwarmDataBucketQueryDMSwarmDataFieldByName()` first when the name may be absent.

## See Also

`DMSwarmDataBucket`, `DMSwarmDataField`, `DMSwarmDataBucketGetDMSwarmDataFieldIdByName()`, `DMSwarmDataBucketQueryDMSwarmDataFieldByName()`

## Level

developer

## Location

src/dm/impls/swarm/data_bucket.c

Index of all DMSwarm routines
Table of Contents for all manual pages
Index of all manual pages