#include "petscdmswarm.h" PETSC_EXTERN PetscErrorCode DMSwarmProjectFields(DM dm,PetscInt nfields,const char *fieldnames[],Vec **fields,PetscBool reuse)Collective on Vec
dm | - the DMSwarm | |
nfields | - the number of swarm fields to project | |
fieldnames | - the textual names of the swarm fields to project | |
fields | - an array of Vec's of length nfields | |
reuse | - flag indicating whether the array and contents of fields should be re-used or internally allocated |
If reuse = PETSC_FALSE, this function will allocate the array of Vec's, and each individual Vec. The user is responsible for destroying both the array and the individual Vec objects.
Only swarm fields registered with data type = PETSC_REAL can be projected onto the cell DM.
Only swarm fields of block size = 1 can currently be projected.
The only projection methods currently only support the DA (2D) and PLEX (triangles 2D).