World Ocean Simulation System (WOSS) library
woss-test.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2020 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
31
32
33#ifndef WOSS_TEST_H
34#define WOSS_TEST_H
35
36
37#include <string>
38#include <cstdlib>
39#include <cstdio>
40#include <iostream>
41#include <memory>
42#include <ssp-definitions.h>
48#include <transducer-handler.h>
53#if defined (WOSS_NETCDF_SUPPORT)
57#endif // defined (WOSS_NETCDF_SUPPORT)
58#include <bellhop-creator.h>
59#include <woss-manager-simple.h>
60#include <woss-controller.h>
61
62
63namespace woss {
64
82
88 class WossException : public std::exception {
89
90 public:
91
95 static constexpr inline int CHAR_ARR_LENGTH = 250;
96
105 WossException(WossErrorType error_type_, const char* file_, int line_, const char* func_, const char* info_);
106
110 WossException(const WossException& copy) = default;
111
115 virtual ~WossException() throw () override = default;
116
121 WossException& operator=(const WossException& copy) = default;
122
127 virtual const char* what() const throw();
128
134
139 const char* getFile() const { return file; }
140
145 int getLine() const { return line; }
146
151 const char* getFunc() const { return func; }
152
157 const char* getInfo() const { return info; }
158
163 static void printAndExit(const std::exception* e);
164
165
166 protected:
167
172
177
181 int line;
194
195 };
196
197 #define WOSS_EXCEPTION_INFO(err_type, info) throw WossException(err_type, __FILE__, __LINE__, __FUNCTION__, info)
198
199 #define WOSS_EXCEPTION(err_type) throw WossException(err_type, __FILE__, __LINE__, __FUNCTION__, "")
200
205
206 public:
207
214
215 TestTimeReference(const TestTimeReference& copy) = default;
216
218
219 virtual ~TestTimeReference() override = default;
220
225 virtual std::unique_ptr<TimeReference> clone() const override { return std::make_unique<TestTimeReference>(*this); }
226
231 void setTimeReference(double time) { time_reference = time; }
236 virtual double getTimeReference() const { return time_reference; }
237
238 private:
239
244
245 };
246
252 class WossTest {
253
254 public:
255
259 WossTest();
260
261 virtual ~WossTest() = default;
262
267 WossTest(const WossTest& copy) = delete;
268
273 WossTest(WossTest&& tmp) = delete;
274
279 WossTest& operator=(const WossTest& copy) = delete;
280
285 WossTest& operator=(WossTest&& tmp) = delete;
286
292 void run();
293
299 WossTest& setWossTestDebug(bool flag) { debug = flag; return *this; }
300
305 bool getWossTestDebug() const { return debug; }
306
312 WossTest& setWossRandomGenStream(int stream) { woss_random_gen_stream = stream; return *this;}
313
319
325 WossTest& setResDbCreatorDebug(bool flag) { res_db_creator_debug = flag; return *this; }
326
332
338 WossTest& setResDbDebug(bool flag) { res_db_debug = flag; return *this; }
339
344 bool getResDbDebug() const { return res_db_debug; }
345
351 WossTest& setResDbUseBinary(bool flag) { res_db_use_binary = flag; return *this; }
352
357 bool getResDbUseBinary() const { return res_db_use_binary; }
358
365 WossTest& setResDbUseTimeArr(bool flag) { res_db_use_time_arr = flag; return *this; }
366
372
379 WossTest& setResDbUsePressure(bool flag) { res_db_use_pressure = flag; return *this; }
380
386
392 WossTest& setResDbSpaceSampling(double sampling) { res_db_space_sampling = sampling; return *this; }
393
399
405 WossTest& setResDbFilePath(const std::string& path) { res_db_file_path = path; return *this; }
406
411 std::string getResDbFilePath() const { return res_db_file_path; }
412
418 WossTest& setResDbFileName(const std::string& file_name) { res_db_file_name = file_name; return *this; }
419
424 std::string getResDbFileName() const { return res_db_file_name; }
425
426#if defined (WOSS_NETCDF_SUPPORT)
427#if defined (WOSS_NETCDF4_SUPPORT)
434
440#endif // defined (WOSS_NETCDF4_SUPPORT)
441
447 WossTest& setSedimDbCreatorDebug( bool flag ) { sedim_db_creator_debug = flag; return *this; }
448
454
460 WossTest& setSedimDbDebug(bool flag) { sedim_db_debug = flag; return *this; }
461
466 bool getSedimDbDebug() const { return sedim_db_debug; }
467
473 WossTest& setSedimDbCoordFilePath(const std::string& path) { sedim_db_coord_file_path = path; return *this; }
474
479 std::string getSedimDbCoordFilePath() const { return sedim_db_coord_file_path; }
480
486 WossTest& setSedimDbMarsdenFilePath(const std::string& path) { sedim_db_marsden_file_path = path; return *this; }
487
493
499 WossTest& setSedimDbMarsdenOneFilePath(const std::string& path) { sedim_db_marsden_one_file_path = path; return *this; }
500
506
512 WossTest& setSspDbCreatorDebug( bool flag ) { ssp_db_creator_debug = flag; return *this; }
513
519
525 WossTest& setSspDbDebug( bool flag ) { ssp_db_debug = flag; return *this; }
526
531 bool getSspDbDebug() const { return ssp_db_debug; }
532
538 WossTest& setSspDbFilePath(const std::string& path) { ssp_db_file_path = path; return *this; }
539
544 std::string getSspDbFilePath() const { return ssp_db_file_path; }
545
546#if defined (WOSS_NETCDF4_SUPPORT)
552 WossTest& setSspWoaDbType( WOADbType type) { ssp_woa_db_type = type; return *this; }
553
559#endif // defined (WOSS_NETCDF_SUPPORT)
560
566 WossTest& setBathyDbCreatorDebug( bool flag ) { bathy_db_creator_debug = flag; return *this; }
567
573
579 WossTest& setBathyDbDebug( bool flag ) { bathy_db_debug = flag; return *this; }
580
585 bool getBathyDbDebug() const { return bathy_db_debug; }
586
593
599
605 WossTest& setBathyDbFilePath(const std::string& path) { bathy_db_file_path = path; return *this; }
606
612 std::string getBathyDbFilePath() const { return bathy_db_file_path; }
613#endif // defined (WOSS_NETCDF_SUPPORT)
614
620 WossTest& setWossDbManagerDebug(bool flag) { woss_db_manager_debug = flag; return *this; }
621
627
633 WossTest& setWossCreatorDebug(bool flag) { woss_creator_debug = flag; return *this; }
634
640
646 WossTest& setWossDebug(bool flag) { woss_debug = flag; return *this; }
647
652 bool getWossDebug() const { return woss_debug; }
653
659 WossTest& setWossClearWorkDir(bool flag) { woss_clear_work_dir = flag; return *this; }
660
666
672 WossTest& setWossEvolutionTimeQuantum(double time) { evolution_time_quantum = time; return *this; }
673
679
686 WossTest& setWossTotalRuns(int runs) { total_runs = runs; return *this; }
687
693 int getWossTotalRuns() const { return total_runs; }
694
701 WossTest& setWossFrequencyStep(double step) { frequency_step = step; return *this; }
702
707 double getWossFrequencyStep() const { return frequency_step; }
708
715 WossTest& setWossTotalRangeSteps(double step) { total_range_steps = step; return *this; }
716
722 double getWossTotalRangeSteps() const { return total_range_steps; }
723
729 WossTest& setWossTxMinDepthOffset(double offset) { tx_min_depth_offset = offset; return *this; }
730
736
742 WossTest& setWossTxMaxDepthOffset(double offset) { tx_max_depth_offset = offset; return *this; }
743
749
755 WossTest& setWossTotalTransmitters(int transmitters) { total_transmitters = transmitters; return *this; }
756
762
768 WossTest& setWossTotalRxDepths(int rx_depths) { total_rx_depths = rx_depths; return *this; }
769
774 int getWossTotalRxDepths() const { return total_rx_depths; }
775
781 WossTest& setWossRxMinDepthOffset(double offset) { rx_min_depth_offset = offset; return *this; }
782
788
794 WossTest& setWossRxMaxDepthOffset(double offset) { rx_max_depth_offset = offset; return *this; }
795
801
807 WossTest& setWossTotalRxRanges(int rx_ranges) { total_rx_ranges = rx_ranges; return *this; }
808
813 int getWossTotalRxRanges() const { return total_rx_ranges; }
814
820 WossTest& setWossRxMinRangeOffset(double offset) { rx_min_range_offset = offset; return *this; }
821
827
833 WossTest& setWossRxMaxRangeOffset(double offset) { rx_max_range_offset = offset; return *this; }
834
840
846 WossTest& setWossTotalRays(double rays) { total_rays = rays; return *this; }
847
852 double getWossTotalRays() const { return total_rays; }
853
859 WossTest& setWossMinAngle(double angle) { min_angle = angle; return *this; }
860
865 double getWossMinAngle() const { return min_angle; }
866
872 WossTest& setWossMaxAngle(double angle) { max_angle = angle; return *this; }
873
878 double getWossMaxAngle() const { return max_angle; }
879
885 WossTest& setWossUseThorpeAtt(bool flag) {use_thorpe_att = flag; return *this; }
886
891 bool getWossUseThorpeAtt() const { return use_thorpe_att; }
892
898 WossTest& setWossSspDepthPrecision(double precision) { ssp_depth_precision = precision; return *this; }
899
906
912 WossTest& setWossNormalizedSspDepthSteps( double steps ) { normalized_ssp_depth_steps = steps; return *this; }
913
919
925 WossTest& setWossWorkDirPath(const std::string& path) { work_dir_path = path; return *this; }
926
931 std::string getWossWorkDirPath() const { return work_dir_path; }
932
938 WossTest& setWossBellhopPath(const std::string& path) { bellhop_path = path; return *this; }
939
944 std::string getWossBellhopPath() const { return bellhop_path; }
945
951 WossTest& setWossBellhopBinName(const std::string& name) { bellhop_bin_name = name; return *this; }
952
957 std::string getWossBellhopBinName() const { return bellhop_bin_name; }
958
964 WossTest& setWossBellhopMode(const std::string& mode) { bellhop_mode = mode; return *this; }
965
970 std::string getWossBellhopMode() const { return bellhop_mode; }
971
977 WossTest& setWossBellhopBeamOptions(const std::string& options) { bellhop_beam_options = options; return *this; }
978
983 std::string getWossBellhopBeamOptions() const { return bellhop_beam_options; }
984
990 WossTest& setWossBellhopBathyType(const std::string& type) { bellhop_bathy_type = type; return *this; }
991
996 std::string getWossBellhopBathyType() const { return bellhop_bathy_type; }
997
1003 WossTest& setWossBellhopBathyMethod(const std::string& type) { bellhop_bathy_method = type; return *this; }
1004
1009 std::string getWossBellhopBathyMethod() const { return bellhop_bathy_method; }
1010
1016 WossTest& setWossBellhopAltimType(const std::string& type) { bellhop_altim_type = type; return *this; }
1017
1022 std::string getWossBellhopAltimType() const { return bellhop_altim_type; }
1023
1030
1036
1043
1049
1055 WossTest& setWossSimTime(const SimTime& time) { sim_time = time; return *this; }
1056
1061 SimTime getWossSimTime() const { return sim_time; }
1062
1068 WossTest& setWossBoxDepth(double depth) { box_depth = depth; return *this; }
1069
1074 double getWossBoxDepth() const { return box_depth; }
1075
1081 WossTest& setWossBoxRange(double range) { box_range = range; return *this; }
1082
1087 double getWossBoxRange() const { return box_range; }
1088
1089
1095 WossTest& setWossManagerDebug(bool flag) { woss_manager_debug = flag; return *this; }
1096
1102
1108 WossTest& setWossManagerTimeEvoActive(bool flag) { time_evolution_active = flag; return *this; }
1109
1115
1121 WossTest& setWossManagerThreads(unsigned int threads) { concurrent_threads = threads; return *this; }
1122
1128
1134 WossTest& setWossManagerSpaceSampling(double sampling) { woss_manager_space_sampling = sampling; return *this; }
1135
1141
1148
1154
1161
1167
1174
1180
1186 WossTest& setWossControllerDebug(bool flag) { woss_controller_debug = flag; return *this; }
1187
1193
1194 protected:
1195
1196 bool debug;
1197
1198 std::unique_ptr<SSP> ssp_proto;
1199 std::unique_ptr<Sediment> sediment_proto;
1200 std::unique_ptr<Pressure> pressure_proto;
1201 std::unique_ptr<TimeArr> time_arr_proto;
1202 std::unique_ptr<Transducer> transducer_proto;
1203 std::unique_ptr<AltimBretschneider> altim_bret_proto;
1204 std::unique_ptr<Location> location_proto;
1206 std::unique_ptr<RandomGenerator> random_gen_proto;
1207 std::unique_ptr<TimeReference> time_ref_proto;
1208
1210
1217 std::string res_db_file_path;
1218 std::string res_db_file_name;
1219 std::shared_ptr<ResPressureBinDbCreator> res_db_creator_press_bin;
1220 std::shared_ptr<ResPressureTxtDbCreator> res_db_creator_press_txt;
1221 std::shared_ptr<ResTimeArrBinDbCreator> res_db_creator_time_arr_bin;
1222 std::shared_ptr<ResTimeArrTxtDbCreator> res_db_creator_time_arr_txt;
1223
1224#if defined (WOSS_NETCDF_SUPPORT)
1225#if defined (WOSS_NETCDF4_SUPPORT)
1227#endif // defined (WOSS_NETCDF4_SUPPORT)
1233 std::shared_ptr<SedimDeck41DbCreator> sedim_db_creator;
1234
1237 std::string ssp_db_file_path;
1238#if defined (WOSS_NETCDF4_SUPPORT)
1240#endif // defined (WOSS_NETCDF_SUPPORT)
1241 std::shared_ptr<SspWoa2005DbCreator> ssp_db_creator;
1242
1247 std::shared_ptr<BathyGebcoDbCreator> bathy_db_creator;
1248#endif // defined (WOSS_NETCDF_SUPPORT)
1249
1251
1252 std::shared_ptr<WossDbManager> woss_db_manager;
1253
1270 double total_rays;
1271 double min_angle;
1272 double max_angle;
1276 std::string work_dir_path;
1277 std::string bellhop_path;
1278 std::string bellhop_bin_name;
1279 std::string bellhop_mode;
1287 std::shared_ptr<BellhopCreator> bellhop_creator;
1288 double box_depth;
1289 double box_range;
1290
1293 unsigned int concurrent_threads;
1297 std::shared_ptr< WossManagerSimple<WossManagerResDb> > woss_manager_simple;
1298 std::shared_ptr< WossManagerSimple<WossManagerResDbMT> > woss_manager_multi;
1299
1301 std::shared_ptr<TransducerHandler> woss_transducer_handler;
1302
1304 std::shared_ptr<WossController> woss_controller;
1305
1307
1312 void config();
1313
1318 void init();
1319
1324 virtual void doConfig() = 0;
1325
1330 virtual void doInit() = 0;
1331
1336 virtual void doRun() = 0;
1337
1338 };
1339
1340}
1341
1342#endif /* WOSS_TEST_H */
Definitions and library for woss::Altimetry class.
Provides the interface for woss::BathyGebcoDbCreator class.
Provides the interface for woss::BellhopCreator class.
Class for managing dynamic instantiation of foundation classes.
Definition definitions-handler.h:63
virtual double getTimeReference() const
Definition woss-test.h:236
TestTimeReference(const TestTimeReference &copy)=default
double time_reference
Definition woss-test.h:243
virtual std::unique_ptr< TimeReference > clone() const override
Definition woss-test.h:225
TestTimeReference(TestTimeReference &&tmp)=default
TestTimeReference()
Definition woss-test.h:211
void setTimeReference(double time)
Definition woss-test.h:231
virtual ~TestTimeReference() override=default
Class for simulation time reference purposes.
Definition time-definitions.h:54
WossException(WossErrorType error_type_, const char *file_, int line_, const char *func_, const char *info_)
Definition woss-test.cpp:80
static constexpr int CHAR_ARR_LENGTH
Definition woss-test.h:95
const char * getFile() const
Definition woss-test.h:139
char file[CHAR_ARR_LENGTH]
Definition woss-test.h:176
static void printAndExit(const std::exception *e)
Definition woss-test.cpp:101
const char * getFunc() const
Definition woss-test.h:151
WossException(const WossException &copy)=default
WossErrorType error_type
Definition woss-test.h:171
WossErrorType getErrorType() const
Definition woss-test.h:133
char what_str[4 *CHAR_ARR_LENGTH]
Definition woss-test.h:193
int getLine() const
Definition woss-test.h:145
const char * getInfo() const
Definition woss-test.h:157
char func[CHAR_ARR_LENGTH]
Definition woss-test.h:185
int line
Definition woss-test.h:181
char info[CHAR_ARR_LENGTH]
Definition woss-test.h:189
virtual const char * what() const
Definition woss-test.cpp:95
virtual ~WossException() override=default
double min_angle
woss object configuration: minimum vertical angle in decimal degrees
Definition woss-test.h:1271
double getWossMinAngle() const
Definition woss-test.h:865
bool res_db_use_time_arr
set up the woss result databases data format: power delay profile.
Definition woss-test.h:1214
std::unique_ptr< Sediment > sediment_proto
Sediment prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1199
std::shared_ptr< ResPressureBinDbCreator > res_db_creator_press_bin
the helper will automatically allocate the desired result database creator based on current configura...
Definition woss-test.h:1219
WossTest & setWossBellhopArraySyntax(BellhopArrSyntax syntax)
Definition woss-test.h:1029
WossTest & setBathyDbDebug(bool flag)
Definition woss-test.h:579
void config()
Definition woss-test.cpp:230
WossTest & setBathyDbCreatorDebug(bool flag)
Definition woss-test.h:566
bool woss_db_manager_debug
enable/disable the debug prints of the woss DB manager object.
Definition woss-test.h:1250
bool getWossUseThorpeAtt() const
Definition woss-test.h:891
WossTest & setWossSspDepthPrecision(double precision)
Definition woss-test.h:898
double getWossTxMaxDepthOffset() const
Definition woss-test.h:748
WossTest & setWossBellhopShdSyntax(BellhopShdSyntax syntax)
Definition woss-test.h:1042
double evolution_time_quantum
woss object configuration: evolution time quantum
Definition woss-test.h:1257
WossTest & setWossManagerDebug(bool flag)
Definition woss-test.h:1095
WossTest & setWossMinAngle(double angle)
Definition woss-test.h:859
bool bathy_db_creator_debug
enable/disable the debug prints of the woss Bathymetry database creator.
Definition woss-test.h:1243
bool getWossDbManagerDebug() const
Definition woss-test.h:626
double getWossNormalizedSspDepthSteps() const
Definition woss-test.h:918
WossTest & setWossManagerUseMultiThread(bool flag)
Definition woss-test.h:1147
double ssp_depth_precision
woss object configuration: SSP depth precision in meters
Definition woss-test.h:1274
double getWossRxMaxRangeOffset() const
Definition woss-test.h:839
WossTest & setWossFrequencyStep(double step)
Definition woss-test.h:701
unsigned int concurrent_threads
number of concurrent threads (0 = auto).
Definition woss-test.h:1293
std::unique_ptr< TimeArr > time_arr_proto
TimeArr prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1201
double rx_max_range_offset
woss object configuration: receiver max range offset in meters
Definition woss-test.h:1269
bool ssp_db_debug
enable/disable the debug prints of the woss SSP database.
Definition woss-test.h:1236
WossTest(const WossTest &copy)=delete
int total_rx_ranges
woss object configuration: receiver range sampling
Definition woss-test.h:1267
bool getBathyDbCreatorDebug() const
Definition woss-test.h:572
double woss_manager_space_sampling
woss manager space sampling in meters
Definition woss-test.h:1294
WossTest & setWossTotalRangeSteps(double step)
Definition woss-test.h:715
bool getWossManagerTimeEvoActive() const
Definition woss-test.h:1114
std::string sedim_db_marsden_one_file_path
setup the path of the sediment database indexed by geographical coordinates with marsden one square r...
Definition woss-test.h:1232
WossTest & setSedimDbCoordFilePath(const std::string &path)
Definition woss-test.h:473
std::string res_db_file_path
set up the woss result database file path
Definition woss-test.h:1217
bool getResDbDebug() const
Definition woss-test.h:344
double getWossRxMinRangeOffset() const
Definition woss-test.h:826
BellhopArrSyntax bellhop_arr_syntax
woss object configration: Bellhop Arr file syntax to be used during .arr file parsing
Definition woss-test.h:1284
WossTest & setWossTotalRxDepths(int rx_depths)
Definition woss-test.h:768
double normalized_ssp_depth_steps
woss object configuration: SSP depth quantization steps
Definition woss-test.h:1275
int total_runs
woss object configuration: total number of channel simulator runs
Definition woss-test.h:1258
BellhopShdSyntax bellhop_shd_syntax
woss object configration: Bellhop Shd file syntax to be used during .shd file parsing
Definition woss-test.h:1285
bool res_db_use_pressure
set up the woss result databases data format: single pressure tap.
Definition woss-test.h:1215
double tx_max_depth_offset
woss object configuration: transmitter max offset in meters
Definition woss-test.h:1262
std::shared_ptr< WossManagerSimple< WossManagerResDb > > woss_manager_simple
the helper will automatically allocate the desired woss manager based on current configuration.
Definition woss-test.h:1297
WossTest & setWossBellhopBeamOptions(const std::string &options)
Definition woss-test.h:977
double getWossTxMinDepthOffset() const
Definition woss-test.h:735
double getResDbSpaceSampling() const
Definition woss-test.h:398
WossTest & setSedimDbDebug(bool flag)
Definition woss-test.h:460
WossTest & setWossTotalTransmitters(int transmitters)
Definition woss-test.h:755
WossTest & setWossBellhopBathyMethod(const std::string &type)
Definition woss-test.h:1003
virtual void doInit()=0
WossTest & setWossTxMaxDepthOffset(double offset)
Definition woss-test.h:742
WossTest & setResDbDebug(bool flag)
Definition woss-test.h:338
WossTest & operator=(WossTest &&tmp)=delete
double getWossRxMinDepthOffset() const
Definition woss-test.h:787
double getWossTotalRays() const
Definition woss-test.h:852
bool time_evolution_active
enable/disable the time evolution feature.
Definition woss-test.h:1292
WossTest & setWossRxMinDepthOffset(double offset)
Definition woss-test.h:781
std::string getResDbFilePath() const
Definition woss-test.h:411
int getWossTotalRxDepths() const
Definition woss-test.h:774
bool res_db_debug
enable/disable the debug prints of the woss result databases.
Definition woss-test.h:1212
bool getResDbUseTimeArr() const
Definition woss-test.h:371
std::string getResDbFileName() const
Definition woss-test.h:424
double frequency_step
woss object configuration: number of frequency steps
Definition woss-test.h:1259
virtual ~WossTest()=default
bool getSspDbCreatorDebug() const
Definition woss-test.h:518
WossTest & setWossBellhopPath(const std::string &path)
Definition woss-test.h:938
bool woss_controller_debug
enable/disable the debug prints of the woss conteroller
Definition woss-test.h:1303
bool getWossClearWorkDir() const
Definition woss-test.h:665
WossTest & setBathyDbGebcoFormat(GEBCO_BATHY_TYPE type)
Definition woss-test.h:592
std::unique_ptr< TimeReference > time_ref_proto
TimeReference prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1207
std::string res_db_file_name
set up the woss result database file name (without path)
Definition woss-test.h:1218
WossTest & setWossTransducerHandlerDebug(bool flag)
Definition woss-test.h:1173
double max_angle
woss object configuration: maximum vertical angle in decimal degrees
Definition woss-test.h:1272
WossTest & setWossManagerUseThreadPool(bool flag)
Definition woss-test.h:1160
std::unique_ptr< RandomGenerator > random_gen_proto
RandomGenerator prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1206
std::string getWossBellhopBathyType() const
Definition woss-test.h:996
double res_db_space_sampling
set up the woss result database 2D spatial sampling
Definition woss-test.h:1216
WossTest & setWossDebug(bool flag)
Definition woss-test.h:646
double rx_max_depth_offset
woss object configuration: receiver max depth offset in meters
Definition woss-test.h:1266
std::shared_ptr< WossManagerSimple< WossManagerResDbMT > > woss_manager_multi
the helper will automatically allocate the desired woss manaeger based on current configuration.
Definition woss-test.h:1298
bool getSedimDbDebug() const
Definition woss-test.h:466
bool res_db_use_binary
set up the woss result database format: binary or textual.
Definition woss-test.h:1213
DefHandler & def_handler
Definition Handler object allocated by the helper.
Definition woss-test.h:1209
double getWossRxMaxDepthOffset() const
Definition woss-test.h:800
std::string getWossWorkDirPath() const
Definition woss-test.h:931
WossTest & setSedimDeck41DbType(DECK41DbType type)
Definition woss-test.h:433
int total_rx_depths
woss object configuration: receiver depth sampling
Definition woss-test.h:1264
WossTest & setWossManagerTimeEvoActive(bool flag)
Definition woss-test.h:1108
SimTime getWossSimTime() const
Definition woss-test.h:1061
bool getSspDbDebug() const
Definition woss-test.h:531
bool getWossCreatorDebug() const
Definition woss-test.h:639
WossTest & setWossMaxAngle(double angle)
Definition woss-test.h:872
WossTest & setWossRandomGenStream(int stream)
Definition woss-test.h:312
std::string getBathyDbFilePath() const
Definition woss-test.h:612
WossTest(WossTest &&tmp)=delete
DECK41DbType getSedimDeck41DbType() const
Definition woss-test.h:439
double rx_min_range_offset
woss object configuration: receiver min range offset in meters
Definition woss-test.h:1268
WossTest & setWossManagerSpaceSampling(double sampling)
Definition woss-test.h:1134
DECK41DbType sedim_deck41_db_type
DECK41 db data format type.
Definition woss-test.h:1226
bool sedim_db_creator_debug
enable/disable the debug prints of the woss sediment database creator.
Definition woss-test.h:1228
double getWossEvolutionTimeQuantum() const
Definition woss-test.h:678
double box_range
woss object configuration: maximum range to trace rats to; longer rays will be ignored
Definition woss-test.h:1289
std::string ssp_db_file_path
setup the path of the woss monthly SSP database indexed by geographical coordinates
Definition woss-test.h:1237
double getWossTotalRangeSteps() const
Definition woss-test.h:722
std::string getSedimDbMarsdenOneFilePath() const
Definition woss-test.h:505
WossTest & setWossTotalRxRanges(int rx_ranges)
Definition woss-test.h:807
std::shared_ptr< BellhopCreator > bellhop_creator
the helper will automatically allocate the woss creator
Definition woss-test.h:1287
WossTest & setWossRxMaxDepthOffset(double offset)
Definition woss-test.h:794
bool woss_transducer_handler_debug
enable/disable the debug prints of the woss transducer handler.
Definition woss-test.h:1300
WossTest & setSedimDbCreatorDebug(bool flag)
Definition woss-test.h:447
double getWossBoxDepth() const
Definition woss-test.h:1074
WossTest & setWossRxMinRangeOffset(double offset)
Definition woss-test.h:820
bool woss_manager_use_multithread
enable/disable the multithread feature
Definition woss-test.h:1295
std::string bellhop_path
woss object configuration: path of the Bellhop executable
Definition woss-test.h:1277
int getWossRandomGenStream() const
Definition woss-test.h:318
WossTest & setResDbUseBinary(bool flag)
Definition woss-test.h:351
WossTest & setWossTotalRays(double rays)
Definition woss-test.h:846
BellhopShdSyntax getWossBellhopShdSyntax() const
Definition woss-test.h:1048
std::string bellhop_bathy_type
woss object configuration: Bellhop bathymetry type string
Definition woss-test.h:1281
WossTest & setWossTxMinDepthOffset(double offset)
Definition woss-test.h:729
std::shared_ptr< WossController > woss_controller
the helper will automatically allocate the woss controller.
Definition woss-test.h:1304
int getWossTotalTransmitters() const
Definition woss-test.h:761
GEBCO_BATHY_TYPE bathy_db_gebco_format
setup the the GEBCO database format
Definition woss-test.h:1245
std::string getSspDbFilePath() const
Definition woss-test.h:544
std::string getSedimDbCoordFilePath() const
Definition woss-test.h:479
SimTime sim_time
woss object configuration: woss simulation times (start and end sim times)
Definition woss-test.h:1286
std::string getWossBellhopBeamOptions() const
Definition woss-test.h:983
WossTest & setWossBellhopBathyType(const std::string &type)
Definition woss-test.h:990
bool debug
debug flag
Definition woss-test.h:1196
std::string work_dir_path
woss object configuration: path of the temporary directory
Definition woss-test.h:1276
virtual void doConfig()=0
bool ssp_db_creator_debug
enable/disable the debug prints of the woss SSP database creator.
Definition woss-test.h:1235
WossTest & setSedimDbMarsdenFilePath(const std::string &path)
Definition woss-test.h:486
bool woss_manager_debug
enable/disable the debug prints of the woss manager.
Definition woss-test.h:1291
std::unique_ptr< Location > location_proto
Location prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1204
bool getResDbCreatorDebug() const
Definition woss-test.h:331
WossTest & setWossEvolutionTimeQuantum(double time)
Definition woss-test.h:672
WossTest & setWossSimTime(const SimTime &time)
Definition woss-test.h:1055
WossTest & setSspDbFilePath(const std::string &path)
Definition woss-test.h:538
std::unique_ptr< SSP > ssp_proto
SSP prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1198
bool sedim_db_debug
enable/disable the debug prints of the woss sediment database.
Definition woss-test.h:1229
std::unique_ptr< Pressure > pressure_proto
Pressure prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1200
WossTest & setWossCreatorDebug(bool flag)
Definition woss-test.h:633
std::shared_ptr< BathyGebcoDbCreator > bathy_db_creator
the helper will automatically allocate the woss GEBCO bathymetry db creator
Definition woss-test.h:1247
bool initialized
initialization complete flag.
Definition woss-test.h:1306
WOADbType getSspWoaDbType() const
Definition woss-test.h:558
WossTest & setWossBellhopBinName(const std::string &name)
Definition woss-test.h:951
bool woss_clear_work_dir
woss object configuration: clear the temporary files created by the underlying channel simulator
Definition woss-test.h:1256
WossTest & setBathyDbFilePath(const std::string &path)
Definition woss-test.h:605
std::string sedim_db_marsden_file_path
setup the path of the sediment database indexed by geographical coordinates with marsden square resol...
Definition woss-test.h:1231
std::shared_ptr< ResPressureTxtDbCreator > res_db_creator_press_txt
the helper will automatically allocate the desired result database creator based on current configura...
Definition woss-test.h:1220
bool woss_creator_debug
enable/disable the debug prints of the woss creator.
Definition woss-test.h:1254
bool getWossManagerUseMultiThread() const
Definition woss-test.h:1153
WossTest & setWossBellhopAltimType(const std::string &type)
Definition woss-test.h:1016
double tx_min_depth_offset
woss object configuration: transmitter min offset in meters
Definition woss-test.h:1261
bool use_thorpe_att
woss object configuration: use thorpe attenuation in channel computation
Definition woss-test.h:1273
WossTest & setSspWoaDbType(WOADbType type)
Definition woss-test.h:552
std::shared_ptr< SedimDeck41DbCreator > sedim_db_creator
the helper will automatically allocate the woss sediment database creator
Definition woss-test.h:1233
bool getWossDebug() const
Definition woss-test.h:652
double getWossManagerSpaceSampling() const
Definition woss-test.h:1140
double total_rays
woss object configuration: total number of rays (0 = automatic)
Definition woss-test.h:1270
bool getResDbUseBinary() const
Definition woss-test.h:357
WossTest & setResDbCreatorDebug(bool flag)
Definition woss-test.h:325
WossTest & setSspDbCreatorDebug(bool flag)
Definition woss-test.h:512
bool getWossManagerDebug() const
Definition woss-test.h:1101
double getWossBoxRange() const
Definition woss-test.h:1087
bool getWossTransducerHandlerDebug() const
Definition woss-test.h:1179
WossTest & setWossControllerDebug(bool flag)
Definition woss-test.h:1186
WossTest & setResDbFileName(const std::string &file_name)
Definition woss-test.h:418
std::string sedim_db_coord_file_path
setup the path of the sediment database indexed by geographical coordinates with decimal degrees reso...
Definition woss-test.h:1230
double getWossSspDepthPrecision() const
Definition woss-test.h:905
bool woss_manager_use_thread_pool
enable/disable woss::ThreadPool usage
Definition woss-test.h:1296
WossTest & setWossClearWorkDir(bool flag)
Definition woss-test.h:659
int getWossTotalRuns() const
Definition woss-test.h:693
std::shared_ptr< WossDbManager > woss_db_manager
the helper will automatically allocate the woss DB manager
Definition woss-test.h:1252
double getWossFrequencyStep() const
Definition woss-test.h:707
WossTest & setWossWorkDirPath(const std::string &path)
Definition woss-test.h:925
WossTest & setWossBoxRange(double range)
Definition woss-test.h:1081
double rx_min_depth_offset
woss object configuration: receiver min depth offset in meters
Definition woss-test.h:1265
WossTest & setWossDbManagerDebug(bool flag)
Definition woss-test.h:620
std::shared_ptr< TransducerHandler > woss_transducer_handler
the helper will automatically allocate the woss Transducer handler.
Definition woss-test.h:1301
std::string bathy_db_file_path
setup the path of the woss GEBCO database
Definition woss-test.h:1246
std::string bellhop_beam_options
woss object configuration: Bellhop beam option string
Definition woss-test.h:1280
bool getWossControllerDebug() const
Definition woss-test.h:1192
WossTest & setWossUseThorpeAtt(bool flag)
Definition woss-test.h:885
bool res_db_creator_debug
enable/disable the debug prints of the woss results database creator.
Definition woss-test.h:1211
WossTest & setWossBoxDepth(double depth)
Definition woss-test.h:1068
std::string getWossBellhopBinName() const
Definition woss-test.h:957
std::string getWossBellhopPath() const
Definition woss-test.h:944
int getWossManagerThreads() const
Definition woss-test.h:1127
int getWossTotalRxRanges() const
Definition woss-test.h:813
int total_transmitters
woss object configuration: total number of transmitting sources
Definition woss-test.h:1263
bool getSedimDbCreatorDebug() const
Definition woss-test.h:453
std::string bellhop_bathy_method
woss object configuration: Bathymetry write method string
Definition woss-test.h:1282
std::string getWossBellhopBathyMethod() const
Definition woss-test.h:1009
WossTest & setSedimDbMarsdenOneFilePath(const std::string &path)
Definition woss-test.h:499
WossTest & setResDbSpaceSampling(double sampling)
Definition woss-test.h:392
WossTest & setSspDbDebug(bool flag)
Definition woss-test.h:525
BellhopArrSyntax getWossBellhopArraySyntax() const
Definition woss-test.h:1035
double getWossMaxAngle() const
Definition woss-test.h:878
double box_depth
woss object configuration: maximum depth to trace rays to; deeper rays will be ignored
Definition woss-test.h:1288
WossTest()
Definition woss-test.cpp:116
WossTest & setWossTestDebug(bool flag)
Definition woss-test.h:299
std::string bellhop_bin_name
woss object configuration: Bellhop binary name
Definition woss-test.h:1278
std::shared_ptr< SspWoa2005DbCreator > ssp_db_creator
the helper will automatically allocate the woss sediment database creator
Definition woss-test.h:1241
std::unique_ptr< Transducer > transducer_proto
Transducer prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1202
GEBCO_BATHY_TYPE getBathyDbGebcoFormat() const
Definition woss-test.h:598
bool woss_debug
enable/disable the debug prints of all woss objects
Definition woss-test.h:1255
std::string bellhop_mode
woss object configuration: Bellhop mode string
Definition woss-test.h:1279
std::shared_ptr< ResTimeArrTxtDbCreator > res_db_creator_time_arr_txt
the helper will automatically allocate the desired result database creator based on current configura...
Definition woss-test.h:1222
std::unique_ptr< AltimBretschneider > altim_bret_proto
AltimBretschneider prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1203
std::string getSedimDbMarsdenFilePath() const
Definition woss-test.h:492
bool bathy_db_debug
enable/disable the debug prints of the woss Bathymetry database (GEBCO).
Definition woss-test.h:1244
WossTest & setWossRxMaxRangeOffset(double offset)
Definition woss-test.h:833
WossTest & setResDbUsePressure(bool flag)
Definition woss-test.h:379
WossTest & setWossBellhopMode(const std::string &mode)
Definition woss-test.h:964
std::string getWossBellhopMode() const
Definition woss-test.h:970
WossTest & setWossNormalizedSspDepthSteps(double steps)
Definition woss-test.h:912
double total_range_steps
woss object configuration: tx - rx range sampling in meters
Definition woss-test.h:1260
void run()
Definition woss-test.cpp:443
WossTest & setWossTotalRuns(int runs)
Definition woss-test.h:686
bool getBathyDbDebug() const
Definition woss-test.h:585
bool getResDbUsePressure() const
Definition woss-test.h:385
std::string bellhop_altim_type
woss object configuration: Bellhop Altimetry type string
Definition woss-test.h:1283
WossTest & setWossManagerThreads(unsigned int threads)
Definition woss-test.h:1121
bool getWossTestDebug() const
Definition woss-test.h:305
WossTest & operator=(const WossTest &copy)=delete
virtual void doRun()=0
std::string getWossBellhopAltimType() const
Definition woss-test.h:1022
void init()
Definition woss-test.cpp:235
WossTest & setResDbFilePath(const std::string &path)
Definition woss-test.h:405
WOADbType ssp_woa_db_type
WOA SSP Db Type.
Definition woss-test.h:1239
bool getWossManagerUseThreadPool() const
Definition woss-test.h:1166
int woss_random_gen_stream
random generator used by the WOSS framework.
Definition woss-test.h:1205
std::shared_ptr< ResTimeArrBinDbCreator > res_db_creator_time_arr_bin
the helper will automatically allocate the desired result database creator based on current configura...
Definition woss-test.h:1221
WossTest & setResDbUseTimeArr(bool flag)
Definition woss-test.h:365
Definition ac-toolbox-arr-asc-reader.h:44
WOADbType
Definition ssp-woa2005-db.h:98
DECK41DbType
Definition sediment-deck41-coord-db.h:75
WossErrorType
Definition woss-test.h:68
@ WOSS_ERROR_INSUFFICIENT_PERMISSIONS
the requester of the operation does not have sufficient permissions (access rights etc)
Definition woss-test.h:76
@ WOSS_ERROR_OUT_OF_RANGE_PARAM
a parameter passed to the function is outside the valid range
Definition woss-test.h:71
@ WOSS_ERROR_UNKNOWN
Definition woss-test.h:79
@ WOSS_ERROR_NO_ERROR
Definition woss-test.h:69
@ WOSS_ERROR_OUT_OF_HANDLES
there is no free handle available
Definition woss-test.h:78
@ WOSS_ERROR_INVALID_PARAM
a parameter passed to the function is invalid
Definition woss-test.h:72
@ WOSS_ERROR_IO_ERROR
an I/O error occurred
Definition woss-test.h:77
@ WOSS_ERROR_OUT_OF_MEMORY
out of memory
Definition woss-test.h:70
@ WOSS_ERROR_UNEXPECTED_EXCEPTION
Definition woss-test.h:80
@ WOSS_ERROR_WRONG_STATE
the requested operation is not possible/allowed in the current state
Definition woss-test.h:74
@ WOSS_ERROR_TIMEOUT
timeout has occurred
Definition woss-test.h:73
@ WOSS_ERROR_BAD_FORMAT
data is not in the expected format
Definition woss-test.h:75
BellhopArrSyntax
Definition bellhop-woss.h:63
BellhopShdSyntax
Definition bellhop-woss.h:73
GEBCO_BATHY_TYPE
Definition bathymetry-gebco-db.h:114
Definitions and library for woss::Pressure class.
Provides the interface for woss::ResPressureBinDbCreator class.
Provides the interface for woss::ResPressureTxtDbCreator class.
Provides the interface for woss::ResTimeArrBinDbCreator class.
Provides the interface for woss::ResTimeArrTxtDbCreator class.
Provides the interface for woss::SedimDeck41DbCreator class.
Definitions and library for woss::Sediment class.
Definitions and library for Sound Speed Profiles.
Provides the interface for woss::SspWoa2005DbCreator class.
Struct that stores start and end Time.
Definition time-definitions.h:336
Definitions and library for woss::TimeArr class.
Provides the interface for the woss::Transducer class.
Provides the interface for the woss::transducer::TransducerHandler class.
Provides the interface for woss::WossController class.
Provides the interface for woss::WossManagerSimple class.