# DMPlexLandauAddMaxwellians
Add a Maxwellian distribution to a state 
## Synopsis
```
#include "petscdmplex.h" 
#include "petsclandau.h"   
PetscErrorCode DMPlexLandauAddMaxwellians(DM dm, Vec X, PetscReal time, PetscReal temps[], PetscReal ns[], PetscInt grid, PetscInt b_id, PetscInt n_batch, void *actx)
```
Collective


## Input Parameters
.   dm - The mesh (local)
+   time - Current time
-   temps - Temperatures of each species (global)
.   ns - Number density of each species (global)
-   grid - index into current grid - just used for offset into temp and ns
.   b_id - batch index
-   n_batch - number of batches
+   actx - Landau context


## Output Parameter
.   X  - The state (local to this grid)



.keywords: mesh
.seealso: `DMPlexLandauCreateVelocitySpace()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/utils/dmplexlandauplexland.c.html#DMPlexLandauAddMaxwellians">src/ts/utils/dmplexlandauplexland.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/utils/dmplexlandau/tutorials/ex2.c.html">src/ts/utils/dmplexlandau/tutorials/ex2.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/utils/dmplexlandauplexland.c)


[Index of all LANDAU routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
