-
Notifications
You must be signed in to change notification settings - Fork 3
/
RunRegistry.bat
382 lines (323 loc) · 11.2 KB
/
RunRegistry.bat
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
@ECHO OFF
set lines=======================================================================
echo %lines%
IF "%1"=="" (
ECHO.
ECHO The calling syntax for this script is
ECHO RunRegistry ModuleName [FAST_Root_Loc]
ECHO.
GOTO Done
)
REM ----------------------------------------------------------------------------
REM ------------------------- LOCAL PATHS --------------------------------------
REM ----------------------------------------------------------------------------
REM -- USERS MAY EDIT THESE PATHS TO POINT TO FOLDERS ON THEIR LOCAL MACHINES. -
REM -- NOTE: do not use quotation marks around the path names!!!! --------------
REM ----------------------------------------------------------------------------
REM ----------------------------------------------------------------------------
SET Root_Loc=..\..
IF not "%2"=="" SET Root_Loc=%2
SET Modules_Loc=%Root_Loc%\modules
SET Registry=..\..\build\bin\Registry.exe
SET FAST_Loc=%Modules_Loc%\openfast-library\src
SET ED_Loc=%Modules_Loc%\elastodyn\src
SET AD14_Loc=%Modules_Loc%\aerodyn14\src
SET IfW_Loc=%Modules_Loc%\inflowwind\src
SET HD_Loc=%Modules_Loc%\hydrodyn\src
SET SD_Loc=%Modules_Loc%\subdyn\src
SET MAP_Loc=%Modules_Loc%\map\src
SET FEAM_Loc=%Modules_Loc%\feamooring\src
SET IceF_Loc=%Modules_Loc%\icefloe\src\interfaces\FAST
SET IceD_Loc=%Modules_Loc%\icedyn\src
SET MD_Loc=%Modules_Loc%\moordyn\src
SET OpFM_Loc=%Modules_Loc%\openfoam\src
SET Orca_Loc=%Modules_Loc%\orcaflex-interface\src
SET NWTC_Lib_Loc=%Modules_Loc%\nwtc-library\src
SET ExtPtfm_Loc=%Modules_Loc%\extptfm\src
SET AD_Loc=%Modules_Loc%\aerodyn\src
SET SrvD_Loc=%Modules_Loc%\servodyn\src
SET BD_Loc=%Modules_Loc%\beamdyn\src
SET SC_Loc=%Modules_Loc%\supercontroller\src
SET AFI_Loc=%Modules_Loc%\aerodyn\src
SET SrvD_Loc=%Modules_Loc%\servodyn\src
SET BD_Loc=%Modules_Loc%\beamdyn\src
SET ActDsk_Loc=%Modules_Loc%\actuatordisk\src
SET KAD_Loc=%Modules_Loc%\kiteaerodyn\src
SET KFAST_Loc=%Modules_Loc%\kitefast-library\src
SET VSM_Loc=%Modules_Loc%\vsm\src
SET KFC_Loc=%Modules_Loc%\kitefast-controller\src
SET ALL_FAST_Includes=-I "%FAST_Loc%" -I "%NWTC_Lib_Loc%" -I "%ED_Loc%" -I "%SrvD_Loc%" -I "%AD14_Loc%" -I^
"%AD_Loc%" -I "%BD_Loc%" -I "%SC_Loc%" -I "%AFI_Loc%" -I^
"%IfW_Loc%" -I "%SD_Loc%" -I "%HD_Loc%" -I "%MAP_Loc%" -I "%FEAM_Loc%" -I^
"%IceF_Loc%" -I "%IceD_Loc%" -I "%MD_Loc%" -I "%OpFM_Loc%" -I "%Orca_Loc%" -I "%ExtPtfm_Loc%"
SET ALL_KFAST_Includes=-I "%KFAST_Loc%" -I "%NWTC_Lib_Loc%" -I "%KAD_Loc%" -I "%VSM_Loc%" -I "%ActDsk_Loc%" -I "%AFI_Loc%" -I "%MD_Loc%" -I "%KFC_Loc%" -I "%IfW_Loc%"
SET ALL_KFAST_OS_Includes=-I "%KFAST_Loc%" -I "%NWTC_Lib_Loc%" -I "%MD_Loc%" -I "%HD_Loc%"
SET ModuleName=%1
GOTO %ModuleName%
REM ----------------------------------------------------------------------------
REM ---------------- RUN THE REGISTRY TO AUTO-GENERATE FILES -------------------
REM ----------------------------------------------------------------------------
:MAP
SET CURR_LOC=%MAP_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -ccode -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\MAP_Fortran_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
GOTO checkError
:FAST
SET CURR_LOC=%FAST_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\FAST_Registry.txt" %ALL_FAST_Includes% -noextrap -O "%Output_Loc%"
GOTO checkError
:KiteFAST
SET CURR_LOC=%KFAST_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\KiteFAST_Registry.txt" %ALL_KFAST_Includes% -noextrap -O "%Output_Loc%"
GOTO checkError
:KiteFAST_OS
SET CURR_LOC=%KFAST_Loc%
%REGISTRY% "%CURR_LOC%\KiteFAST_OS_Registry.txt" %ALL_KFAST_OS_Includes% -noextrap -O "%Output_Loc%"
GOTO checkError
:BeamDyn
SET CURR_LOC=%BD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\Registry_BeamDyn.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:SuperController
SET CURR_LOC=%SC_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\SuperController_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%" -ccode
GOTO checkError
:ElastoDyn
SET CURR_LOC=%ED_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:TMD
:ServoDyn
SET CURR_LOC=%SrvD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:Lidar
:InflowWind
SET CURR_LOC=%IfW_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:IfW_TSFFWind
:IfW_HAWCWind
:IfW_BladedFFWind
:IfW_UserWind
:IfW_4Dext
:IfW_UniformWind
SET CURR_LOC=%IfW_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -noextrap -O "%Output_Loc%"
GOTO checkError
:OpenFOAM
SET CURR_LOC=%OpFM_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -ccode -O "%Output_Loc%"
GOTO checkError
:AeroDyn
:BEMT
:DBEMT
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%AFI_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:AeroDyn_Driver
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AeroDyn_Driver_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%AFI_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
GOTO checkError
:AFI
SET CURR_LOC=%AFI_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AirfoilInfo_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -noextrap -O "%Output_Loc%"
GOTO checkError
:UA
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\UnsteadyAero_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%AFI_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:FVW
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\FVW_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:AA
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AeroAcoustics_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:AeroDyn14
SET CURR_LOC=%AD14_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\Registry-AD14.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -I "%IfW_Loc%" -O "%Output_Loc%"
GOTO checkError
:DWM
SET CURR_LOC=%AD14_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\Registry-DWM.txt" -I "%NWTC_Lib_Loc%" -I "%IfW_Loc%" -O "%Output_Loc%"
GOTO checkError
:HydroDyn
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:Current
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:Waves
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:Waves2
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:SS_Excitation
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:SS_Radiation
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:Conv_Radiation
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:WAMIT
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:WAMIT2
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:Morison
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
GOTO checkError
:SubDyn
SET CURR_LOC=%SD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:FEAMooring
SET CURR_LOC=%FEAM_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\FEAM_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:MoorDyn
SET CURR_LOC=%MD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:IceFloe
SET CURR_LOC=%IceF_Loc%
SET Output_Loc=%Modules_Loc%\icefloe\src\icefloe
%REGISTRY% "%CURR_LOC%\%ModuleName%_FASTRegistry.inp" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:IceDyn
SET CURR_LOC=%IceD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\Registry_%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:OrcaFlexInterface
SET CURR_LOC=%Orca_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:ExtPtfm_MCKF
SET CURR_LOC=%ExtPtfm_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError
:FASTWrapper
SET CURR_LOC=%Farm_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\FASTWrapper_Registry.txt" -I %NWTC_Lib_Loc% %ALL_FAST_INCLUDES% -noextrap -O "%Output_Loc%"
GOTO checkError
:ActuatorDisk
SET CURR_LOC=%ActDsk_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\ActuatorDisk_Registry.txt" -I "%NWTC_Lib_Loc%" -noextrap -O "%Output_Loc%"
GOTO checkError
:KiteAeroDyn
SET CURR_LOC=%KAD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -I "%ActDsk_Loc%" -I "%VSM_Loc%" -I "%AFI_Loc%" -O "%Output_Loc%"
GOTO checkError
:VSM
SET CURR_LOC=%VSM_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -I "%AFI_Loc%" -noextrap -O "%Output_Loc%"
GOTO checkError
:KiteFastController
SET CURR_LOC=%KFC_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -noextrap -O "%Output_Loc%"
GOTO checkError
:Version
DEL "%Root_Loc%\VersionInfo.obj" "%Root_Loc%\versioninfo.mod"
GOTO end
:checkError
ECHO.
IF %ERRORLEVEL% NEQ 0 (
ECHO Error running FAST Registry for %ModuleName%.
) ELSE (
ECHO Registry for %ModuleName% completed.
REM COPY /Y "%ModuleName%_Types.f90" "%CURR_LOC%"
rem IF /I "%ModuleName%"=="MAP" COPY /Y "%ModuleName%_Types.h" "%CURR_LOC%"
)
:end
REM ----------------------------------------------------------------------------
REM ------------------------- CLEAR MEMORY -------------------------------------
REM ----------------------------------------------------------------------------
ECHO.
SET ModuleName=
SET CURR_LOC=
SET Root_Loc=
SET Subs_Loc=
SET FAST_Loc=
SET Registry=
SET ED_Loc=
SET BD_Loc=
SET AD14_Loc=
SET IfW_Loc=
SET HD_Loc=
SET SD_Loc=
SET MAP_Loc=
SET FEAM_Loc=
SET IceF_Loc=
SET IceD_Loc=
SET MD_Loc=
SET OpFM_Loc=
SET Orca_Loc=
SET NWTC_Lib_Loc=
SET ExtPtfm_Loc=
SET AD_Loc=
SET SrvD_Loc=
SET AFI_Loc=
SET KAD_Loc=
SET VSM_Loc=
SET ActDsk_Loc=
SET Farm_Loc=
SET ALL_FAST_Includes=
:Done
echo %lines%
set lines=
:PathsOnly