aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/f1.f9024
1 files changed, 23 insertions, 1 deletions
diff --git a/src/f1.f90 b/src/f1.f90
index 82e60b1..b1f89b9 100644
--- a/src/f1.f90
+++ b/src/f1.f90
@@ -12,9 +12,31 @@ PROGRAM test
delta = (end - start) / real(npoints - 1, C_DOUBLE)
type(C_PTR) :: p_real, p_complex, plan
-
+
real(C_DOUBLE), pointer :: arr_real(:)
complex(C_DOUBLE_COMPLEX), pointer :: arr_complex(:)
+
+ character(100) :: arg
+
+ IF (command_argument_count() < 1) THEN
+
+ DO i = 1, npoints
+
+ t = (i - 1) * delta + start
+
+ write(*,*) t, " ", f1(t)
+
+ END DO
+
+ STOP
+ END IF
+
+ call get_command_argument(1, arg)
+
+ IF (trim(arg) /= "dft") THEN
+
+ STOP "wrong argument"
+ END IF
p_real = fftw_alloc_real(int(npoints, C_SIZE_T))