1! 2! 3! Fortran kernel for the copy vector routine 4! 5#include <petsc/finclude/petscsys.h> 6! 7pure subroutine FortranCopy(n,x,y) 8 implicit none (type, external) 9 PetscScalar, intent(in) :: x(*) 10 PetscScalar, intent(inout) :: y(*) 11 PetscInt, intent(in) :: n 12 13 PetscInt i 14 15 PETSC_AssertAlignx(16,x(1)) 16 PETSC_AssertAlignx(16,y(1)) 17 18 do i=1,n 19 y(i) = x(i) 20 end do 21end subroutine FortranCopy 22 23pure subroutine FortranZero(n,x) 24 implicit none (type, external) 25 PetscScalar, intent(inout) :: x(*) 26 PetscInt, intent(in) :: n 27 28 PetscInt i 29 30 PETSC_AssertAlignx(16,x(1)) 31 32 do i=1,n 33 x(i) = 0.0 34 end do 35end subroutine FortranZero 36