UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sim_fdm_simulator_iso.hpp
1 /* sim_fdm_simulator_iso.hpp */
2 /* $Id$ */
3 #ifndef __sim_fdm_simulator_iso_hpp
4 #define __sim_fdm_simulator_iso_hpp
5 
6 #include <vector>
7 #include <s2proc/sim_service.hpp>
8 #include <s2proc/sim_fdm_source.hpp>
9 #include <s2proc/sim_fdm_snapshot.hpp>
10 #include <s2proc/sim_fdm_scheme_iso_it.hpp>
11 
12 class WaveField;
13 
17 namespace sim
18 {
19  class VmParamsIso;
20  template <typename T> class VelModel;
21 
25  namespace fdm
26  {
31  {
32  public:
33 
34  SimulatorIso();
35 
36  virtual ~SimulatorIso() {/* nothing to do. */}
37 
43  sim::ErrCode init(const Snapshot::Area &snapshot_area,
44  const VelModel<sim::VmParamsIso> &vm);
45 
46 
53  sim::ErrCode init(const Snapshot::Area &snapshot_area,
55  const Source &source);
56 
60  void addSource(const Source &source);
61 
63  void clearSources();
64 
76  sim::ErrCode operator()(const TimeT &dt, WaveField &wf) const;
77 
83  void setExecutionFlag(const bool flag);
84 
85 
91  virtual void snapshotCallback(const TimeT &t,
92  const TimeT &tmax,
93  const Snapshot &snapshot) const;
94 
95  protected:
96 
98  std::vector<Source> m_sources_vec;
102  void time_grid_step(Snapshot &fp, Snapshot &f, const Snapshot &fn) const;
103 
104  void modelling(SchemeIsoIt &scheme_it) const;
105 
107  AmplT interpol_ampl(const TimeT &t1, const AmplT &a1,
108  const TimeT &t2, const AmplT &a2,
109  const TimeT &t) const;
110 
111  private:
112 
113  CoordT m_max_vel;
114  CoordT m_min_coord_step;
115  };
116 
117  }; // finite differences modeling namespace
118 
119 }; // simulation namespace
120 
121 #endif /* sim_fdm_simulator_iso.hpp */
sim::ErrCode init(const Snapshot::Area &snapshot_area, const VelModel< sim::VmParamsIso > &vm)
Definition: sim_fdm_source.hpp:27
virtual void snapshotCallback(const TimeT &t, const TimeT &tmax, const Snapshot &snapshot) const
GridIso m_grid
Definition: sim_fdm_simulator_iso.hpp:99
Definition: sim_fdm_snapshot.hpp:23
Definition: sim_fdm_scheme_iso_it.hpp:19
bool m_execution_flag
Definition: sim_fdm_simulator_iso.hpp:100
Definition: sim_fdm_simulator_iso.hpp:30
Definition: sim_fdm_scheme_iso_it.hpp:45
sim::ErrCode operator()(const TimeT &dt, WaveField &wf) const
void addSource(const Source &source)
ErrCode
Definition: sim_service.hpp:30
void setExecutionFlag(const bool flag)
Definition: sim_fdm_snapshot.hpp:30
Definition: wave_field.hpp:13
Snapshot::Area m_snapshot_area
Definition: sim_fdm_simulator_iso.hpp:97
bool sim(size_t n, const Trace::AmplT *x, const Trace::AmplT *y, Trace::AmplT &s)
AmplT interpol_ampl(const TimeT &t1, const AmplT &a1, const TimeT &t2, const AmplT &a2, const TimeT &t) const
Definition: sim_fdm_simulator_iso.hpp:20
std::vector< Source > m_sources_vec
Definition: sim_fdm_simulator_iso.hpp:98