volume_flat.h

00001 
00005 #pragma once
00006 
00007 #include <usml/ocean/volume_model.h>
00008 
00009 namespace usml {
00010 namespace ocean {
00011 
00012 using boost::numeric::ublas::vector;
00013 
00016 
00021 class USML_DECLSPEC volume_flat : public volume_model {
00022 
00023     //**************************************************
00024     // depth model
00025 
00026   public:
00027 
00037     virtual void depth( const wposition& location,
00038         matrix<double>* rho, matrix<double>* thickness=NULL )
00039     {
00040         noalias(*rho) = scalar_matrix<double>(
00041                         rho->size1(), rho->size2(), _rho ) ;
00042         if ( thickness ) {
00043                 noalias(*thickness) = scalar_matrix<double>(
00044                         thickness->size1(), thickness->size2(), _thickness ) ;
00045         }
00046     }
00047 
00057     virtual void depth( const wposition1& location,
00058         double* rho, double* thickness=NULL )
00059     {
00060         *rho = _rho ;
00061         if ( thickness ) {
00062                 *thickness = _thickness ;
00063         }
00064 
00065     }
00066 
00067     //**************************************************
00068     // initialization
00069 
00077     volume_flat( double depth=0.0, double thickness=0.0, double amplitude=-300.0  ) :
00078         volume_model( new scattering_constant(amplitude) ),
00079                 _rho( wposition::earth_radius - abs(depth) ),
00080                 _thickness( thickness)
00081     {
00082     }
00083 
00091     volume_flat( double depth, double thickness, scattering_model* scattering ) :
00092         volume_model( scattering ),
00093                 _rho( wposition::earth_radius - abs(depth) ),
00094                 _thickness( thickness)
00095     {
00096     }
00097 
00098   private:
00099 
00101     const double _rho ;
00102 
00104     const double _thickness ;
00105 
00106 };
00107 
00109 }  // end of namespace ocean
00110 }  // end of namespace usml

Generated on 4 May 2015 for USML by  doxygen 1.6.1