UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sim_fdm_source.hpp
1 /* sim_fdm_source.hpp */
2 /* $Id$ */
3 #ifndef __sim_fdm_source_hpp
4 #define __sim_fdm_source_hpp
5 
6 #include <s2proc/sim_service.hpp>
7 #include <s2proc/sim_point_2d.hpp>
8 
12 namespace sim
13 {
14  class Impulse;
15 
19  namespace fdm
20  {
21  class Snapshot;
22 
27  class Source
28  {
29  public:
30 
37  Source(const Point2D &initial_coords,
38  const CoordT &vel,
39  const Impulse &impulse,
40  const int coords_mask = X_COORD | Z_COORD);
41 
42  Source(const Source &other);
43 
44  virtual ~Source();
45 
46 
47  Source& operator=(const Source &other);
48 
49 
50  const Point2D& initialCoords() const
51  {return m_initial_coords;}
52 
53  void setInitialCoords(const Point2D &initial_coords)
54  {m_initial_coords = initial_coords;}
55 
56 
57  const CoordT& vel() const
58  {return m_vel;}
59 
60  void setVel(const CoordT &vel)
61  {m_vel = vel;}
62 
63 
64  const Impulse& impulse() const
65  {return *mp_impulse;}
66 
67  void setImpulse(const Impulse &impulse);
68 
69 
70  int coordsMask() const
71  {return m_coords_mask;}
72 
73  void setCoordsMask(const int coords_mask)
74  {m_coords_mask = coords_mask;}
75 
76 
81  bool operator()(const TimeT &initial_time, Snapshot &snapshot) const;
82 
83  protected:
84 
86  CoordT m_vel;
89  };
90 
91 
92 
93  }; // finite differences modeling namespace
94 
95 }; // simulation namespace
96 
97 #endif /* sim_fdm_source.hpp */
Definition: sim_fdm_source.hpp:27
Definition: sim_service.hpp:22
Definition: sim_fdm_snapshot.hpp:23
int m_coords_mask
Definition: sim_fdm_source.hpp:88
Point2D m_initial_coords
Definition: sim_fdm_source.hpp:85
CoordT m_vel
Definition: sim_fdm_source.hpp:86
Definition: sim_service.hpp:23
Source(const Point2D &initial_coords, const CoordT &vel, const Impulse &impulse, const int coords_mask=X_COORD|Z_COORD)
Definition: sim_point_2d.hpp:16
bool sim(size_t n, const Trace::AmplT *x, const Trace::AmplT *y, Trace::AmplT &s)
Definition: sim_impulse.hpp:28
Impulse * mp_impulse
Definition: sim_fdm_source.hpp:87
bool operator()(const TimeT &initial_time, Snapshot &snapshot) const