VecDuplicateVecsF90

Creates several vectors of the same type as an existing vector and makes them accessible via a Fortran90 pointer.

Synopsis

VecGetArrayF90(Vec x,int n,{Scalar, pointer :: y(:)},integer ierr)
Collective on Vec

Input Parameters

x - a vector to mimic
n - the number of vectors to obtain

Output Parameters

y - Fortran90 pointer to the array of vectors
ierr - error code

Example of Usage

    Vec x
    Vec, pointer :: y(:)
    ....
    call VecDuplicateVecsF90(x,2,y,ierr)
    call VecSet(alpha,y(2),ierr)
    call VecSet(alpha,y(2),ierr)
    ....
    call VecDestroyVecsF90(y,2,ierr)

Notes

Not yet supported for all F90 compilers

Use VecDestroyVecsF90() to free the space.

See Also

VecDestroyVecsF90(), VecDuplicateVecs()

Keywords

vector, duplicate, f90

Examples

src/vec/examples/tutorials/ex1f90.F

Location: src/vec/interface/vector.c
Vector Index
Table of Contents