petsc-3.8.4 2018-03-24
Report Typos and Errors

DMSwarmSetPointsUniformCoordinates

Set point coordinates in a DMSwarm on a regular (ijk) grid

Synopsis

#include "petscdmswarm.h"   
PETSC_EXTERN PetscErrorCode DMSwarmSetPointsUniformCoordinates(DM dm,PetscReal min[],PetscReal max[],PetscInt npoints[],InsertMode mode)
Collective on DM

Input parameters

dm - the DMSwarm
min - minimum coordinate values in the x, y, z directions (array of length dim)
max - maximum coordinate values in the x, y, z directions (array of length dim)
npoints - number of points in each spatial direction (array of length dim)
mode - indicates whether to append points to the swarm (ADD_VALUES), or over-ride existing points (INSERT_VALUES)

Notes

When using mode = INSERT_VALUES, this method will reset the number of particles in the DMSwarm to be npoints[0]*npoints[1] (2D) or npoints[0]*npoints[1]*npoints[2] (3D). When using mode = ADD_VALUES, new points will be appended to any already existing in the DMSwarm

See Also

DMSwarmSetType(), DMSwarmSetCellDM(), DMSwarmType

Level:beginner
Location:
src/dm/impls/swarm/swarmpic.c
Index of all DMSWARM routines
Table of Contents for all manual pages
Index of all manual pages