boundary_lock Class Reference
[Ocean Boundaries]

Collaboration diagram for boundary_lock:
Collaboration graph
[legend]

Detailed Description

A wrapper for a boundary model that provides each instantiation with its own set of mutex's for the height() and reflect_loss() methods.

Examples:

ocean/test/boundary_lock_test.cc.


Constructor & Destructor Documentation

boundary_lock ( boundary_model other  )  [inline]

Constructor Takes control of a profile_model and creates a mutex's for each public method and for each instantiation of the class and when done destroys both.

virtual ~boundary_lock (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void height ( const wposition1 location,
double *  rho,
wvector1 normal = NULL,
bool  quick_interp = false 
) [inline, virtual]

Compute the height of the boundary and it's surface normal at a single location with a mutex lock.

Often used during reflection processing.

Parameters:
location Location at which to compute boundary.
rho Surface height in spherical earth coords (output).
normal Unit normal relative to location (output).
quick_interp Determines if you want a fast nearest or pchip interp

Implements boundary_model.

virtual void height ( const wposition location,
matrix< double > *  rho,
wvector normal = NULL,
bool  quick_interp = false 
) [inline, virtual]

Compute the height of the boundary and it's surface normal at a series of locations with a mutex lock.

Parameters:
location Location at which to compute boundary.
rho Surface height in spherical earth coords (output).
normal Unit normal relative to location (output).
quick_interp Determines if you want a fast nearest or pchip interp

Implements boundary_model.

virtual void reflect_loss ( const wposition1 location,
const seq_vector frequencies,
double  angle,
boost::numeric::ublas::vector< double > *  amplitude,
boost::numeric::ublas::vector< double > *  phase = NULL 
) [inline, virtual]

Computes the broadband reflection loss and phase change with a mutex lock.

Parameters:
location Location at which to compute attenuation.
frequencies Frequencies over which to compute loss. (Hz)
angle Grazing angle relative to the interface (radians).
amplitude Change in ray strength in dB (output).
phase Change in ray phase in dB (output).

Member Data Documentation

boost::mutex* _heightMutex [private]

Mutex's to prevent simultaneous access/update by multiple threads.

boundary_model* _other [private]

The "has a" object to prevent simultaneous access.

boost::mutex* _reflect_lossMutex [private]

Generated on 4 May 2015 for USML by  doxygen 1.6.1