# DMSetMatrixPreallocateSkip
When `DMCreateMatrix()` is called the matrix sizes and `ISLocalToGlobalMapping` will be properly set, but the data structures to store values in the matrices will not be preallocated. This is most useful to reduce initialization costs when `MatSetPreallocationCOO()` and `MatSetValuesCOO()` will be used. 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMSetMatrixPreallocateSkip(DM dm, PetscBool skip)
```
Logically Collective on dm


## Input Parameters

- ***dm -*** the `DM`
- ***skip -*** `PETSC_TRUE` to skip preallocation





## See Also
 `DMCreateMatrix()`, `DMSetMatrixStructureOnly()`, `DMSetMatrixPreallocateOnly()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMSetMatrixPreallocateSkip">src/dm/interface/dm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)


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