petsc-master 2019-09-17
Report Typos and Errors

PetscArraycpy

Copies from one array in memory to another

Synopsis

#include <petscsys.h>
PetscErrorCode PetscArraycpy(anytype *str1,const anytype *str2,size_t cnt)
Not Collective

Input Parameters

str1 - First array (destination)
str2 - Second array (source)
cnt - Count of the array, not in bytes, but number of entries in the arrays

Note

This routine is a preferred replacement to PetscMemcpy() The arrays must be of the same type

See Also

PetscMemcpy(), PetscMemcmp(), PetscArrayzero(), PetscMemzero(), PetscArraymove(), PetscMemmove(), PetscArraycmp(), PetscStrallocpy()

Level

intermediate

Location

include/petscsys.h

Examples

src/ksp/ksp/examples/tutorials/ex56.c.html
src/ksp/ksp/examples/tutorials/ex73.c.html
src/snes/examples/tutorials/ex28.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex11.c.html
src/ts/examples/tutorials/extchem.c.html

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages