update
Former-commit-id: bdede6ed1b6f578f2ef046c338caf02d0b29d453 [formerly 7187de361b53e9c8ec121df379b762f2db736ea2] Former-commit-id: 447d58460fbbfd05ffe08428a1288e392637561d
This commit is contained in:
33
_embed/public/ace/demo/kitchen-sink/docs/fortran.f90
Normal file
33
_embed/public/ace/demo/kitchen-sink/docs/fortran.f90
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "globalDefines.h"
|
||||
|
||||
!=========================================================
|
||||
program main
|
||||
!=========================================================
|
||||
use params_module, only : nx, ny, nz
|
||||
|
||||
implicit none
|
||||
|
||||
integer, parameter :: g = 9.81
|
||||
real, allocatable, dimension(:,:,:) :: array
|
||||
integer :: a, b, c
|
||||
real*8 :: x, y, z
|
||||
|
||||
b = 5
|
||||
c = 7
|
||||
|
||||
#ifdef ARRAY_COMP
|
||||
allocate(array(10,10,10), status=a)
|
||||
|
||||
write(c,'(i5.5)') b
|
||||
#endif
|
||||
|
||||
if(x.lt.5.0) then
|
||||
array(:,:,:) = g
|
||||
else
|
||||
array(:,:,:) = x - y
|
||||
endif
|
||||
|
||||
return
|
||||
!========================================================
|
||||
end program main
|
||||
!========================================================
|
||||
Reference in New Issue
Block a user