-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
31 lines (21 loc) · 681 Bytes
/
main.c
File metadata and controls
31 lines (21 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
# Read/write namelist parameters
This code test the routine from bderembl/libs/extra.h
**/
#include <bderembl/libs/extra.h>
double nu = 0.;
double dh[2] = {0., 1.};
int main(int argc,char* argv[]) {
params = array_new();
add_param ("N", &N, "int");
add_param ("nu", &nu, "double");
add_param ("dh", &dh[0], "array");
// Search for the configuration file with a given path or read params.in
if (argc == 2)
strcpy(file_param,argv[1]); // default: params.in
// printf("nu before read %f\n", nu);
read_params(file_param);
// printf("nu after read %f\n", nu);
create_outdir(); // Create a directory 'outdir_000X'
backup_config(file_param);
}