World Ocean Simulation System (WOSS) library
ac-toolbox-woss.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 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 AC_TOOLBOX_WOSS_DEFINITIONS_H
34#define AC_TOOLBOX_WOSS_DEFINITIONS_H
35
36
37#include <vector>
38#include <map>
39#include <set>
40#include <memory>
41#include <ssp-definitions.h>
43#include "woss.h"
44
45
46namespace woss {
47
48 class Sediment;
49
53 using RangeVector = std::vector< double >;
54
58 using SSPMap = std::map< int, std::unique_ptr<SSP> >;
59
63 using SedimentMap = std::map< int, std::unique_ptr<Sediment> >;
64
72
73 public:
74
79
90 ACToolboxWoss( const CoordZ& tx, const CoordZ& rx, const Time& start_t, const Time& end_t, double start_freq, double end_freq, double freq_step );
91
92 virtual ~ACToolboxWoss() override = default;
93
98 virtual bool initialize() override;
99
104 virtual bool isValid() const override;
105
110 ACToolboxWoss& setRangeSteps( int steps ) { total_range_steps = steps; coordz_vector.reserve(steps + 2);
111 range_vector.reserve(steps + 2); return *this; }
112
117 ACToolboxWoss& setSSPDepthPrecision( long double precision ) { ssp_depth_precision = precision; return *this; }
118
123 int getRangeSteps() const { return total_range_steps; }
124
129 long double getSSPDepthPrecision() const { return ssp_depth_precision; }
130
136
142
147 double getMinSSPDepth() const { return( *(min_ssp_depth_set.begin()) ); }
148
153 double getMaxSSPDepth() const { return( *(max_ssp_depth_set.rbegin()) ); }
154
160
166
167 protected:
168
173
178
183
188
193
197 std::set< double > min_ssp_depth_set;
198
202 std::set< double > max_ssp_depth_set;
203
208
213
218
223
228
233
238
242 std::unique_ptr<Altimetry> altimetry_value;
243
249
255 virtual bool checkSSPUnicity( const SSP& ptr ) const;
256
262 virtual bool checkSedimentUnicity( const Sediment& ptr ) const;
263
268 virtual bool initRangeVector();
269
274 virtual bool initCoordZVector();
275
280 virtual bool initSedimentMap();
281
285 virtual void resetSedimentMap();
286
291 virtual bool initAltimetry();
292
297 virtual bool initSSPMap();
298
302 virtual void resetSSPMap();
303
304 };
305
306}
307
308#endif /* AC_TOOLBOX_WOSS_DEFINITIONS_H */
309
Definitions and library for woss::Altimetry class.
base class for implementing acoustic-toolbox channel simulators (Bellhop, Kraken, etc....
Definition ac-toolbox-woss.h:71
double min_altimetry_depth
Definition ac-toolbox-woss.h:187
int getRangeSteps() const
Definition ac-toolbox-woss.h:123
double getMaxSSPDepth() const
Definition ac-toolbox-woss.h:153
long double getSSPDepthPrecision() const
Definition ac-toolbox-woss.h:129
virtual void resetSedimentMap()
Definition ac-toolbox-woss.cpp:99
ACToolboxWoss()
Definition ac-toolbox-woss.cpp:42
int getMaxSSPDepthSteps() const
Definition ac-toolbox-woss.h:141
double min_bathymetry_depth
Definition ac-toolbox-woss.h:177
virtual ~ACToolboxWoss() override=default
ACToolboxWoss & setSSPDepthPrecision(long double precision)
Definition ac-toolbox-woss.h:117
virtual bool initialize() override
Definition ac-toolbox-woss.cpp:104
virtual bool initRangeVector()
Definition ac-toolbox-woss.cpp:136
int min_ssp_depth_steps
Definition ac-toolbox-woss.h:207
bool is_ssp_map_transformable
Definition ac-toolbox-woss.h:248
virtual bool initSSPMap()
Definition ac-toolbox-woss.cpp:274
double getMinBathymteryDepth() const
Definition ac-toolbox-woss.h:159
SedimentMap sediment_map
Definition ac-toolbox-woss.h:237
virtual bool initAltimetry()
Definition ac-toolbox-woss.cpp:188
int total_range_steps
Definition ac-toolbox-woss.h:217
double max_altimetry_depth
Definition ac-toolbox-woss.h:192
double max_bathymetry_depth
Definition ac-toolbox-woss.h:182
virtual bool isValid() const override
Definition ac-toolbox-woss.cpp:88
int getMinSSPDepthSteps() const
Definition ac-toolbox-woss.h:135
virtual bool initSedimentMap()
Definition ac-toolbox-woss.cpp:227
std::set< double > min_ssp_depth_set
Definition ac-toolbox-woss.h:197
virtual void resetSSPMap()
Definition ac-toolbox-woss.cpp:94
int max_ssp_depth_steps
Definition ac-toolbox-woss.h:212
double getMaxBathymetryDepth() const
Definition ac-toolbox-woss.h:165
double getMinSSPDepth() const
Definition ac-toolbox-woss.h:147
virtual bool checkSedimentUnicity(const Sediment &ptr) const
Definition ac-toolbox-woss.cpp:264
CoordZVector coordz_vector
Definition ac-toolbox-woss.h:222
ACToolboxWoss & setRangeSteps(int steps)
Definition ac-toolbox-woss.h:110
virtual bool checkSSPUnicity(const SSP &ptr) const
Definition ac-toolbox-woss.cpp:324
virtual bool initCoordZVector()
Definition ac-toolbox-woss.cpp:148
std::set< double > max_ssp_depth_set
Definition ac-toolbox-woss.h:202
SSPMap ssp_map
Definition ac-toolbox-woss.h:232
std::unique_ptr< Altimetry > altimetry_value
Definition ac-toolbox-woss.h:242
long double ssp_depth_precision
Definition ac-toolbox-woss.h:172
RangeVector range_vector
Definition ac-toolbox-woss.h:227
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:384
SSP class offers multiple creation and manipulation capabilities for sound speed profile.
Definition ssp-definitions.h:247
Surficial sediment geoacoustic parameters definitions.
Definition sediment-definitions.h:54
a class for time date manipulation
Definition time-definitions.h:83
Woss class with ResReader objects for reading simulated results.
Definition woss.h:553
Definition ac-toolbox-arr-asc-reader.h:44
std::vector< double > RangeVector
Definition ac-toolbox-woss.h:53
std::map< int, std::unique_ptr< SSP > > SSPMap
Definition ac-toolbox-woss.h:58
std::vector< CoordZ > CoordZVector
Definition coordinates-definitions.h:58
std::map< int, std::unique_ptr< Sediment > > SedimentMap
Definition ac-toolbox-woss.h:63
Definitions and library for Sound Speed Profiles.
Provides the interface for woss::Woss and woss::WossResReader classes.