proploss.h

00001 
00005 #pragma once
00006 
00007 #include <usml/ocean/ocean.h>
00008 #include <usml/waveq3d/eigenrayListener.h>
00009 #include <usml/waveq3d/wave_queue.h>
00010 
00011 namespace usml {
00012 namespace waveq3d {
00013 
00014 using namespace usml::ocean;
00015 
00018 
00026 class USML_DECLSPEC proploss : public eigenrayListener {
00027 
00028 private:
00029 
00033     const wposition* _targets;
00034 
00040     const seq_vector* _frequencies;
00041 
00046     const wposition1 _source_pos;
00047 
00053     const seq_vector *_source_de;
00054 
00061     const seq_vector *_source_az;
00062 
00067     double _time_step;
00068 
00072     matrix< eigenray_list > _eigenrays;
00073 
00075     int _num_eigenrays;
00076 
00086     matrix< eigenray > _loss;
00087 
00088 public:
00089 
00096     proploss(const wposition* targets);
00097 
00108     proploss( const seq_vector& frequencies, const wposition1& source_pos,
00109               const seq_vector& source_de, const seq_vector& source_az,
00110               double time_step, const wposition* targets);
00111 
00116     virtual ~proploss(){
00117 
00118         delete _frequencies;
00119         delete _source_de;
00120         delete _source_az;
00121     }
00122 
00123 private:
00124 
00129     void initialize();
00130 
00131 public:
00132 
00137     inline size_t size1() const {
00138         return _targets->size1();
00139     }
00140 
00145     inline size_t size2() const {
00146         return _targets->size2();
00147     }
00148 
00156     inline wposition1 position(size_t t1, size_t t2) {
00157         return wposition1(*_targets, t1, t2);
00158     }
00159 
00164     inline const seq_vector* frequencies() const {
00165         return _frequencies;
00166     }
00167 
00175     inline eigenray_list* eigenrays(size_t t1, size_t t2) {
00176         return &(_eigenrays(t1, t2));
00177     }
00178 
00187     inline const eigenray* total(size_t t1, size_t t2) {
00188         return &(_loss(t1, t2));
00189     }
00190 
00200         bool addEigenray(size_t targetRow, size_t targetCol, eigenray pRay, size_t run_id );
00201 
00202 
00209     void sum_eigenrays(bool coherent = true);
00210 
00333     void write_netcdf(
00334             const char* filename, const char* long_name = NULL);
00335 
00336 };
00337 
00339 } // end of namespace waveq3d
00340 } // end of namespace usml

Generated on 4 May 2015 for USML by  doxygen 1.6.1