Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@rutgers.edu>2023-04-24 12:22:29 -0400
committerIan Jauslin <ian.jauslin@rutgers.edu>2023-04-24 12:22:29 -0400
commitb35be9ea88dd3d28710f213afb3f63b7748ce5a6 (patch)
treef29361bcf8181f4ddc75869a2f5415fa0059fadc /src/driving.c
parent2b1b66f8f123beb6bec68db251d61d9f291efee1 (diff)
Allow driving to be specified by file
Diffstat (limited to 'src/driving.c')
-rw-r--r--src/driving.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/driving.c b/src/driving.c
index c329848..7920d45 100644
--- a/src/driving.c
+++ b/src/driving.c
@@ -1,5 +1,6 @@
#include "driving.h"
#include "navier-stokes.h"
+#include "io.h"
#include <math.h>
// test driving function
@@ -35,3 +36,25 @@ int g_zero(
return 0;
}
+
+// From file
+// txt input
+int driving_file_txt (
+ _Complex double* g,
+ int K1,
+ int K2,
+ FILE* file
+){
+ read_vec(g, K1, K2, file);
+ return 0;
+}
+// binary input
+int driving_file_bin (
+ _Complex double* g,
+ int K1,
+ int K2,
+ FILE* file
+){
+ read_vec_bin(g, K1, K2, file);
+ return 0;
+}