incomp-flame-post/code/m_arrays.f90
ignis 962704e5f7
All checks were successful
CI Test Suite / run-tests (push) Successful in 1m14s
Deploy Documentation / build-and-deploy (push) Successful in 53s
refactor: resolve code smells ranked 1 to 6 (unused variables, local imports, wildcard imports, empty routines, pointer warning)
2026-06-02 17:27:48 +00:00

58 lines
1.1 KiB
Fortran

module m_arrays
use, intrinsic :: iso_fortran_env, only: real64
use m_parameters
implicit none
real(real64), allocatable, dimension(:,:,:) :: u,v,w,y
contains
subroutine m_arrays_init
integer :: ierr
ALLOCATE(u(nxp,nyp,nzp),STAT=ierr)
if (ierr /= 0) then
write(0,*) "Error: allocation of u failed on process", myid
call MPI_ABORT(MPI_COMM_TASK, 1, mpi_err)
end if
u=0.
ALLOCATE(v(nxp,nyp,nzp),STAT=ierr)
if (ierr /= 0) then
write(0,*) "Error: allocation of v failed on process", myid
call MPI_ABORT(MPI_COMM_TASK, 1, mpi_err)
end if
v=0.
ALLOCATE(w(nxp,nyp,nzp),STAT=ierr)
if (ierr /= 0) then
write(0,*) "Error: allocation of w failed on process", myid
call MPI_ABORT(MPI_COMM_TASK, 1, mpi_err)
end if
w=0.
ALLOCATE(y(nxp,nyp,nzp),STAT=ierr)
if (ierr /= 0) then
write(0,*) "Error: allocation of y failed on process", myid
call MPI_ABORT(MPI_COMM_TASK, 1, mpi_err)
end if
y=0.
end subroutine m_arrays_init
subroutine m_arrays_finalize
DEALLOCATE(u)
DEALLOCATE(v)
DEALLOCATE(w)
DEALLOCATE(y)
end subroutine m_arrays_finalize
end module m_arrays