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

# VecCreate

Creates an empty vector object. The type can then be set with VecSetType(), or VecSetFromOptions().

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecCreate(MPI_Comm comm, Vec *vec)

If you never call VecSetType() or VecSetFromOptions() it will generate an Many brerror when you try to use the vector. Many br

Collective on MPI_Comm Many br

### Input Parameter

comm -The communicator for the vector object Many br

### Output Parameter

vec -The vector object Many br

Many br

### Keywords

vector, create

### See Also

VecSetType(), VecSetSizes(), VecCreateMPIWithArray(), VecCreateMPI(), VecDuplicate(),
VecDuplicateVecs(), VecCreateGhost(), VecCreateSeq(), VecPlaceArray() Many br

Level:beginner
Location:src/vec/vec/interface/veccreate.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/vec/examples/tutorials/ex1.c.html
src/vec/vec/examples/tutorials/ex2.c.html
src/vec/vec/examples/tutorials/ex3.c.html
src/vec/vec/examples/tutorials/ex5.c.html
src/vec/vec/examples/tutorials/ex6.c.html
src/vec/vec/examples/tutorials/ex7.c.html
src/vec/vec/examples/tutorials/ex8.c.html
src/vec/vec/examples/tutorials/ex9.c.html
src/vec/vec/examples/tutorials/ex10.c.html
src/vec/vec/examples/tutorials/ex11.c.html
src/vec/vec/examples/tutorials/ex12.c.html