profile_lock Class Reference
[Ocean Profiles]
Detailed Description
A wrapper for a USML profile model that provides each instantiation with its own set of mutex's for the sound_speed() and attenuation() methods.
- Examples:
-
ocean/test/profile_lock_test.cc.
Constructor & Destructor Documentation
Constructor Takes control of a profile_model and creates mutex's fpr each public method and for each instantiation of the class and when done destroys both.
Member Function Documentation
virtual void attenuation |
( |
const usml::types::wposition & |
location, |
|
|
const seq_vector & |
frequencies, |
|
|
const boost::numeric::ublas::matrix< double > & |
distance, |
|
|
boost::numeric::ublas::matrix< boost::numeric::ublas::vector< double > > * |
attenuation | |
|
) |
| | [inline, virtual] |
Computes the broadband absorption loss of sea water with a mutex lock.
- Parameters:
-
| location | Location at which to compute attenuation. |
| frequencies | Frequencies over which to compute loss. (Hz) |
| distance | Distance traveled through the water (meters). |
| attenuation | Absorption loss of sea water in dB (output). |
virtual void sound_speed |
( |
const wposition & |
location, |
|
|
matrix< double > * |
speed, |
|
|
wvector * |
gradient = NULL | |
|
) |
| | [inline, virtual] |
Compute the speed of sound and it's first derivatives at a series of locations with a mutex lock.
- Parameters:
-
| location | Location at which to compute attenuation. |
| speed | Speed of sound (m/s) at each location (output). |
| gradient | Sound speed gradient at each location (output). |
Implements profile_model.
Member Data Documentation
The "has a" object to prevent simultaneous access.
Mutex to prevent simultaneous access/update by multiple threads.