AdH Kraken
0.0.0
Next generation Adaptive Hydraulics
Toggle main menu visibility
Main Page
Related Pages
Data Structures
Data Structures
Data Structure Index
Files
File List
Globals
All
a
c
e
f
g
h
i
l
m
n
p
r
s
t
u
Functions
a
c
e
f
g
h
i
l
m
n
p
r
s
t
u
Variables
•
All
Data Structures
Files
Functions
Variables
Pages
Loading...
Searching...
No Matches
sio.h
1
#ifndef H_SIO_
2
#define H_SIO_
3
9
#define UNSET_INT -3
10
#define REJECT " \t\v\f\n\r"
11
#define DELIMITERS " \t\n"
12
#define COMMENT_CHARACTERS "!#"
13
14
#define READ_SUCCESS 1
15
#define READ_NONE 0
16
#define READ_FAIL -1
17
18
/* helper structs */
19
typedef
struct
{
20
char
filename[MAXLINE];
/* path of the file */
21
FILE *fp;
/* the file pointer */
22
}
SFILE
;
23
24
typedef
struct
{
25
char
filename[MAXLINE];
/* path of the file */
26
FILE *fp;
/* the file pointer */
27
int
specified;
/* whether the file was specified in the super file */
28
}
SFILE_IN
;
29
30
/* main file information struct */
31
typedef
struct
{
32
33
/* simulation information */
34
char
proj_name[MAXLINE];
/* The Project Name */
35
char
run_name[MAXLINE];
/* The Running Name */
36
37
/* input files */
38
SFILE
sup;
/* super file */
39
SFILE_IN
bc;
/* boundary condition file */
40
SFILE_IN
geo2d;
/* 2d geometry file */
41
SFILE_IN
geo3d;
/* 3d geometry file */
42
SFILE_IN
hot;
/* hot start file */
43
SFILE_IN
face;
/* file listing 2d face elements - should be included with 3d SW run */
44
SFILE_IN
sedfile;
/* sedlib bc input file */
45
SFILE_IN
nsmfile;
/* WQ NSM input file */
46
47
SFILE_IN
extrude_bin;
// for the 2d/3d extrusion utility
48
SFILE_IN
extrude_node;
// for the 2d/3d extrusion utility
49
51
// FOLLOWING LINES ADDED BY GAJANAN [ gkc July 2015 ]. These are for ADCIRC wind library usage. //
52
#ifdef WINDLIB
53
SFILE_IN
windfile;
/* Unlike other input files however, windfile = "fort.22" necessarily. */
54
#endif
55
// ABOVE LINES ADDED BY GAJANAN //
57
58
/* shallow water files */
59
SFILE
fout_sw_winds;
60
SFILE
fout_sw_waves;
61
62
/* sw2d output files */
63
SFILE
fout_sw2_head;
64
SFILE
fout_sw2_old_head;
65
SFILE
fout_sw2_vel;
66
SFILE
fout_sw2_old_vel;
67
SFILE
fout_sw2_error;
68
SFILE
fout_sw2_error_hydro;
69
70
/* sw3d output files */
71
SFILE
fout_sw3_depth;
/* a 2d grid file */
72
SFILE
fout_sw3_displacement;
73
SFILE
fout_sw3_old_displacement;
74
SFILE
fout_sw3_grid_speed;
75
SFILE
fout_sw3_pressure;
76
SFILE
fout_sw3_vel;
77
SFILE
fout_sw3_old_vel;
78
SFILE
fout_sw3_error;
79
SFILE
fout_sw3_error_hydro;
80
SFILE
fout_sw3_depth_avg_vel;
81
SFILE
fout_sw3_surface_vel;
82
SFILE
fout_sw3_bottom_vel;
83
SFILE
fout_sw3_hyd_viscosity;
/* GSAVANT */
84
SFILE
fout_sw3_trn_diffusivity;
/* GSAVANT */
85
86
/* ns wind and wave files */
87
SFILE
fout_ns_winds;
88
SFILE
fout_ns_waves;
89
90
/* ns2d output files */
91
SFILE
fout_ns2_head;
92
SFILE
fout_ns2_old_head;
93
SFILE
fout_ns2_vel;
94
SFILE
fout_ns2_old_vel;
95
SFILE
fout_ns2_error;
96
SFILE
fout_ns2_error_hydro;
97
98
/* ns3d output files */
99
SFILE
fout_ns3_depth;
/* a 2d grid file */
100
SFILE
fout_ns3_displacement;
101
SFILE
fout_ns3_old_displacement;
102
SFILE
fout_ns3_grid_speed;
103
SFILE
fout_ns3_pressure;
104
SFILE
fout_ns3_vel;
105
SFILE
fout_ns3_old_vel;
106
SFILE
fout_ns3_error;
107
SFILE
fout_ns3_error_hydro;
108
SFILE
fout_ns3_depth_avg_vel;
109
SFILE
fout_ns3_surface_vel;
110
SFILE
fout_ns3_bottom_vel;
111
112
/* general transport output files */
113
SFILE
*fout_con;
114
SFILE
*fout_error_con;
115
116
// for extrusion utility
117
SFILE
fout_grid;
118
SFILE
fout_bc;
119
SFILE
fout_hot;
120
SFILE
fout_faces;
121
122
#ifdef _SEDIMENT
123
/* sediment transport output files */
124
SFILE
fout_bed;
/* the output file for all bed variables */
125
SFILE
fout_bed_flux;
/* the output file for bed load flux vector */
126
SFILE
fout_active_layer;
/* the output file for all active layer variables */
127
SFILE
*fout_bed_layer;
/* an array of nlayer output files for all bed layer variables */
128
SFILE
*fout_sl_grain;
/* an array of ngrain output files for all suspended load grain variables */
129
SFILE
*fout_bl_grain;
/* an array of ngrain output files for all bed load grain variables */
130
#endif
131
132
#ifdef _ADH_GROUNDWATER
133
SFILE
fout_gw_phead;
/* the output file for the pressure heads */
134
SFILE
fout_gw_thead;
/* the output file for the equivalent freshwater heads */
135
SFILE
fout_gw_density;
/* the output file for the water densities */
136
SFILE
fout_gw_sat;
/* the output file for the saturations */
137
SFILE
fout_gw_flx;
/* the output file for the nodal fluxes */
138
SFILE
fout_gw_vel;
/* the output file for the velocities */
139
SFILE
fout_gw_error;
/* the output file for the error */
140
#endif
141
/* other stuff */
142
char
cur_line[MAXLINE];
/* file line being processed */
143
char
cur_filename[MAXLINE];
/* name of file being processed */
144
double
timing_io;
/* Total IO Timing */
145
double
timing_random;
/* Arbitrary Timing */
146
147
}
SIO
;
148
149
150
/************************************************************/
151
/* struct methods ----------------------------------------- */
152
153
void
sfile_open
(
SFILE
*,
char
*filebase,
char
*ext1,
char
*ext2,
char
*suffix,
char
*mode,
int
stopOnNotFind);
154
void
sio_init(
SIO
*,
const
char
*);
155
void
sio_free(
SIO
*,
int
,
int
,
int
);
156
void
sio_init_winds(
SIO
*io);
157
void
sio_init_waves(
SIO
*io);
158
void
sio_init_transport(
SIO
*,
int
);
159
void
sio_init_sediment(
SIO
*,
int
,
int
);
160
void
init_adh_file(
SFILE
*);
161
void
init_adh_in_file(
SFILE_IN
*);
162
163
/************************************************************/
164
/************************************************************/
165
166
167
#endif
sfile_open
void sfile_open(SFILE *file, char *filebase, char *ext1, char *ext2, char *suffix, char *mode, int stopOnNotFind)
Initializes and opens an AdH SFILE.
Definition:
sfile_open.c:24
SFILE_IN
Definition:
sio.h:24
SFILE
Definition:
sfile.h:13
SIO
Definition:
sio.h:31
structs
sio
sio.h
Generated on Fri Apr 4 2025 16:39:32 for AdH Kraken by
1.9.5