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
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 <source_location>
43#include <ssp-definitions.h>
49#include <transducer-handler.h>
54#if defined (WOSS_NETCDF_SUPPORT)
58#endif // defined (WOSS_NETCDF_SUPPORT)
59#include <bellhop-creator.h>
60#include <woss-manager-simple.h>
61#include <woss-controller.h>
62
63
64namespace woss {
65
83
89 class WossException : public std::exception {
90
91 public:
92
96 static constexpr inline int CHAR_ARR_LENGTH = 250;
97
106 WossException(WossErrorType error_type_, const char* file_, int line_, const char* func_, const char* info_);
107
111 WossException(const WossException& copy) = default;
112
116 virtual ~WossException() throw () override = default;
117
122 WossException& operator=(const WossException& copy) = default;
123
128 virtual const char* what() const throw();
129
135
140 const char* getFile() const { return file; }
141
146 int getLine() const { return line; }
147
152 const char* getFunc() const { return func; }
153
158 const char* getInfo() const { return info; }
159
164 static void printAndExit(const std::exception* e);
165
166
167 protected:
168
173
178
182 int line;
195
196 };
197
198 #define WOSS_EXCEPTION_INFO(err_type, info) WossException(err_type, __FILE__, __LINE__, __FUNCTION__, info)
199
200 #define WOSS_EXCEPTION(err_type) WossException(err_type, __FILE__, __LINE__, __FUNCTION__, "")
201
206
207 public:
208
215
216 TestTimeReference(const TestTimeReference& copy) = default;
217
219
220 virtual ~TestTimeReference() override = default;
221
226 virtual std::unique_ptr<TimeReference> clone() const override { return std::make_unique<TestTimeReference>(*this); }
227
232 void setTimeReference(double time) { time_reference = time; }
237 virtual double getTimeReference() const { return time_reference; }
238
239 private:
240
245
246 };
247
253 class WossTest {
254
255 public:
256
260 WossTest();
261
262 virtual ~WossTest() = default;
263
268 WossTest(const WossTest& copy) = delete;
269
274 WossTest(WossTest&& tmp) = delete;
275
280 WossTest& operator=(const WossTest& copy) = delete;
281
286 WossTest& operator=(WossTest&& tmp) = delete;
287
293 void run();
294
300 WossTest& setWossTestDebug(bool flag) { debug = flag; return *this; }
301
306 bool getWossTestDebug() const { return debug; }
307
313 WossTest& setWossRandomGenStream(int stream) { woss_random_gen_stream = stream; return *this;}
314
320
326 WossTest& setResDbCreatorDebug(bool flag) { res_db_creator_debug = flag; return *this; }
327
333
339 WossTest& setResDbDebug(bool flag) { res_db_debug = flag; return *this; }
340
345 bool getResDbDebug() const { return res_db_debug; }
346
352 WossTest& setResDbUseBinary(bool flag) { res_db_use_binary = flag; return *this; }
353
358 bool getResDbUseBinary() const { return res_db_use_binary; }
359
366 WossTest& setResDbUseTimeArr(bool flag) { res_db_use_time_arr = flag; return *this; }
367
373
380 WossTest& setResDbUsePressure(bool flag) { res_db_use_pressure = flag; return *this; }
381
387
393 WossTest& setResDbSpaceSampling(double sampling) { res_db_space_sampling = sampling; return *this; }
394
400
406 WossTest& setResDbFilePath(const std::string& path) { res_db_file_path = path; return *this; }
407
412 std::string getResDbFilePath() const { return res_db_file_path; }
413
419 WossTest& setResDbFileName(const std::string& file_name) { res_db_file_name = file_name; return *this; }
420
425 std::string getResDbFileName() const { return res_db_file_name; }
426
427#if defined (WOSS_NETCDF_SUPPORT)
428#if defined (WOSS_NETCDF4_SUPPORT)
435
441#endif // defined (WOSS_NETCDF4_SUPPORT)
442
448 WossTest& setSedimDbCreatorDebug( bool flag ) { sedim_db_creator_debug = flag; return *this; }
449
455
461 WossTest& setSedimDbDebug(bool flag) { sedim_db_debug = flag; return *this; }
462
467 bool getSedimDbDebug() const { return sedim_db_debug; }
468
474 WossTest& setSedimDbCoordFilePath(const std::string& path) { sedim_db_coord_file_path = path; return *this; }
475
480 std::string getSedimDbCoordFilePath() const { return sedim_db_coord_file_path; }
481
487 WossTest& setSedimDbMarsdenFilePath(const std::string& path) { sedim_db_marsden_file_path = path; return *this; }
488
494
500 WossTest& setSedimDbMarsdenOneFilePath(const std::string& path) { sedim_db_marsden_one_file_path = path; return *this; }
501
507
513 WossTest& setSspDbCreatorDebug( bool flag ) { ssp_db_creator_debug = flag; return *this; }
514
520
526 WossTest& setSspDbDebug( bool flag ) { ssp_db_debug = flag; return *this; }
527
532 bool getSspDbDebug() const { return ssp_db_debug; }
533
539 WossTest& setSspDbFilePath(const std::string& path) { ssp_db_file_path = path; return *this; }
540
545 std::string getSspDbFilePath() const { return ssp_db_file_path; }
546
547#if defined (WOSS_NETCDF4_SUPPORT)
553 WossTest& setSspWoaDbType( WOADbType type) { ssp_woa_db_type = type; return *this; }
554
560#endif // defined (WOSS_NETCDF_SUPPORT)
561
567 WossTest& setBathyDbCreatorDebug( bool flag ) { bathy_db_creator_debug = flag; return *this; }
568
574
580 WossTest& setBathyDbDebug( bool flag ) { bathy_db_debug = flag; return *this; }
581
586 bool getBathyDbDebug() const { return bathy_db_debug; }
587
594
600
606 WossTest& setBathyDbFilePath(const std::string& path) { bathy_db_file_path = path; return *this; }
607
613 std::string getBathyDbFilePath() const { return bathy_db_file_path; }
614#endif // defined (WOSS_NETCDF_SUPPORT)
615
621 WossTest& setWossDbManagerDebug(bool flag) { woss_db_manager_debug = flag; return *this; }
622
628
634 WossTest& setWossCreatorDebug(bool flag) { woss_creator_debug = flag; return *this; }
635
641
647 WossTest& setWossDebug(bool flag) { woss_debug = flag; return *this; }
648
653 bool getWossDebug() const { return woss_debug; }
654
660 WossTest& setWossClearWorkDir(bool flag) { woss_clear_work_dir = flag; return *this; }
661
667
673 WossTest& setWossEvolutionTimeQuantum(double time) { evolution_time_quantum = time; return *this; }
674
680
687 WossTest& setWossTotalRuns(int runs) { total_runs = runs; return *this; }
688
694 int getWossTotalRuns() const { return total_runs; }
695
702 WossTest& setWossFrequencyStep(double step) { frequency_step = step; return *this; }
703
708 double getWossFrequencyStep() const { return frequency_step; }
709
716 WossTest& setWossTotalRangeSteps(double step) { total_range_steps = step; return *this; }
717
723 double getWossTotalRangeSteps() const { return total_range_steps; }
724
730 WossTest& setWossTxMinDepthOffset(double offset) { tx_min_depth_offset = offset; return *this; }
731
737
743 WossTest& setWossTxMaxDepthOffset(double offset) { tx_max_depth_offset = offset; return *this; }
744
750
756 WossTest& setWossTotalTransmitters(int transmitters) { total_transmitters = transmitters; return *this; }
757
763
769 WossTest& setWossTotalRxDepths(int rx_depths) { total_rx_depths = rx_depths; return *this; }
770
775 int getWossTotalRxDepths() const { return total_rx_depths; }
776
782 WossTest& setWossRxMinDepthOffset(double offset) { rx_min_depth_offset = offset; return *this; }
783
789
795 WossTest& setWossRxMaxDepthOffset(double offset) { rx_max_depth_offset = offset; return *this; }
796
802
808 WossTest& setWossTotalRxRanges(int rx_ranges) { total_rx_ranges = rx_ranges; return *this; }
809
814 int getWossTotalRxRanges() const { return total_rx_ranges; }
815
821 WossTest& setWossRxMinRangeOffset(double offset) { rx_min_range_offset = offset; return *this; }
822
828
834 WossTest& setWossRxMaxRangeOffset(double offset) { rx_max_range_offset = offset; return *this; }
835
841
847 WossTest& setWossTotalRays(double rays) { total_rays = rays; return *this; }
848
853 double getWossTotalRays() const { return total_rays; }
854
860 WossTest& setWossMinAngle(double angle) { min_angle = angle; return *this; }
861
866 double getWossMinAngle() const { return min_angle; }
867
873 WossTest& setWossMaxAngle(double angle) { max_angle = angle; return *this; }
874
879 double getWossMaxAngle() const { return max_angle; }
880
886 WossTest& setWossUseThorpeAtt(bool flag) {use_thorpe_att = flag; return *this; }
887
892 bool getWossUseThorpeAtt() const { return use_thorpe_att; }
893
899 WossTest& setWossSspDepthPrecision(double precision) { ssp_depth_precision = precision; return *this; }
900
907
913 WossTest& setWossNormalizedSspDepthSteps( double steps ) { normalized_ssp_depth_steps = steps; return *this; }
914
920
926 WossTest& setWossWorkDirPath(const std::string& path) { work_dir_path = path; return *this; }
927
932 std::string getWossWorkDirPath() const { return work_dir_path; }
933
939 WossTest& setWossBellhopPath(const std::string& path) { bellhop_path = path; return *this; }
940
945 std::string getWossBellhopPath() const { return bellhop_path; }
946
952 WossTest& setWossBellhopMode(const std::string& mode) { bellhop_mode = mode; return *this; }
953
958 std::string getWossBellhopMode() const { return bellhop_mode; }
959
965 WossTest& setWossBellhopBeamOptions(const std::string& options) { bellhop_beam_options = options; return *this; }
966
971 std::string getWossBellhopBeamOptions() const { return bellhop_beam_options; }
972
978 WossTest& setWossBellhopBathyType(const std::string& type) { bellhop_bathy_type = type; return *this; }
979
984 std::string getWossBellhopBathyType() const { return bellhop_bathy_type; }
985
991 WossTest& setWossBellhopBathyMethod(const std::string& type) { bellhop_bathy_method = type; return *this; }
992
997 std::string getWossBellhopBathyMethod() const { return bellhop_bathy_method; }
998
1004 WossTest& setWossBellhopAltimType(const std::string& type) { bellhop_altim_type = type; return *this; }
1005
1010 std::string getWossBellhopAltimType() const { return bellhop_altim_type; }
1011
1018
1024
1031
1037
1043 WossTest& setWossSimTime(const SimTime& time) { sim_time = time; return *this; }
1044
1049 SimTime getWossSimTime() const { return sim_time; }
1050
1056 WossTest& setWossBoxDepth(double depth) { box_depth = depth; return *this; }
1057
1062 double getWossBoxDepth() const { return box_depth; }
1063
1069 WossTest& setWossBoxRange(double range) { box_range = range; return *this; }
1070
1075 double getWossBoxRange() const { return box_range; }
1076
1077
1083 WossTest& setWossManagerDebug(bool flag) { woss_manager_debug = flag; return *this; }
1084
1090
1096 WossTest& setWossManagerTimeEvoActive(bool flag) { time_evolution_active = flag; return *this; }
1097
1103
1109 WossTest& setWossManagerThreads(unsigned int threads) { concurrent_threads = threads; return *this; }
1110
1116
1122 WossTest& setWossManagerSpaceSampling(double sampling) { woss_manager_space_sampling = sampling; return *this; }
1123
1129
1136
1142
1149
1155
1162
1168
1174 WossTest& setWossControllerDebug(bool flag) { woss_controller_debug = flag; return *this; }
1175
1181
1182 protected:
1183
1184 bool debug;
1185
1186 std::unique_ptr<SSP> ssp_proto;
1187 std::unique_ptr<Sediment> sediment_proto;
1188 std::unique_ptr<Pressure> pressure_proto;
1189 std::unique_ptr<TimeArr> time_arr_proto;
1190 std::unique_ptr<Transducer> transducer_proto;
1191 std::unique_ptr<AltimBretschneider> altim_bret_proto;
1192 std::unique_ptr<Location> location_proto;
1194 std::unique_ptr<RandomGenerator> random_gen_proto;
1195 std::unique_ptr<TimeReference> time_ref_proto;
1196
1198
1205 std::string res_db_file_path;
1206 std::string res_db_file_name;
1207 std::shared_ptr<ResPressureBinDbCreator> res_db_creator_press_bin;
1208 std::shared_ptr<ResPressureTxtDbCreator> res_db_creator_press_txt;
1209 std::shared_ptr<ResTimeArrBinDbCreator> res_db_creator_time_arr_bin;
1210 std::shared_ptr<ResTimeArrTxtDbCreator> res_db_creator_time_arr_txt;
1211
1212#if defined (WOSS_NETCDF_SUPPORT)
1213#if defined (WOSS_NETCDF4_SUPPORT)
1215#endif // defined (WOSS_NETCDF4_SUPPORT)
1221 std::shared_ptr<SedimDeck41DbCreator> sedim_db_creator;
1222
1225 std::string ssp_db_file_path;
1226#if defined (WOSS_NETCDF4_SUPPORT)
1228#endif // defined (WOSS_NETCDF_SUPPORT)
1229 std::shared_ptr<SspWoa2005DbCreator> ssp_db_creator;
1230
1235 std::shared_ptr<BathyGebcoDbCreator> bathy_db_creator;
1236#endif // defined (WOSS_NETCDF_SUPPORT)
1237
1239
1240 std::shared_ptr<WossDbManager> woss_db_manager;
1241
1258 double total_rays;
1259 double min_angle;
1260 double max_angle;
1264 std::string work_dir_path;
1265 std::string bellhop_path;
1266 std::string bellhop_mode;
1274 std::shared_ptr<BellhopCreator> bellhop_creator;
1275 double box_depth;
1276 double box_range;
1277
1280 unsigned int concurrent_threads;
1284 std::shared_ptr< WossManagerSimple<WossManagerResDb> > woss_manager_simple;
1285 std::shared_ptr< WossManagerSimple<WossManagerResDbMT> > woss_manager_multi;
1286
1288 std::shared_ptr<TransducerHandler> woss_transducer_handler;
1289
1291 std::shared_ptr<WossController> woss_controller;
1292
1294
1299 void config();
1300
1305 void init();
1306
1311 virtual void doConfig() = 0;
1312
1317 virtual void doInit() = 0;
1318
1323 virtual void doRun() = 0;
1324
1325 };
1326
1327}
1328
1329#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
Definition woss-test.h:205
virtual double getTimeReference() const
Definition woss-test.h:237
TestTimeReference(const TestTimeReference &copy)=default
double time_reference
Definition woss-test.h:244
virtual std::unique_ptr< TimeReference > clone() const override
Definition woss-test.h:226
TestTimeReference(TestTimeReference &&tmp)=default
TestTimeReference()
Definition woss-test.h:212
void setTimeReference(double time)
Definition woss-test.h:232
virtual ~TestTimeReference() override=default
Class for simulation time reference purposes.
Definition time-definitions.h:54
Exception thrown by the Woss test framework.
Definition woss-test.h:89
static constexpr int CHAR_ARR_LENGTH
Definition woss-test.h:96
const char * getFile() const
Definition woss-test.h:140
char file[CHAR_ARR_LENGTH]
Definition woss-test.h:177
static void printAndExit(const std::exception *e)
Definition woss-test.cpp:101
const char * getFunc() const
Definition woss-test.h:152
WossException(const WossException &copy)=default
WossErrorType error_type
Definition woss-test.h:172
WossErrorType getErrorType() const
Definition woss-test.h:134
char what_str[4 *CHAR_ARR_LENGTH]
Definition woss-test.h:194
int getLine() const
Definition woss-test.h:146
const char * getInfo() const
Definition woss-test.h:158
char func[CHAR_ARR_LENGTH]
Definition woss-test.h:186
int line
Definition woss-test.h:182
char info[CHAR_ARR_LENGTH]
Definition woss-test.h:190
virtual const char * what() const
Definition woss-test.cpp:95
virtual ~WossException() override=default
WossTest provides the framework for the WOSS library test binaries.
Definition woss-test.h:253
double min_angle
woss object configuration: minimum vertical angle in decimal degrees
Definition woss-test.h:1259
double getWossMinAngle() const
Definition woss-test.h:866
bool res_db_use_time_arr
set up the woss result databases data format: power delay profile.
Definition woss-test.h:1202
std::unique_ptr< Sediment > sediment_proto
Sediment prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1187
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:1207
WossTest & setWossBellhopArraySyntax(BellhopArrSyntax syntax)
Definition woss-test.h:1017
WossTest & setBathyDbDebug(bool flag)
Definition woss-test.h:580
void config()
Definition woss-test.cpp:229
WossTest & setBathyDbCreatorDebug(bool flag)
Definition woss-test.h:567
bool woss_db_manager_debug
enable/disable the debug prints of the woss DB manager object.
Definition woss-test.h:1238
bool getWossUseThorpeAtt() const
Definition woss-test.h:892
WossTest & setWossSspDepthPrecision(double precision)
Definition woss-test.h:899
double getWossTxMaxDepthOffset() const
Definition woss-test.h:749
WossTest & setWossBellhopShdSyntax(BellhopShdSyntax syntax)
Definition woss-test.h:1030
double evolution_time_quantum
woss object configuration: evolution time quantum
Definition woss-test.h:1245
WossTest & setWossManagerDebug(bool flag)
Definition woss-test.h:1083
WossTest & setWossMinAngle(double angle)
Definition woss-test.h:860
bool bathy_db_creator_debug
enable/disable the debug prints of the woss Bathymetry database creator.
Definition woss-test.h:1231
bool getWossDbManagerDebug() const
Definition woss-test.h:627
double getWossNormalizedSspDepthSteps() const
Definition woss-test.h:919
WossTest & setWossManagerUseMultiThread(bool flag)
Definition woss-test.h:1135
double ssp_depth_precision
woss object configuration: SSP depth precision in meters
Definition woss-test.h:1262
double getWossRxMaxRangeOffset() const
Definition woss-test.h:840
WossTest & setWossFrequencyStep(double step)
Definition woss-test.h:702
unsigned int concurrent_threads
number of concurrent threads (0 = auto).
Definition woss-test.h:1280
std::unique_ptr< TimeArr > time_arr_proto
TimeArr prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1189
double rx_max_range_offset
woss object configuration: receiver max range offset in meters
Definition woss-test.h:1257
bool ssp_db_debug
enable/disable the debug prints of the woss SSP database.
Definition woss-test.h:1224
WossTest(const WossTest &copy)=delete
int total_rx_ranges
woss object configuration: receiver range sampling
Definition woss-test.h:1255
bool getBathyDbCreatorDebug() const
Definition woss-test.h:573
double woss_manager_space_sampling
woss manager space sampling in meters
Definition woss-test.h:1281
WossTest & setWossTotalRangeSteps(double step)
Definition woss-test.h:716
bool getWossManagerTimeEvoActive() const
Definition woss-test.h:1102
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:1220
WossTest & setSedimDbCoordFilePath(const std::string &path)
Definition woss-test.h:474
std::string res_db_file_path
set up the woss result database file path
Definition woss-test.h:1205
bool getResDbDebug() const
Definition woss-test.h:345
double getWossRxMinRangeOffset() const
Definition woss-test.h:827
BellhopArrSyntax bellhop_arr_syntax
woss object configration: Bellhop Arr file syntax to be used during .arr file parsing
Definition woss-test.h:1271
WossTest & setWossTotalRxDepths(int rx_depths)
Definition woss-test.h:769
double normalized_ssp_depth_steps
woss object configuration: SSP depth quantization steps
Definition woss-test.h:1263
int total_runs
woss object configuration: total number of channel simulator runs
Definition woss-test.h:1246
BellhopShdSyntax bellhop_shd_syntax
woss object configration: Bellhop Shd file syntax to be used during .shd file parsing
Definition woss-test.h:1272
bool res_db_use_pressure
set up the woss result databases data format: single pressure tap.
Definition woss-test.h:1203
double tx_max_depth_offset
woss object configuration: transmitter max offset in meters
Definition woss-test.h:1250
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:1284
WossTest & setWossBellhopBeamOptions(const std::string &options)
Definition woss-test.h:965
double getWossTxMinDepthOffset() const
Definition woss-test.h:736
double getResDbSpaceSampling() const
Definition woss-test.h:399
WossTest & setSedimDbDebug(bool flag)
Definition woss-test.h:461
WossTest & setWossTotalTransmitters(int transmitters)
Definition woss-test.h:756
WossTest & setWossBellhopBathyMethod(const std::string &type)
Definition woss-test.h:991
virtual void doInit()=0
WossTest & setWossTxMaxDepthOffset(double offset)
Definition woss-test.h:743
WossTest & setResDbDebug(bool flag)
Definition woss-test.h:339
WossTest & operator=(WossTest &&tmp)=delete
double getWossRxMinDepthOffset() const
Definition woss-test.h:788
double getWossTotalRays() const
Definition woss-test.h:853
bool time_evolution_active
enable/disable the time evolution feature.
Definition woss-test.h:1279
WossTest & setWossRxMinDepthOffset(double offset)
Definition woss-test.h:782
std::string getResDbFilePath() const
Definition woss-test.h:412
int getWossTotalRxDepths() const
Definition woss-test.h:775
bool res_db_debug
enable/disable the debug prints of the woss result databases.
Definition woss-test.h:1200
bool getResDbUseTimeArr() const
Definition woss-test.h:372
std::string getResDbFileName() const
Definition woss-test.h:425
double frequency_step
woss object configuration: number of frequency steps
Definition woss-test.h:1247
virtual ~WossTest()=default
bool getSspDbCreatorDebug() const
Definition woss-test.h:519
WossTest & setWossBellhopPath(const std::string &path)
Definition woss-test.h:939
bool woss_controller_debug
enable/disable the debug prints of the woss conteroller
Definition woss-test.h:1290
bool getWossClearWorkDir() const
Definition woss-test.h:666
WossTest & setBathyDbGebcoFormat(GEBCO_BATHY_TYPE type)
Definition woss-test.h:593
std::unique_ptr< TimeReference > time_ref_proto
TimeReference prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1195
std::string res_db_file_name
set up the woss result database file name (without path)
Definition woss-test.h:1206
WossTest & setWossTransducerHandlerDebug(bool flag)
Definition woss-test.h:1161
double max_angle
woss object configuration: maximum vertical angle in decimal degrees
Definition woss-test.h:1260
WossTest & setWossManagerUseThreadPool(bool flag)
Definition woss-test.h:1148
std::unique_ptr< RandomGenerator > random_gen_proto
RandomGenerator prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1194
std::string getWossBellhopBathyType() const
Definition woss-test.h:984
double res_db_space_sampling
set up the woss result database 2D spatial sampling
Definition woss-test.h:1204
WossTest & setWossDebug(bool flag)
Definition woss-test.h:647
double rx_max_depth_offset
woss object configuration: receiver max depth offset in meters
Definition woss-test.h:1254
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:1285
bool getSedimDbDebug() const
Definition woss-test.h:467
bool res_db_use_binary
set up the woss result database format: binary or textual.
Definition woss-test.h:1201
DefHandler & def_handler
Definition Handler object allocated by the helper.
Definition woss-test.h:1197
double getWossRxMaxDepthOffset() const
Definition woss-test.h:801
std::string getWossWorkDirPath() const
Definition woss-test.h:932
WossTest & setSedimDeck41DbType(DECK41DbType type)
Definition woss-test.h:434
int total_rx_depths
woss object configuration: receiver depth sampling
Definition woss-test.h:1252
WossTest & setWossManagerTimeEvoActive(bool flag)
Definition woss-test.h:1096
SimTime getWossSimTime() const
Definition woss-test.h:1049
bool getSspDbDebug() const
Definition woss-test.h:532
bool getWossCreatorDebug() const
Definition woss-test.h:640
WossTest & setWossMaxAngle(double angle)
Definition woss-test.h:873
WossTest & setWossRandomGenStream(int stream)
Definition woss-test.h:313
std::string getBathyDbFilePath() const
Definition woss-test.h:613
WossTest(WossTest &&tmp)=delete
DECK41DbType getSedimDeck41DbType() const
Definition woss-test.h:440
double rx_min_range_offset
woss object configuration: receiver min range offset in meters
Definition woss-test.h:1256
WossTest & setWossManagerSpaceSampling(double sampling)
Definition woss-test.h:1122
DECK41DbType sedim_deck41_db_type
DECK41 db data format type.
Definition woss-test.h:1214
bool sedim_db_creator_debug
enable/disable the debug prints of the woss sediment database creator.
Definition woss-test.h:1216
double getWossEvolutionTimeQuantum() const
Definition woss-test.h:679
double box_range
woss object configuration: maximum range to trace rats to; longer rays will be ignored
Definition woss-test.h:1276
std::string ssp_db_file_path
setup the path of the woss monthly SSP database indexed by geographical coordinates
Definition woss-test.h:1225
double getWossTotalRangeSteps() const
Definition woss-test.h:723
std::string getSedimDbMarsdenOneFilePath() const
Definition woss-test.h:506
WossTest & setWossTotalRxRanges(int rx_ranges)
Definition woss-test.h:808
std::shared_ptr< BellhopCreator > bellhop_creator
the helper will automatically allocate the woss creator
Definition woss-test.h:1274
WossTest & setWossRxMaxDepthOffset(double offset)
Definition woss-test.h:795
bool woss_transducer_handler_debug
enable/disable the debug prints of the woss transducer handler.
Definition woss-test.h:1287
WossTest & setSedimDbCreatorDebug(bool flag)
Definition woss-test.h:448
double getWossBoxDepth() const
Definition woss-test.h:1062
WossTest & setWossRxMinRangeOffset(double offset)
Definition woss-test.h:821
bool woss_manager_use_multithread
enable/disable the multithread feature
Definition woss-test.h:1282
std::string bellhop_path
woss object configuration: path of the Bellhop executable
Definition woss-test.h:1265
int getWossRandomGenStream() const
Definition woss-test.h:319
WossTest & setResDbUseBinary(bool flag)
Definition woss-test.h:352
WossTest & setWossTotalRays(double rays)
Definition woss-test.h:847
BellhopShdSyntax getWossBellhopShdSyntax() const
Definition woss-test.h:1036
std::string bellhop_bathy_type
woss object configuration: Bellhop bathymetry type string
Definition woss-test.h:1268
WossTest & setWossTxMinDepthOffset(double offset)
Definition woss-test.h:730
std::shared_ptr< WossController > woss_controller
the helper will automatically allocate the woss controller.
Definition woss-test.h:1291
int getWossTotalTransmitters() const
Definition woss-test.h:762
GEBCO_BATHY_TYPE bathy_db_gebco_format
setup the the GEBCO database format
Definition woss-test.h:1233
std::string getSspDbFilePath() const
Definition woss-test.h:545
std::string getSedimDbCoordFilePath() const
Definition woss-test.h:480
SimTime sim_time
woss object configuration: woss simulation times (start and end sim times)
Definition woss-test.h:1273
std::string getWossBellhopBeamOptions() const
Definition woss-test.h:971
WossTest & setWossBellhopBathyType(const std::string &type)
Definition woss-test.h:978
bool debug
debug flag
Definition woss-test.h:1184
std::string work_dir_path
woss object configuration: path of the temporary directory
Definition woss-test.h:1264
virtual void doConfig()=0
bool ssp_db_creator_debug
enable/disable the debug prints of the woss SSP database creator.
Definition woss-test.h:1223
WossTest & setSedimDbMarsdenFilePath(const std::string &path)
Definition woss-test.h:487
bool woss_manager_debug
enable/disable the debug prints of the woss manager.
Definition woss-test.h:1278
std::unique_ptr< Location > location_proto
Location prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1192
bool getResDbCreatorDebug() const
Definition woss-test.h:332
WossTest & setWossEvolutionTimeQuantum(double time)
Definition woss-test.h:673
WossTest & setWossSimTime(const SimTime &time)
Definition woss-test.h:1043
WossTest & setSspDbFilePath(const std::string &path)
Definition woss-test.h:539
std::unique_ptr< SSP > ssp_proto
SSP prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1186
bool sedim_db_debug
enable/disable the debug prints of the woss sediment database.
Definition woss-test.h:1217
std::unique_ptr< Pressure > pressure_proto
Pressure prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1188
WossTest & setWossCreatorDebug(bool flag)
Definition woss-test.h:634
std::shared_ptr< BathyGebcoDbCreator > bathy_db_creator
the helper will automatically allocate the woss GEBCO bathymetry db creator
Definition woss-test.h:1235
bool initialized
initialization complete flag.
Definition woss-test.h:1293
WOADbType getSspWoaDbType() const
Definition woss-test.h:559
bool woss_clear_work_dir
woss object configuration: clear the temporary files created by the underlying channel simulator
Definition woss-test.h:1244
WossTest & setBathyDbFilePath(const std::string &path)
Definition woss-test.h:606
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:1219
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:1208
bool woss_creator_debug
enable/disable the debug prints of the woss creator.
Definition woss-test.h:1242
bool getWossManagerUseMultiThread() const
Definition woss-test.h:1141
WossTest & setWossBellhopAltimType(const std::string &type)
Definition woss-test.h:1004
double tx_min_depth_offset
woss object configuration: transmitter min offset in meters
Definition woss-test.h:1249
bool use_thorpe_att
woss object configuration: use thorpe attenuation in channel computation
Definition woss-test.h:1261
WossTest & setSspWoaDbType(WOADbType type)
Definition woss-test.h:553
std::shared_ptr< SedimDeck41DbCreator > sedim_db_creator
the helper will automatically allocate the woss sediment database creator
Definition woss-test.h:1221
bool getWossDebug() const
Definition woss-test.h:653
double getWossManagerSpaceSampling() const
Definition woss-test.h:1128
double total_rays
woss object configuration: total number of rays (0 = automatic)
Definition woss-test.h:1258
bool getResDbUseBinary() const
Definition woss-test.h:358
WossTest & setResDbCreatorDebug(bool flag)
Definition woss-test.h:326
WossTest & setSspDbCreatorDebug(bool flag)
Definition woss-test.h:513
bool getWossManagerDebug() const
Definition woss-test.h:1089
double getWossBoxRange() const
Definition woss-test.h:1075
bool getWossTransducerHandlerDebug() const
Definition woss-test.h:1167
WossTest & setWossControllerDebug(bool flag)
Definition woss-test.h:1174
WossTest & setResDbFileName(const std::string &file_name)
Definition woss-test.h:419
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:1218
double getWossSspDepthPrecision() const
Definition woss-test.h:906
bool woss_manager_use_thread_pool
enable/disable woss::ThreadPool usage
Definition woss-test.h:1283
WossTest & setWossClearWorkDir(bool flag)
Definition woss-test.h:660
int getWossTotalRuns() const
Definition woss-test.h:694
std::shared_ptr< WossDbManager > woss_db_manager
the helper will automatically allocate the woss DB manager
Definition woss-test.h:1240
double getWossFrequencyStep() const
Definition woss-test.h:708
WossTest & setWossWorkDirPath(const std::string &path)
Definition woss-test.h:926
WossTest & setWossBoxRange(double range)
Definition woss-test.h:1069
double rx_min_depth_offset
woss object configuration: receiver min depth offset in meters
Definition woss-test.h:1253
WossTest & setWossDbManagerDebug(bool flag)
Definition woss-test.h:621
std::shared_ptr< TransducerHandler > woss_transducer_handler
the helper will automatically allocate the woss Transducer handler.
Definition woss-test.h:1288
std::string bathy_db_file_path
setup the path of the woss GEBCO database
Definition woss-test.h:1234
std::string bellhop_beam_options
woss object configuration: Bellhop beam option string
Definition woss-test.h:1267
bool getWossControllerDebug() const
Definition woss-test.h:1180
WossTest & setWossUseThorpeAtt(bool flag)
Definition woss-test.h:886
bool res_db_creator_debug
enable/disable the debug prints of the woss results database creator.
Definition woss-test.h:1199
WossTest & setWossBoxDepth(double depth)
Definition woss-test.h:1056
std::string getWossBellhopPath() const
Definition woss-test.h:945
int getWossManagerThreads() const
Definition woss-test.h:1115
int getWossTotalRxRanges() const
Definition woss-test.h:814
int total_transmitters
woss object configuration: total number of transmitting sources
Definition woss-test.h:1251
bool getSedimDbCreatorDebug() const
Definition woss-test.h:454
std::string bellhop_bathy_method
woss object configuration: Bathymetry write method string
Definition woss-test.h:1269
std::string getWossBellhopBathyMethod() const
Definition woss-test.h:997
WossTest & setSedimDbMarsdenOneFilePath(const std::string &path)
Definition woss-test.h:500
WossTest & setResDbSpaceSampling(double sampling)
Definition woss-test.h:393
WossTest & setSspDbDebug(bool flag)
Definition woss-test.h:526
BellhopArrSyntax getWossBellhopArraySyntax() const
Definition woss-test.h:1023
double getWossMaxAngle() const
Definition woss-test.h:879
double box_depth
woss object configuration: maximum depth to trace rays to; deeper rays will be ignored
Definition woss-test.h:1275
WossTest()
Definition woss-test.cpp:116
WossTest & setWossTestDebug(bool flag)
Definition woss-test.h:300
std::shared_ptr< SspWoa2005DbCreator > ssp_db_creator
the helper will automatically allocate the woss sediment database creator
Definition woss-test.h:1229
std::unique_ptr< Transducer > transducer_proto
Transducer prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1190
GEBCO_BATHY_TYPE getBathyDbGebcoFormat() const
Definition woss-test.h:599
bool woss_debug
enable/disable the debug prints of all woss objects
Definition woss-test.h:1243
std::string bellhop_mode
woss object configuration: Bellhop mode string
Definition woss-test.h:1266
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:1210
std::unique_ptr< AltimBretschneider > altim_bret_proto
AltimBretschneider prototype which will be plugged into the WOSS framework.
Definition woss-test.h:1191
std::string getSedimDbMarsdenFilePath() const
Definition woss-test.h:493
bool bathy_db_debug
enable/disable the debug prints of the woss Bathymetry database (GEBCO).
Definition woss-test.h:1232
WossTest & setWossRxMaxRangeOffset(double offset)
Definition woss-test.h:834
WossTest & setResDbUsePressure(bool flag)
Definition woss-test.h:380
WossTest & setWossBellhopMode(const std::string &mode)
Definition woss-test.h:952
std::string getWossBellhopMode() const
Definition woss-test.h:958
WossTest & setWossNormalizedSspDepthSteps(double steps)
Definition woss-test.h:913
double total_range_steps
woss object configuration: tx - rx range sampling in meters
Definition woss-test.h:1248
void run()
Definition woss-test.cpp:441
WossTest & setWossTotalRuns(int runs)
Definition woss-test.h:687
bool getBathyDbDebug() const
Definition woss-test.h:586
bool getResDbUsePressure() const
Definition woss-test.h:386
std::string bellhop_altim_type
woss object configuration: Bellhop Altimetry type string
Definition woss-test.h:1270
WossTest & setWossManagerThreads(unsigned int threads)
Definition woss-test.h:1109
bool getWossTestDebug() const
Definition woss-test.h:306
WossTest & operator=(const WossTest &copy)=delete
virtual void doRun()=0
std::string getWossBellhopAltimType() const
Definition woss-test.h:1010
void init()
Definition woss-test.cpp:234
WossTest & setResDbFilePath(const std::string &path)
Definition woss-test.h:406
WOADbType ssp_woa_db_type
WOA SSP Db Type.
Definition woss-test.h:1227
bool getWossManagerUseThreadPool() const
Definition woss-test.h:1154
int woss_random_gen_stream
random generator used by the WOSS framework.
Definition woss-test.h:1193
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:1209
WossTest & setResDbUseTimeArr(bool flag)
Definition woss-test.h:366
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:69
@ WOSS_ERROR_INSUFFICIENT_PERMISSIONS
the requester of the operation does not have sufficient permissions (access rights etc)
@ WOSS_ERROR_OUT_OF_RANGE_PARAM
a parameter passed to the function is outside the valid range
@ WOSS_ERROR_OUT_OF_HANDLES
there is no free handle available
@ WOSS_ERROR_INVALID_PARAM
a parameter passed to the function is invalid
@ WOSS_ERROR_IO_ERROR
an I/O error occurred
@ WOSS_ERROR_OUT_OF_MEMORY
out of memory
@ WOSS_ERROR_WRONG_STATE
the requested operation is not possible/allowed in the current state
@ WOSS_ERROR_TIMEOUT
timeout has occurred
@ WOSS_ERROR_BAD_FORMAT
data is not in the expected format
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.