C++ main module for emicrom Package  1.0
EMM_WaveFDMTest.h
Go to the documentation of this file.
1 #ifndef EMM_WaveFDMTest_H
2 #define EMM_WaveFDMTest_H
3 
4 #include "EMM_WaveTest.h"
5 
6 
28 
29 class EMM_WaveFDMTest : public EMM_WaveTest {
30 
32  // ATTRIBUTES
33 
34 
35 private:
36 
37 
38 private:
39  // METHODS
40 
41  // CONSTRUCTORS
42 
45  EMM_WaveFDMTest(void);
46 
47 
48 
49  // DESTRUCTORS
50 
51 
54  virtual ~EMM_WaveFDMTest(void);
55 
56 
57 
58 public:
61  inline static SP::EMM_WaveFDMTest New() {
62  SP::EMM_WaveFDMTest p(new EMM_WaveFDMTest(),
64  p->setThis(p);
65  return p;
66  };
67 
68 
69 
70 
71 
72 
73 protected:
74 
75 
76  //signal propagation
105  tBoolean computeWaveAtPreviousTime(const tBoolean& isPeriodic,
106  const tBoolean dirichletLC[2],
107  tReal U0(const tReal& t),//U(0,t)
108  tReal UL(const tReal& t),//U(L,t)
109  const EMM_RealArray& Ux_0,//U(x,0)
110  const EMM_RealArray& dU_dt0,//dU_dt(x,0)
111  const tReal& s2,//s=c^2*dt^2/dx^2
112  const tReal& dt,
113  EMM_RealArray& Ux_1) const;
114 
152  tBoolean computeWaveAtFirstTime(const tBoolean& isPeriodic,
153  const tBoolean dirichletLC[2],
154  tReal U0(const tReal& t),//U(0,t)
155  tReal UL(const tReal& t),//U(L,t)
156  const EMM_RealArray& Ux_0,//U(x,0)
157  const EMM_RealArray& dU_dt0,//dU_dt(x,0)
158  const tReal& s,//s=c^2*dt^2/dx^2
159  const tReal& dt,
160  EMM_RealArray& Ux_1) const;
161 
193  const tBoolean dirichletLC[2],
194  tReal U0(const tReal& t),//U(0,t)
195  tReal UL(const tReal& t),//U(L,t)
196  const EMM_RealArray& Ux_0,//U(0,x)
197  const EMM_RealArray& Vx_0,//V(0,x)
198  const tReal& c,
199  const tReal& dt,
200  const tReal& dx,
201  EMM_RealArray& dU_dt) const;
202 
203 protected:
250  tBoolean waveTE2Propagation(const tBoolean& isForward,
251  const tBoolean& isTXTOutput,
252  const tString& prefix,
253  const tBoolean& isPeriodic,
254  const tBoolean dirichletLC[2],
255  tReal U_0(const tReal& t),//U(0,t)
256  tReal U_L(const tReal& t),//U(L,t)
257  const tReal& C,
258  const tReal& L,
259  const tReal& cfl,
260  const tUIndex nT,
261  EMM_RealArray& U,
262  EMM_RealArray& V) const;
263 
336  virtual tBoolean waveSystemP1Propagation(const tBoolean& isTXTOutput,
337  const tString& prefix,
338  const tBoolean dirichletCL[2],
339  tReal U_0(const tReal& t),//U(0,t)
340  tReal U_L(const tReal& t),//U(L,t)
341  const tReal& c,
342  const tReal& L,
343  const tReal& dt,
344  const tUIndex nT,
345  EMM_RealArray& U,
346  EMM_RealArray& V) const;
347 
408  virtual tBoolean waveSystemP2Propagation(const tBoolean& isTXTOutput,
409  const tString& prefix,
410  const tBoolean dirichletLC[2],
411  tReal U_0(const tReal& t),//U(0,t)
412  tReal U_L(const tReal& t),//U(L,t)
413  const tReal& c,
414  const tReal& L,
415  const tReal& cfl,
416  const tUIndex nT,
417  EMM_RealArray& U,
418  EMM_RealArray& V) const;
419 protected:
420 
421  //wave examples
422  virtual tBoolean sinusoidalWave() const {
423  return EMM_WaveTest::sinusoidalWave("FDM");
424  }
425  virtual tBoolean triangleWave() const {
426  return EMM_WaveTest::triangleWave("FDM");
427  }
430  }
431  virtual tBoolean sharkWave() const {
432 
433  return EMM_WaveTest::sharkWave("FDM");
434  }
435 
436  virtual tBoolean barWave() const {
437  return EMM_WaveTest::barWave("FDM");
438  }
439 
440 };
441 
442 #endif
tBoolean computeVelocityWaveAtPreviousTime(const tBoolean &isPeriodic, const tBoolean dirichletLC[2], tReal U0(const tReal &t), tReal UL(const tReal &t), const EMM_RealArray &Ux_0, const EMM_RealArray &Vx_0, const tReal &c, const tReal &dt, const tReal &dx, EMM_RealArray &dU_dt) const
compute the velocity wave V(-dt,.) with Dirichlet/Neumann limit conditions.
Definition: EMM_WaveFDMTest.cpp:236
tBoolean computeWaveAtFirstTime(const tBoolean &isPeriodic, const tBoolean dirichletLC[2], tReal U0(const tReal &t), tReal UL(const tReal &t), const EMM_RealArray &Ux_0, const EMM_RealArray &dU_dt0, const tReal &s, const tReal &dt, EMM_RealArray &Ux_1) const
compute the wave U(dt,.) with Dirichlet/Neumann limit conditions
Definition: EMM_WaveFDMTest.cpp:125
#define tBoolean
Definition: types.h:139
virtual tBoolean waveSystemP1Propagation(const tBoolean &isTXTOutput, const tString &prefix, const tBoolean dirichletCL[2], tReal U_0(const tReal &t), tReal U_L(const tReal &t), const tReal &c, const tReal &L, const tReal &dt, const tUIndex nT, EMM_RealArray &U, EMM_RealArray &V) const
compute the wave at any time from initial conditions U(0,.) and V(0,x) and from dirichlet limit condi...
Definition: EMM_WaveFDMTest.cpp:565
DEFINE_SPTR(EMM_WaveFDMTest)
virtual tBoolean trianglePeriodicalWave() const
Definition: EMM_WaveFDMTest.h:428
virtual ~EMM_WaveFDMTest(void)
destroy the class
Definition: EMM_WaveFDMTest.cpp:11
virtual tBoolean sharkWave() const
Definition: EMM_WaveFDMTest.h:431
static SP::EMM_WaveFDMTest New()
create a test class
Definition: EMM_WaveFDMTest.h:61
this class is a test class for testing wave equation using the Finite Differences Method: ...
Definition: EMM_WaveFDMTest.h:29
This class is a test class for testing wave equation : .
Definition: EMM_WaveTest.h:28
virtual tBoolean waveSystemP2Propagation(const tBoolean &isTXTOutput, const tString &prefix, const tBoolean dirichletLC[2], tReal U_0(const tReal &t), tReal U_L(const tReal &t), const tReal &c, const tReal &L, const tReal &cfl, const tUIndex nT, EMM_RealArray &U, EMM_RealArray &V) const
compute the wave at any time from initial conditions U(0,.) and V(0,x) and from dirichlet limit condi...
Definition: EMM_WaveFDMTest.cpp:804
virtual tBoolean trianglePeriodicalWave() const =0
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
virtual tBoolean triangleWave() const
Definition: EMM_WaveFDMTest.h:425
virtual tBoolean barWave() const =0
virtual tBoolean sinusoidalWave() const
Definition: EMM_WaveFDMTest.h:422
EMM_WaveFDMTest(void)
create the class
Definition: EMM_WaveFDMTest.cpp:8
#define tString
Definition: types.h:135
virtual tBoolean sinusoidalWave() const =0
virtual tBoolean sharkWave() const =0
virtual tBoolean barWave() const
Definition: EMM_WaveFDMTest.h:436
tBoolean waveTE2Propagation(const tBoolean &isForward, const tBoolean &isTXTOutput, const tString &prefix, const tBoolean &isPeriodic, const tBoolean dirichletLC[2], tReal U_0(const tReal &t), tReal U_L(const tReal &t), const tReal &C, const tReal &L, const tReal &cfl, const tUIndex nT, EMM_RealArray &U, EMM_RealArray &V) const
compute the wave at any time from initial conditions U(0,.) and V(0,x) and from dirichlet limit condi...
Definition: EMM_WaveFDMTest.cpp:365
virtual tBoolean triangleWave() const =0
#define tReal
Definition: types.h:118
SP_OBJECT(EMM_WaveFDMTest)
tBoolean computeWaveAtPreviousTime(const tBoolean &isPeriodic, const tBoolean dirichletLC[2], tReal U0(const tReal &t), tReal UL(const tReal &t), const EMM_RealArray &Ux_0, const EMM_RealArray &dU_dt0, const tReal &s2, const tReal &dt, EMM_RealArray &Ux_1) const
compute the wave U(-dt,.) with Dirichlet/Neumann limit conditions.
Definition: EMM_WaveFDMTest.cpp:18
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141