DMSwarmInsertPointsUsingCellDM — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# DMSwarmInsertPointsUsingCellDM

Insert point coordinates within each cell

## Synopsis

    #include "petscdmswarm.h"
    PetscErrorCode DMSwarmInsertPointsUsingCellDM(DM dm, DMSwarmPICLayoutType layout_type, PetscInt fill_param)

Not Collective

## Input Parameters

- dm - the `DMSWARM`

- layout_type - method used to fill each cell with the cell `DM`

- fill_param - parameter controlling how many points per cell are added (the meaning of this parameter is dependent on the layout type)

## Notes

The insert method will reset any previous defined points within the `DMSWARM`.

When using a `DMDA` both 2D and 3D are supported for all layout types provided you are using `DMDA_ELEMENT_Q1`.

When using a `DMPLEX` the following case are supported:

       (i) DMSWARMPIC_LAYOUT_REGULAR: 2D (triangle),
       (ii) DMSWARMPIC_LAYOUT_GAUSS: 2D and 3D provided the cell is a tri/tet or a quad/hex,
       (iii) DMSWARMPIC_LAYOUT_SUBDIVISION: 2D and 3D for quad/hex and 2D tri.

## See Also

`DMSWARM`, `DMSwarmPICLayoutType`, `DMSwarmSetType()`, `DMSwarmSetCellDM()`, `DMSwarmType`

## Level

beginner

## Location

src/dm/impls/swarm/swarmpic.c

## Examples

src/ksp/ksp/tutorials/ex70.c
src/dm/tutorials/ex21.c
src/dm/tutorials/ex20.c

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