Skip to main content
`Ctrl`+`K`

# MatSeqDenseSetPreallocation

Sets the array used for storing the matrix elements of a `MATSEQDENSE` matrix

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatSeqDenseSetPreallocation(Mat B, PetscScalar data[])

Collective

## Input Parameters

- B - the matrix

- data - the array (or `NULL`)

## Note

The data input variable is intended primarily for Fortran programmers who wish to allocate their own matrix memory space. Most users should need not call this routine.

## See Also

Matrices, `Mat`, `MATSEQDENSE`, `MatCreate()`, `MatCreateDense()`, `MatSetValues()`, `MatDenseSetLDA()`

## Level

intermediate

## Location

src/mat/impls/dense/seq/dense.c

## Examples

src/mat/tutorials/ex2.c

## Implementations

MatSeqDenseSetPreallocation_SeqDense() in src/mat/impls/dense/seq/dense.c

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