VecCreateComp — SLEPc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# 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