文件
tem3dfdtd-open/tem3dfdtd/lib/memory-use-estimation.f90
T
2026-08-14 20:51:58 +08:00

29 行
1.3 KiB
Fortran
原始文件 Blame 文件历史

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
!Copyright (c) 2013 by https://git.em3d.cn/ under guide of Xiu Li(lixiu@chd.edu.cn)
!written by Huaifeng Sun(sunhuaifeng@email.sdu.edu.cn) and Xushan Lu(luxushan@gmail.com)
!Code distribution @ https://git.em3d.cn/
SUBROUTINE MEMORY_USE_ESTIMATION
!This subroutine is written by Huaifeng Sun, and it has not been modified since the last ice age, so it can not reveal the real consumption of memory now.
! This subroutine needs further modification. You can, you do!
USE CONSTANTPARAMETERS
IMPLICIT NONE
INTEGER(KIND=8) TUSE
CHARACTER(LEN=40) XSTRING
INTEGER(KIND=1) CONTD
TUSE=0.0
TUSE=TUSE+NX*NYB*NZB+NXB*NY*NZB+NXB*NYB*NZ !糡Eʹڴ
TUSE=TUSE+NXB*NY*(NZ+1)+NX*NYB*(NZ+1)+NX*NY*NZB !ųHʹڴ
TUSE=TUSE+4*NY*NZB+4*NYB*NZ+NX*4*NZB+NXB*4*NZ+NX*NYB*4+NXB*NY*4 !߽ʹڴ
TUSE=TUSE+4*NY*NZB+4*NYB*NZ+NX*4*NZB+NXB*4*NZ+NX*NYB*4+NXB*NY*4 !߽ʹڴ
TUSE=TUSE+NXB*NYB*NZB ʹڴ
TUSE=TUSE+NSTOP*2
TUSE=TUSE/1024
TUSE=TUSE/1024
TUSE=TUSE*16
WRITE (XSTRING,'(I40)') TUSE
XSTRING = 'At least '//TRIM(ADJUSTL(XSTRING))//'M memory is needed!' ΪҪFORMATʽ
XSTRING = TRIM(ADJUSTL(XSTRING))
WRITE(*,*)XSTRING
RETURN
ENDSUBROUTINE MEMORY_USE_ESTIMATION