1 |
Allocating arrays in main program
-
REAL, ALLOCATABLE :: u(:,:), f(:,:), r(:,:)
-
ALLOCATE( u(0:ni,0:nj), f(0:ni,0:nj), &
|
2 |
Passing assumed-shape arrays
-
INTERFACE
-
SUBROUTINE residual(x,y,z)
-
REAL x(:,:), y(:,:), z(:,:)
-
END SUBROUTINE
-
END INTERFACE
-
CALL residual( r, u, f )
-
CALL residual( r(0:ni:2,0:nj:2), &
-
u(0:ni:2,0:nj:2), f(0:ni:2,0:nj:2) )
|