xref: /petsc/src/sys/utils/ftn-kernels/fcopy.F90 (revision 0113e7197f2fe148981cb35224c0458dc22f510d)
1!
2!
3!    Fortran kernel for the copy vector routine
4!
5#include <petsc/finclude/petscsys.h>
6!
7subroutine FortranCopy(n,x,y)
8  implicit none
9  PetscScalar  x(*),y(*)
10  PetscInt n
11  PetscInt i
12
13  PETSC_AssertAlignx(16,x(1))
14  PETSC_AssertAlignx(16,y(1))
15
16  do i=1,n
17    y(i) = x(i)
18  end do
19
20end subroutine FortranCopy
21
22subroutine FortranZero(n,x)
23  implicit none
24  PetscScalar  x(*)
25  PetscInt n
26  PetscInt i
27
28  PETSC_AssertAlignx(16,x(1))
29
30  do i=1,n
31    x(i) = 0.0
32  end do
33
34end subroutine FortranZero
35