petsc-3.7.1 2016-05-15
Report Typos and Errors

MatCreateDense

Creates a parallel matrix in dense format.

Synopsis

#include "petscmat.h"  
PetscErrorCode  MatCreateDense(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt M,PetscInt N,PetscScalar *data,Mat *A)
Collective on MPI_Comm Many br

Input Parameters

comm - MPI communicator Many br
m - number of local rows (or PETSC_DECIDE to have calculated if M is given) Many br
n - number of local columns (or PETSC_DECIDE to have calculated if N is given) Many br
M - number of global rows (or PETSC_DECIDE to have calculated if m is given) Many br
N - number of global columns (or PETSC_DECIDE to have calculated if n is given) Many br
data - optional location of matrix data. Set data=NULL (PETSC_NULL_SCALAR for Fortran users) for PETSc Many brto control all matrix memory allocation. Many br

Output Parameter

A -the matrix Many br

Notes

The dense format is fully compatible with standard Fortran 77 Many brstorage by columns. Many br

The data input variable is intended primarily for Fortran programmers Many brwho wish to allocate their own matrix memory space. Most users should Many brset data=NULL (PETSC_NULL_SCALAR for Fortran users). Many br

The user MUST specify either the local or global matrix dimensions Many br(possibly both). Many br

Many br

Keywords

matrix,dense, parallel

See Also

MatCreate(), MatCreateSeqDense(), MatSetValues()

Level:intermediate
Location:
src/mat/impls/dense/mpi/mpidense.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/tao/pde_constrained/examples/tutorials/elliptic.c.html