DMSetMatrixPreallocateSkip — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# 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.

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetMatrixPreallocateSkip(DM dm, PetscBool skip)

Logically Collective

## Input Parameters

- dm - the `DM`

- skip - `PETSC_TRUE` to skip preallocation

## Note

This is most useful to reduce initialization costs when `MatSetPreallocationCOO()` and `MatSetValuesCOO()` will be used.

## See Also

DM Basics, `DM`, `DMCreateMatrix()`, `DMSetMatrixStructureOnly()`, `DMSetMatrixPreallocateOnly()`

## Level

developer

## Location

src/dm/interface/dm.c

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