slepc-3.18.0 2022-10-01
Report Typos and Errors

# VecCreateComp

Creates a new vector containing several subvectors, each stored separately.

### Synopsis

    #include "slepcvec.h"
    PetscErrorCode VecCreateComp(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)

Collective

### Input Parameters

| comm | - communicator for the new Vec
| Nx | - array of (initial) global sizes of child vectors
| n | - number of child vectors
| t | - type of the child vectors
| Vparent | - (optional) template vector

### Output Parameter

| V | - new vector

### Notes

This is similar to PETSc's VecNest but customized for SLEPc's needs. In particular, the number of child vectors can be modified dynamically, with VecCompSetSubVecs().

### See Also

VecCreateCompWithVecs(), VecCompSetSubVecs()

### Level

developer

### Location

src/sys/vec/veccomp.c
Index of all sys routines
Table of Contents for all manual pages
Index of all manual pages