C++ main module for emicrom Package  1.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Member Functions | List of all members
EMM_WaveFDMTest Class Reference

this class is a test class for testing wave equation using the Finite Differences Method: $ \displaystyle \frac{\partial^2 u}{\partial t^2} = c^2 . \frac{\partial^2 u}{\partial x^2} $ More...

#include <EMM_WaveFDMTest.h>

Inheritance diagram for EMM_WaveFDMTest:
Inheritance graph
[legend]
Collaboration diagram for EMM_WaveFDMTest:
Collaboration graph
[legend]

Public Member Functions

virtual tBoolean test (const CORE_Run &runner, const map< tString, tString > &options) const
 make the test More...
 
virtual tBoolean performanceTest (const CORE_Run &runner, const map< tString, tString > &options) const
 make the perfomance tests More...
 
tString searchPath (const tString &fileName) const
 set the path to find the file with name fileName More...
 
void getSearchingPaths (vector< tString > &vpaths) const
 get the path fro seaching the files More...
 
SP::EMM_Grid3D createDomain (const tBoolean periodicity[3], const tReal L[3], const tUInteger N[3]) const
 create a cubic mesh More...
 
void createMatters (EMM_MatterField &matters, const tUIndex &nMatters, const tFlag &anisotropy, const tUIndex &nCells, const tReal &Lmin, const tReal &Lmax) const
 create matters & distribution on matters More...
 
void computeMField (const tString &path, EMM_RealField &M, const tReal &initSeed) const
 compute normalized magnetization field More...
 
void computeMField (EMM_RealField &M, const tReal &initSeed) const
 compute normalized magnetization field More...
 
SP::EMM_LandauLifschitzSystem createSystem (const CORE_Run &runner, const map< tString, tString > &options) const
 create the system More...
 
tBoolean testType () const
 test type More...
 
void getSharedPointer (SP::CORE_Object &p)
 get the shared pointer of this class into p More...
 
void getSharedPointer (SPC::CORE_Object &p) const
 get the shared pointer of this class into p More...
 
tString getClassName () const
 return the class name of the object More...
 
tString getIdentityString () const
 return the identity string of the object of the form className_at_address More...
 
tString getPointerAddress () const
 return the identity string of the object More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tBoolean isInstanceOf (const tString &name) const
 test if the object is an instance of className More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Static Public Member Functions

static SP::EMM_WaveFDMTest New ()
 create a test class More...
 
static tReal compareField (const EMM_RealField &F, const EMM_RealField &G, tUIndex &indexMax)
 compare 2 fields More...
 
static tBoolean isInBox (const tReal dim[3], const tReal x[3])
 return true if x[k] is in the [0,dim[k]] for all k in [0,3[ More...
 
static SP::EMM_Grid3D createCube (const tReal dim[3], const tUInteger N[3])
 create a cube More...
 
static SP::EMM_Grid3D createBox (const tReal dim[3], const tUInteger N[3])
 create a box More...
 
static void setIsMemoryChecked (const tBoolean &v)
 set if the memory checking is used More...
 
static void setOut (SP::CORE_Out out)
 set the output stream More...
 
static void resetOut ()
 reset the output stream More...
 
static void setThread (SP::CORE_Thread thread)
 set the thread More...
 
static void resetThread ()
 reset the output stream More...
 
static CORE_Outout ()
 get the output More...
 
static SP::CORE_Out getOut ()
 get the output More...
 
static CORE_ThreadgetThread ()
 get the profilier More...
 
static const tBooleanisMemoryChecked ()
 get if the memory checking is used More...
 
static tString getClassName (const tString &identityString)
 return the class name of the object More...
 
template<class T >
static tString getTypeName ()
 get type name More...
 
static tBoolean is64Architecture ()
 return true if the machine is a 64 bits machine More...
 
static tBoolean is32Architecture ()
 return true if the machine is a 32 bits machine More...
 
static tString pointer2String (const void *obj)
 return the string representation of a pointer More...
 
static void printObjectsInMemory (ostream &f)
 print object in memory More...
 
static void printObjectsInMemory ()
 print object in memory in the standart output More...
 
static tChar getMaxChar ()
 get the max value for tChar type More...
 
static tChar getMinChar ()
 get the min value for tChar type More...
 
static tUChar getMaxUChar ()
 get the max value for tUChar type More...
 
static tUChar getMinUChar ()
 get the min value for tUChar type More...
 
static tSInt getMaxSInt ()
 get the max value for tSInt type More...
 
static tSInt getMinSInt ()
 get the min value for tSInt type More...
 
static tUSInt getMaxUSInt ()
 get the max value for tUSInt type More...
 
static tUSInt getMinUSInt ()
 get the min value for tUSInt type More...
 
static tInt getMaxInt ()
 get the max value for tInt type More...
 
static tInt getMinInt ()
 get the min value for tInt type More...
 
static tUInt getMaxUInt ()
 get the max value for tUInt type More...
 
static tUInt getMinUInt ()
 get the min value for tUInt type More...
 
static tLInt getMaxLInt ()
 get the max value for tLInt type More...
 
static tLInt getMinLInt ()
 get the min value for tLInt type More...
 
static tULInt getMaxULInt ()
 get the max value for tULInt type More...
 
static tULInt getMinULInt ()
 get the min value for tULInt type More...
 
static tLLInt getMaxLLInt ()
 get the max value for tULInt type More...
 
static tLLInt getMinLLInt ()
 get the min value for tLLInt type More...
 
static tULLInt getMaxULLInt ()
 get the max value for tULLInt type More...
 
static tULLInt getMinULLInt ()
 get the min value for tULLInt type More...
 
static tFloat getMaxFloat ()
 get the max value for tFloat type More...
 
static tFloat getMinFloat ()
 get the min value for tFloat type More...
 
template<class T >
static T getEpsilon ()
 get the epsilon value for T type More...
 
template<class T >
static T getInfinity ()
 get the infinity for T type More...
 
static tFloat getFloatEpsilon ()
 get the epsilon value for tFloat type More...
 
static tFloat getFloatInfinity ()
 get the infinity value for tFloat type More...
 
static tDouble getMaxDouble ()
 get the max value for tDouble type More...
 
static tDouble getMinDouble ()
 get the min value for tDouble type More...
 
static tDouble getDoubleInfinity ()
 get the infinity value for tFloat type More...
 
static tDouble getDoubleEpsilon ()
 get the epsilon value for tDouble type More...
 
static tLDouble getMinLDouble ()
 get the min value for tLDouble type More...
 
static tLDouble getMaxLDouble ()
 get the max value for tLDouble type More...
 
static tLDouble getLDoubleEpsilon ()
 get the epsilon value for tLDouble type More...
 
static tDouble getLDoubleInfinity ()
 get the infinity value for tDouble type More...
 
static tIndex getMaxIndex ()
 get the max value for the array/vector indexing type More...
 
static tIndex getMinIndex ()
 get the min value for the array/vector indexing type More...
 
static tUIndex getMaxUIndex ()
 get the max value for difference the array/vector indexing type More...
 
static tUIndex getMinUIndex ()
 get the min value for difference the array/vector indexing type More...
 
static tFlag getMaxFlag ()
 get the max value for the tFlag type More...
 
static tFlag getMinFlag ()
 get the min value for the tFlag type More...
 
static tUInteger getMaxUInteger ()
 get the max value for the unsigned integer type More...
 
static tUInteger getMinUInteger ()
 get the min value for the unsigned integer type More...
 
static tInteger getMaxInteger ()
 get the max value for the integer type More...
 
static tInteger getMinInteger ()
 get the min value for the integer type More...
 
static tReal getMaxReal ()
 get the max value for the real type More...
 
static tReal getMinReal ()
 get the min value for the real type More...
 
static tReal getRealEpsilon ()
 get the eps which is the difference between 1 and the least value greater than 1 that is representable. More...
 
static tReal getRealInfinity ()
 get the infinity value More...
 
template<class T >
static T computeEpsilon ()
 compute epsilon More...
 

Static Public Attributes

static const tFlag PRIMARY_TESTS =0
 
static const tFlag ELEMENTARY_TESTS =1
 
static const tFlag CASE_TESTS =2
 
static const tFlag CASE_TEST =4
 
static const tFlag ALL_TESTS =3
 

Protected Member Functions

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. More...
 
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 More...
 
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. More...
 
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 conditions $ U_0(t) $ or/and $ U_L(t) $ and/or Neumann limit conditions $ \frac{\partial U}{\partial x}(0) =0 $ or/and $ \frac{\partial U}{\partial x}(L) =0 $ based on Taylor expansion of order 2 for time: $ \displaystyle \frac{\partial^2 U}{\partial t^2} = c^2. \frac{\partial^2 U}{\partial x^2} $ More...
 
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 conditions $ U(t,0)=U_0(t) $ or/and $ U(t,L)=U_L(t) $ and/or Neumann limit conditions $ \frac{\partial U}{\partial x}(0) =0 $ or/and $ \frac{\partial U}{\partial x}(L) =0 $ based on solving a system (U,V) : More...
 
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 conditions $ U(t,0)=U_0(t) $ or/and $ U(t,L)=U_L(t)$ and/or Neumann limit conditions $ \frac{\partial U}{\partial x}(0) =0 $ or/and $ \frac{\partial U}{\partial x}(L) =0 $ based on solving a system (V,W) More...
 
virtual tBoolean sinusoidalWave () const
 
virtual tBoolean triangleWave () const
 
virtual tBoolean trianglePeriodicalWave () const
 
virtual tBoolean sharkWave () const
 
virtual tBoolean barWave () const
 
tReal computeEnergy (const tUIndex &n, const tReal &C, const tReal &dx, const tReal &dt, const tReal *U, const tReal *Ut) const
 compute the energy of the wave : $ E=\\frac{1}{2} \int_0^L \|\frac{\partial u}{\partial t}\|^2 dx + \int_0^L \|\frac{\partial u}{\partial x}\|^2 dx $ More...
 
tBoolean save (const tString &fileName, const tReal &dx, const tReal *U, const tUIndex &nPts) const
 save the displacement at time with space space of dx More...
 
tBoolean save (const tString &fileName, const tReal &dx, const tReal *U, const tReal *V, const tUIndex &nPts) const
 save the displacement at time with space space of dx More...
 
tBoolean load (const tString &optionFile, tString &path, tBoolean &isTXTOutput, tBoolean &isPeriodic, tBoolean dirichletLC[2], tReal &L, tUIndex &nPoints, tReal &Umax, tReal &C, tUIndex &nTimes, tReal &cfl) const
 load the data from txt file More...
 
tBoolean sinusoidalWave (const tString &method) const
 
tBoolean triangleWave (const tString &method) const
 
tBoolean trianglePeriodicalWave (const tString &method) const
 
tBoolean sharkWave (const tString &method) const
 
tBoolean barWave (const tString &method) const
 
void setThis (SP::CORE_Object p)
 set this weak shared pointer called toDoAfterThis setting method More...
 
virtual void toDoAfterThisSetting ()
 method called after setThis() method this method can oly be called once. More...
 

Static Protected Member Functions

static tReal null_function (const tReal &t)
 
static tReal shark_function (const tReal &t)
 
static tReal triangle_function (const tReal &L, const tReal &U, const tReal &x)
 
static tReal sinusoidal_function (const tReal &L, const tReal &U, const tReal &x)
 
static void linearPieceWise_function (const tUInteger &n, const tReal *X, const tReal *Y, const tUInteger &nEvals, const tReal *Xvalues, tReal *Yvalues)
 

Private Member Functions

 SP_OBJECT (EMM_WaveFDMTest)
 
 EMM_WaveFDMTest (void)
 create the class More...
 
virtual ~EMM_WaveFDMTest (void)
 destroy the class More...
 

Detailed Description

this class is a test class for testing wave equation using the Finite Differences Method: $ \displaystyle \frac{\partial^2 u}{\partial t^2} = c^2 . \frac{\partial^2 u}{\partial x^2} $

The aproximation of time is either

Constructor & Destructor Documentation

◆ EMM_WaveFDMTest()

EMM_WaveFDMTest::EMM_WaveFDMTest ( void  )
private

create the class

Referenced by New().

Here is the caller graph for this function:

◆ ~EMM_WaveFDMTest()

EMM_WaveFDMTest::~EMM_WaveFDMTest ( void  )
privatevirtual

destroy the class

Member Function Documentation

◆ barWave() [1/2]

tBoolean EMM_WaveTest::barWave ( const tString method) const
protectedinherited

◆ barWave() [2/2]

virtual tBoolean EMM_WaveFDMTest::barWave ( ) const
inlineprotectedvirtual

Implements EMM_WaveTest.

References EMM_WaveTest::barWave().

Here is the call graph for this function:

◆ compareField()

tReal EMM_Test::compareField ( const EMM_RealField F,
const EMM_RealField G,
tUIndex indexMax 
)
staticinherited

compare 2 fields

Parameters
Fthe field to compare
Gthe secund field to compare
indexMaxthe index where the diffrenec of the norm is maximum
Returns
the max norm difference among all points

References EMM_RealField::getDimension(), EMM_RealField::getSize(), EMM_RealField::getValue(), tBoolean, tDimension, tReal, and tUIndex.

Referenced by EMM_Test::New(), and EMM_ODETest::testODE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeEnergy()

tReal EMM_WaveTest::computeEnergy ( const tUIndex n,
const tReal C,
const tReal dx,
const tReal dt,
const tReal U,
const tReal Ut 
) const
protectedinherited

compute the energy of the wave : $ E=\\frac{1}{2} \int_0^L \|\frac{\partial u}{\partial t}\|^2 dx + \int_0^L \|\frac{\partial u}{\partial x}\|^2 dx $

Parameters
n: number of point
Ccelerity of the wave
dxspace step size
dttime step size
U: U at t
UtU at t+dt

References null, tReal, and tUIndex.

Referenced by waveSystemP2Propagation(), waveTE2Propagation(), and EMM_WaveFEMTest::waveTE2Propagation().

Here is the caller graph for this function:

◆ computeEpsilon()

template<class T >
static T CORE_Object::computeEpsilon ( )
inlinestaticinherited

compute epsilon

Returns
the epsilon value eps=10^{-p/3} where p is defined by getEpsilon()=10^{-p}

◆ computeMField() [1/2]

void EMM_Test::computeMField ( const tString path,
EMM_RealField M,
const tReal initSeed 
) const
inherited

compute normalized magnetization field

Parameters
[in]path: path to find the M file if any
[out]M: field to generate
[in]initSeed: type of initialization of the fields :
  • -1 : M=(1,0,0)
  • -2 : M=(0,1,0)
  • -3 : M=(0,0,1)
  • -4 : M=(1,1,1)
  • -5 : M=(0,1,1)
  • -6 : M=(1,1,0)
  • -7 : M=(1,0,1)
  • >=0 : it loads the file M_nCells_initSeed.txt it its exists or create a random M and try to generete in in the path whre the file is supposed to be. The field M must be sized before.

References EMM_RealField::getSize(), EMM_RealField::initField(), EMM_RealField::loadFromFile(), EMM_RealField::saveToFile(), EMM_Test::searchPath(), EMM_RealField::setSize(), EMM_RealField::setValue(), tBoolean, CORE_Real::toString(), CORE_Integer::toString(), tReal, tString, and tUIndex.

Referenced by EMM_Test::computeMField(), and EMM_Test::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeMField() [2/2]

void EMM_Test::computeMField ( EMM_RealField M,
const tReal initSeed 
) const
inlineinherited

compute normalized magnetization field

Parameters
[out]M: field to generate
[in]initSeed: type of initialization of the fields :
  • -1 : M=(1,0,0)
  • -2 : M=(0,1,0)
  • -3 : M=(0,0,1)
  • -4 : M=(1,1,1)
  • -5 : M=(0,1,1)
  • -6 : M=(1,1,0)
  • -7 : M=(1,0,1)
  • >=0 : it loads the file M_nCells_initSeed.txt it its exists or create a random M and try to generete in in the path whre the file is supposed to be. The field M must be sized before.

References EMM_Test::computeMField(), and EMM_Test::createSystem().

Here is the call graph for this function:

◆ computeVelocityWaveAtPreviousTime()

tBoolean EMM_WaveFDMTest::computeVelocityWaveAtPreviousTime ( const tBoolean isPeriodic,
const tBoolean  dirichletLC[2],
tReal   U0const tReal &t,
tReal   ULconst 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
protected

compute the velocity wave V(-dt,.) with Dirichlet/Neumann limit conditions.

Parameters
isPeriodicthe wave is supposed to be periodic
dirichletLClimit condition of dirichlet
U0: function depending on time t at x=0 if dirichlet condition
UL: function depending on time t at x=L if dirichlet condition
Ux_0: initial value of U at t=0 for all x in [0,L]
Vx_0: initial value of V at t=0 for all x in [0,L]
ccelerity of the wave
dttime step
dxspace step
dU_dt: return the values of V at t-dt

V(t-dt,x)=V(t,x)-dt.(dV/dt)(t,x)+dt^2*c^2*d2V/(2*dx^2)

$ \displaystyle V(t+dt,x)= V(t,x)-dt.\frac{\partial V}{\partial t}(t,x))+\frac{dt^2}{2}.\frac{\partial^2 V}{\partial t^2}(t,x) $

$ \displaystyle \frac{\partial V}{\partial t}(t,x)= c^2 \displaystyle \frac{\partial^2 U}{\partial x^2}(t,x) $

$ \displaystyle \frac{\partial^2 V}{\partial t^2}(t,x)= c^2 \displaystyle \frac{\partial^2 V}{\partial x^2}(t,x) $

$ \Rightarrow \displaystyle V(t+dt,x)= V(t,x)-\displaystyle dt.c^2 \frac{U(0,x+dx)+U(0,x-dx)-2.U(0,x) }{dx^2} + \frac{dt^2.c^2}{2} \frac{V(0,x+dx)+V(0,x-dx)-2.V(0,x) }{dx^2} $

  • At boundary x=0
    • if Dirichlet limit condition, then $ V(-dt,0)=(U_0(-dt)-U(0,0))/dt $
    • if Neumann limit conidtion, then $V(-dt,0)=V(t,0)-dt*c^2*\frac{U(0,2.dx)+U(0,0)-2.U(0,dx) }{dx^2} + \frac{dt^2.c^2}{2} \frac{V(0,2.dx)+V(0,0)-2.V(0,dx) }{dx^2} $
  • At boundary x=L
    • if Dirichlet limit condition, then $ V(-dt,L)=(U_L(-dt)-U(L,0))/dt $
    • if Neumann, limit conditionn, then $V(-dt,0)=V(t,L)-dt*c^2*\frac{U(0,L-2.dx)+U(0,L)-2.U(0,L-dx) }{dx^2} + \frac{dt^2.c^2}{2} \frac{V(0,L-2.dx)+V(0,L)-2.V(0,L-dx) }{dx^2} $

References CORE_Array< T >::getSize(), tReal, and tUIndex.

Referenced by New(), and waveSystemP1Propagation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeWaveAtFirstTime()

tBoolean EMM_WaveFDMTest::computeWaveAtFirstTime ( const tBoolean isPeriodic,
const tBoolean  dirichletLC[2],
tReal   U0const tReal &t,
tReal   ULconst tReal &t,
const EMM_RealArray Ux_0,
const EMM_RealArray dU_dt0,
const tReal s,
const tReal dt,
EMM_RealArray Ux_1 
) const
protected

compute the wave U(dt,.) with Dirichlet/Neumann limit conditions

Parameters
isPeriodicthe wave is supposed to be periodic
dirichletLClimit condition of dirichlet
U0: function depending on time t at x=0 if dirichlet condition
UL: function depending on time t at x=L if dirichlet condition
Ux_0: initial value of U at t=0 for all x in [0,L[
dU_dt0: initial value of velocity of U at t=0 for all x in [0,L[
sthe quantity $ \frac{c^2*dt^2}{dx^2} $
dt: the time step
Ux_1: return the values of U at t=dt

$ \displaystyle \frac{\partial U}{\partial t}(t,x)=\frac{U(t+dt,x)-U(t-dt,x)}{2.dt} $

$ \displaystyle U(t-dt,x)=U(t+dt,x)-2.dt*\frac{\partial U}{\partial t}(t,x) $

$ \displaystyle \frac{\partial^2 U}{\partial t^2}= \displaystyle \frac{U(t+dt,x)+U(t-dt,x)-2.U(t,x) }{2.dt^2}$

$ \displaystyle \frac{\partial^2 U}{\partial x^2}= \displaystyle \frac{U(t,x+dx)+U(t,x-dx)-2.U(t,x) }{2.dx^2}$

$ \displaystyle \frac{\partial^2 U}{\partial t^2}= c^2 \displaystyle \frac{\partial^2 U}{\partial x^2} $

$ \Rightarrow \displaystyle \frac{U(t+dt,x)+U(t-dt,x)-2.U(t,x) }{2.dt^2} = \displaystyle c^2 \frac{U(t,x+dx)+U(t,x-dx)-2.U(t,x) }{2.dx^2} $

$ \Rightarrow \displaystyle U(t+dt,x)= \displaystyle 2.\left (1-c^2 \frac{dt^2}{dx^2} \right ).U(t,x)+c^2 \frac{dt^2}{dx^2} \left ( U(t,x+dx)+U(t,x-dx) \right ) -U(t-dt,x) $

so we deduce at first step that : $ \displaystyle U(t+dt,x)= \displaystyle \left (1-c^2 \frac{dt^2}{dx^2} \right ).U(t,x)+c^2 \frac{dt^2}{2.dx^2} \left ( U(t,x+dx)+U(t,x-dx) \right ) + dt*\frac{\partial U}{\partial t}(0,x) $

with $ s=c.\frac{dt}{dx} $, we obtain $ \displaystyle U(dt,x)= \displaystyle (1-s^2).U(0,x)+\frac{s^2}{2} \left ( U(0,x+dx)+U(0,x-dx) \right ) + dt*\frac{\partial U}{\partial t}(0,x) $

if the boundary limit condition on x=0 is Dirichlet , we have $ U(dt,0)=U_0(dt) $ if the boundary limit condition on x=0 is Neumann , to maintain a 2-order in dx, we have $ U(dt,0)=\frac{4*U(dt,dx)-U(dt,2dx)}{3}$ if the boundary limit condition on x=L is Dirichlet , we have $ U(dt,L)=U_L(dt) $ if the boundary limit condition on x=L is Neumann , to maintain a 2-order in dx, we have $ U(dt,L)=\frac{4*U(dt,L-dx)-U(dt,L-2dx)}{3}$

References CORE_Array< T >::getSize(), CORE_Array< T >::setSize(), tReal, and tUIndex.

Referenced by New(), and waveTE2Propagation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeWaveAtPreviousTime()

tBoolean EMM_WaveFDMTest::computeWaveAtPreviousTime ( const tBoolean isPeriodic,
const tBoolean  dirichletLC[2],
tReal   U0const tReal &t,
tReal   ULconst tReal &t,
const EMM_RealArray Ux_0,
const EMM_RealArray dU_dt0,
const tReal s2,
const tReal dt,
EMM_RealArray Ux_1 
) const
protected

compute the wave U(-dt,.) with Dirichlet/Neumann limit conditions.

Parameters
isPeriodicthe wave is supposed to be periodic
dirichletLClimit condition of dirichlet based on taylor expansion of order 2 for time:

$ \displaystyle \frac{\partial^2 U}{\partial t^2} = c^2. \frac{\partial^2 U}{\partial x^2} $

Parameters
U0: function depending on time t at x=0 if dirichlet condition
UL: function depending on time t at x=L if dirichlet condition
Ux_0: initial value of U at t=0 for all x in [0,L[
dU_dt0: initial value of velocity of U at t=0 for all x in [0,L[
s2the quantity $ \frac{c^2*dt^2}{dx^2} $
dt: the time step
Ux_1: return the values of U at t=-dt

$ \displaystyle U(t-dt,x)=U(t,x)-dt*\frac{\partial U}{\partial t}(t,x) +\frac{dt^2}{2}.\frac{\partial^2 U}{\partial t^2}(t,x)$

But, $ \displaystyle \frac{\partial^2 U}{\partial t^2} (t,x)= c^2 \displaystyle \frac{\partial^2 U}{\partial x^2}(t,x) $

$ \Rightarrow \displaystyle \frac{\partial^2 U}{\partial t^2}(t,x) = \displaystyle \frac{U(t,x+dx)+U(t,x-dx)-2.U(t,x) }{dx^2} $ $ \Rightarrow \displaystyle U(t-dt,x) = \displaystyle U(t,x)- dt .\frac{\partial U}{\partial t}(t,x) + \frac{dt^2 . c^2 }{2.dx^2} \left ( U(t,x+dx)+U(t,x-dx) -2.U(t,x) \right ) $

if the boundary limit condition on x=0 is Dirichlet , we have $ U(-dt,0)=U_0(-dt) $ if the boundary limit condition on x=0 is Neumann , to maintain a 2-order in dx, we have $ U(-dt,0)=\frac{4*U(-dt,dx)-U(-dt,2dx)}{3}$ if the boundary limit condition on x=L is Dirichlet , we have $ U(-dt,L)=U_L(-dt) $ if the boundary limit condition on x=L is Neumann , to maintain a 2-order in dx, we have $ U(-dt,L)=\frac{4*U(-dt,L-dx)-U(-dt,L-2dx)}{3}$

References CORE_Array< T >::getSize(), CORE_Array< T >::setSize(), tReal, and tUIndex.

Referenced by New(), waveSystemP1Propagation(), and waveTE2Propagation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createBox()

SP::EMM_Grid3D EMM_Test::createBox ( const tReal  dim[3],
const tUInteger  N[3] 
)
staticinherited

create a box

Parameters
dimdimension of a parallelipiped box in each direction
Nnumber of discretization on each direction of the box
Returns
a share pointer to the grid 3D

References EMM_Grid3D::getNeighborsIndicators(), EMM_Test::isInBox(), EMM_Grid3D::New(), EMM_Grid3D::setSegmentsNumber(), EMM_Grid3D::setStepsSize(), tCellFlag, tReal, tUIndex, tUSInt, and EMM_Grid3D::updateMagnetizedElementsNumber().

Referenced by EMM_Grid3DTest::cellDataPointDataTest(), EMM_Test::createDomain(), and EMM_Test::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCube()

SP::EMM_Grid3D EMM_Test::createCube ( const tReal  dim[3],
const tUInteger  N[3] 
)
staticinherited

create a cube

Parameters
dimdimension of a parallelipiped cube in each direction
Nnumber of discretization on each direction of the cube
Returns
a share pointer to the grid 3D

References EMM_Grid3D::getNeighborsIndicators(), EMM_Test::isInBox(), EMM_Grid3D::New(), EMM_Grid3D::setSegmentsNumber(), EMM_Grid3D::setStepsSize(), tCellFlag, tReal, tUInteger, tUSInt, and EMM_Grid3D::updateMagnetizedElementsNumber().

Referenced by EMM_Test::New(), EMM_TimeTest::testCubicAnisotropyEnergyDerivatives(), EMM_Grid3DTest::testSegment(), EMM_Grid3DTest::testThinSheet(), EMM_TimeTest::testTimeStepComputing(), and EMM_TimeTest::testZeemanEnergyDerivatives().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createDomain()

SP::EMM_Grid3D EMM_Test::createDomain ( const tBoolean  periodicity[3],
const tReal  L[3],
const tUInteger  N[3] 
) const
inherited

create a cubic mesh

Parameters
[in]periodicity: periodicity of the domain
[in]L: size of the domain
[in]N: discretization of the domain

References EMM_Test::createBox().

Referenced by EMM_DemagnetizedPeriodicalTest::HTest(), EMM_VelocitySolverTest::massMatrixTest(), EMM_VelocitySolverTest::massMatrixTrivialSolverTest(), EMM_DemagnetizedPeriodicalTest::multiSDGridScaleTest(), EMM_Test::New(), EMM_DemagnetizedPeriodicalTest::relaxationTest(), EMM_DemagnetizedPeriodicalTest::xyPeriodicalCubeSDGTest(), and EMM_DemagnetizedPeriodicalTest::xyPeriodicalSheetSDGTest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMatters()

void EMM_Test::createMatters ( EMM_MatterField matters,
const tUIndex nMatters,
const tFlag anisotropy,
const tUIndex nCells,
const tReal Lmin,
const tReal Lmax 
) const
inherited

create matters & distribution on matters

Parameters
[out]matters: matter field within the domain
[in]nMatters: number of matters to generate
[in]anisotropy: anisotrpy type of the matters
[in]nCells: number of cells of the mesh
[in]Lmin: min length of cells of the domain
[in]Lmax: max length of cells of the domain

References EMM_MatterField::addMatter(), EMM_MatterField::adimensionize(), EMM_MatterField::clear(), EMM_Matter::CUBIC_ANISOTROPY, EMM_Object::Gamma, EMM_Object::Mu0, EMM_Matter::New(), EMM_Matter::PLANAR_ANISOTROPY, EMM_MatterField::setSize(), tReal, tUIndex, and tUSInt.

Referenced by EMM_DemagnetizedPeriodicalTest::HTest(), EMM_DemagnetizedPeriodicalTest::multiSDGridScaleTest(), EMM_Test::New(), EMM_DemagnetizedPeriodicalTest::relaxationTest(), EMM_DemagnetizedPeriodicalTest::xyPeriodicalCubeSDGTest(), and EMM_DemagnetizedPeriodicalTest::xyPeriodicalSheetSDGTest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createSystem()

SP::EMM_LandauLifschitzSystem EMM_Test::createSystem ( const CORE_Run runner,
const map< tString, tString > &  options 
) const
inherited

create the system

Parameters
[in]runner: runner of the program to get the class factory
[in]options: options to create the system
  • "relaxation-time-integration" = "gl"|"ggl"|"rk4"|"te"
  • "relaxation-time order"="2"|"1"
  • "relaxation-rate"="1.e-8"
Returns
the laudau lifschitz system

References CORE_String::New(), and tString.

Referenced by EMM_Test::computeMField(), EMM_DemagnetizedPeriodicalTest::HTest(), EMM_DemagnetizedPeriodicalTest::multiSDGridScaleTest(), EMM_DemagnetizedPeriodicalTest::relaxationTest(), EMM_DemagnetizedPeriodicalTest::xyPeriodicalCubeSDGTest(), and EMM_DemagnetizedPeriodicalTest::xyPeriodicalSheetSDGTest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClassName() [1/2]

tString CORE_Object::getClassName ( ) const
inherited

return the class name of the object

Returns
the class name of the object

References tString.

Referenced by CORE_Object::getIdentityString(), EMM_Operator::getName(), and CORE_Object::isMemoryChecked().

Here is the caller graph for this function:

◆ getClassName() [2/2]

static tString CORE_Object::getClassName ( const tString identityString)
inlinestaticinherited

return the class name of the object

Parameters
identityStringthe identity string of the object
Returns
the class name

◆ getDoubleEpsilon()

static tDouble CORE_Object::getDoubleEpsilon ( )
inlinestaticinherited

get the epsilon value for tDouble type

Returns
the epsilon value for tDouble type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getDoubleInfinity()

static tDouble CORE_Object::getDoubleInfinity ( )
inlinestaticinherited

get the infinity value for tFloat type

Returns
the intinity value for tFloat type

◆ getEpsilon()

template<class T >
static T CORE_Object::getEpsilon ( )
inlinestaticinherited

get the epsilon value for T type

Returns
the epsilon value for T type

◆ getFloatEpsilon()

static tFloat CORE_Object::getFloatEpsilon ( )
inlinestaticinherited

get the epsilon value for tFloat type

Returns
the epsilon value for tFloat type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getFloatInfinity()

static tFloat CORE_Object::getFloatInfinity ( )
inlinestaticinherited

get the infinity value for tFloat type

Returns
the intinity value for tFloat type

◆ getIdentityString()

tString CORE_Object::getIdentityString ( ) const
inlineinherited

◆ getInfinity()

template<class T >
static T CORE_Object::getInfinity ( )
inlinestaticinherited

get the infinity for T type

Returns
the infinity value for T type

◆ getLDoubleEpsilon()

static tLDouble CORE_Object::getLDoubleEpsilon ( )
inlinestaticinherited

get the epsilon value for tLDouble type

Returns
the epsilon value for tLDouble type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getLDoubleInfinity()

static tDouble CORE_Object::getLDoubleInfinity ( )
inlinestaticinherited

get the infinity value for tDouble type

Returns
the infinity value for tDouble type

◆ getMaxChar()

static tChar CORE_Object::getMaxChar ( )
inlinestaticinherited

get the max value for tChar type

Returns
the max value for tChar type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxDouble()

static tDouble CORE_Object::getMaxDouble ( )
inlinestaticinherited

get the max value for tDouble type

Returns
the max value for tDouble type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxFlag()

static tFlag CORE_Object::getMaxFlag ( )
inlinestaticinherited

get the max value for the tFlag type

Returns
the max value for the tFlag type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxFloat()

static tFloat CORE_Object::getMaxFloat ( )
inlinestaticinherited

get the max value for tFloat type

Returns
the max value for tFloat type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxIndex()

static tIndex CORE_Object::getMaxIndex ( )
inlinestaticinherited

get the max value for the array/vector indexing type

Returns
the max value for the array/vector indexing type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxInt()

static tInt CORE_Object::getMaxInt ( )
inlinestaticinherited

get the max value for tInt type

Returns
the max value for tInt type

Referenced by MATSGN_FFT::fastFourierTransform3D_FFTW(), and CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxInteger()

static tInteger CORE_Object::getMaxInteger ( )
inlinestaticinherited

get the max value for the integer type

Returns
the max value for the integer type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxLDouble()

static tLDouble CORE_Object::getMaxLDouble ( )
inlinestaticinherited

get the max value for tLDouble type

Returns
the max value for tLDouble type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxLInt()

static tLInt CORE_Object::getMaxLInt ( )
inlinestaticinherited

get the max value for tLInt type

Returns
the max value for tLInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxLLInt()

static tLLInt CORE_Object::getMaxLLInt ( )
inlinestaticinherited

get the max value for tULInt type

Returns
the max value for tULInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxReal()

static tReal CORE_Object::getMaxReal ( )
inlinestaticinherited

get the max value for the real type

Returns
he max value for the real type

Referenced by EMM_MatterField::adimensionize(), and CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxSInt()

static tSInt CORE_Object::getMaxSInt ( )
inlinestaticinherited

get the max value for tSInt type

Returns
the max value for tSInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxUChar()

static tUChar CORE_Object::getMaxUChar ( )
inlinestaticinherited

get the max value for tUChar type

Returns
the max value for tUChar type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxUIndex()

static tUIndex CORE_Object::getMaxUIndex ( )
inlinestaticinherited

get the max value for difference the array/vector indexing type

Returns
the max value for difference the array/vector indexing type

Referenced by CORE_Vector< T >::addAfterIndices(), CORE_Vector< T >::search(), CORE_Test::testType(), CORE_Integer::toHexString(), and CORE_Integer::toString().

Here is the caller graph for this function:

◆ getMaxUInt()

static tUInt CORE_Object::getMaxUInt ( )
inlinestaticinherited

get the max value for tUInt type

Returns
the max value for tUInt type

Referenced by EMM_Array< tCellFlag >::loadFromFile(), EMM_RealField::loadFromFile(), and CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxUInteger()

static tUInteger CORE_Object::getMaxUInteger ( )
inlinestaticinherited

get the max value for the unsigned integer type

Returns
the max value for the unsigned integer type

Referenced by MATH_Pn::computeExtrenums(), EMM_MultiScaleGrid::computeLevelsNumber(), EMM_Input::restoreBackup(), MATH_P0::solve(), and CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxULInt()

static tULInt CORE_Object::getMaxULInt ( )
inlinestaticinherited

get the max value for tULInt type

Returns
the max value for tULInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxULLInt()

static tULLInt CORE_Object::getMaxULLInt ( )
inlinestaticinherited

get the max value for tULLInt type

Returns
the max value for tULLInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMaxUSInt()

static tUSInt CORE_Object::getMaxUSInt ( )
inlinestaticinherited

get the max value for tUSInt type

Returns
the max value for tUSInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinChar()

static tChar CORE_Object::getMinChar ( )
inlinestaticinherited

get the min value for tChar type

Returns
the min value for tChar type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinDouble()

static tDouble CORE_Object::getMinDouble ( )
inlinestaticinherited

get the min value for tDouble type

Returns
the min value for tDouble type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinFlag()

static tFlag CORE_Object::getMinFlag ( )
inlinestaticinherited

get the min value for the tFlag type

Returns
the min value for the tFlag type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinFloat()

static tFloat CORE_Object::getMinFloat ( )
inlinestaticinherited

get the min value for tFloat type

Returns
the min value for tFloat type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinIndex()

static tIndex CORE_Object::getMinIndex ( )
inlinestaticinherited

get the min value for the array/vector indexing type

Returns
the min value for the array/vector indexing type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinInt()

static tInt CORE_Object::getMinInt ( )
inlinestaticinherited

get the min value for tInt type

Returns
the min value for tInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinInteger()

static tInteger CORE_Object::getMinInteger ( )
inlinestaticinherited

get the min value for the integer type

Returns
the minin value for the integer type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinLDouble()

static tLDouble CORE_Object::getMinLDouble ( )
inlinestaticinherited

get the min value for tLDouble type

Returns
the min value for tLDouble type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinLInt()

static tLInt CORE_Object::getMinLInt ( )
inlinestaticinherited

get the min value for tLInt type

Returns
the min value for tLInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinLLInt()

static tLLInt CORE_Object::getMinLLInt ( )
inlinestaticinherited

get the min value for tLLInt type

Returns
the min value for tLLInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinReal()

static tReal CORE_Object::getMinReal ( )
inlinestaticinherited

get the min value for the real type

Returns
the min value for the real type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinSInt()

static tSInt CORE_Object::getMinSInt ( )
inlinestaticinherited

get the min value for tSInt type

Returns
the min value for tSInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinUChar()

static tUChar CORE_Object::getMinUChar ( )
inlinestaticinherited

get the min value for tUChar type

Returns
the min value for tUChar type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinUIndex()

static tUIndex CORE_Object::getMinUIndex ( )
inlinestaticinherited

get the min value for difference the array/vector indexing type

Returns
the min value for difference the array/vector indexing type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinUInt()

static tUInt CORE_Object::getMinUInt ( )
inlinestaticinherited

get the min value for tUInt type

Returns
the min value for tUInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinUInteger()

static tUInteger CORE_Object::getMinUInteger ( )
inlinestaticinherited

get the min value for the unsigned integer type

Returns
the min value for the unsigned integer type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinULInt()

static tULInt CORE_Object::getMinULInt ( )
inlinestaticinherited

get the min value for tULInt type

Returns
the min value for tULInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinULLInt()

static tULLInt CORE_Object::getMinULLInt ( )
inlinestaticinherited

get the min value for tULLInt type

Returns
the min value for tULLInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getMinUSInt()

static tUSInt CORE_Object::getMinUSInt ( )
inlinestaticinherited

get the min value for tUSInt type

Returns
the min value for tUSInt type

Referenced by CORE_Test::testType().

Here is the caller graph for this function:

◆ getOut()

static SP::CORE_Out CORE_Object::getOut ( )
inlinestaticinherited

get the output

Returns
the shared pointer to the output stream

References CORE_Object::OUT.

◆ getPointerAddress()

tString CORE_Object::getPointerAddress ( ) const
inlineinherited

return the identity string of the object

Returns
the identity string of the object

References CORE_Object::pointer2String().

Here is the call graph for this function:

◆ getRealEpsilon()

static tReal CORE_Object::getRealEpsilon ( )
inlinestaticinherited

get the eps which is the difference between 1 and the least value greater than 1 that is representable.

Returns
the eps which is the difference between 1 and the least value greater than 1 that is representable.

Referenced by MATH_P4::solveP4De(), and CORE_Test::testType().

Here is the caller graph for this function:

◆ getRealInfinity()

static tReal CORE_Object::getRealInfinity ( )
inlinestaticinherited

◆ getSearchingPaths()

void EMM_Test::getSearchingPaths ( vector< tString > &  vpaths) const
inherited

◆ getSharedPointer() [1/2]

void CORE_Object::getSharedPointer ( SP::CORE_Object &  p)
inlineinherited

◆ getSharedPointer() [2/2]

void CORE_Object::getSharedPointer ( SPC::CORE_Object &  p) const
inlineinherited

get the shared pointer of this class into p

Parameters
p: shared pointer of the class This

◆ getThread()

static CORE_Thread& CORE_Object::getThread ( )
inlinestaticinherited

get the profilier

Returns
the profiler

Referenced by MATH_MaskVector::add(), MATH_Vector::add(), EMM_DisplacementFEMOperator::addBoundaryElasticStress(), EMM_DisplacementFEMOperator::buildDataOnNeumannBoundaryFaces(), EMM_DisplacementFVMOperator::computeCineticEnergy(), EMM_DisplacementFVMOperator::computeElasticStress(), EMM_DisplacementFEMOperator::computeElasticStress(), EMM_DisplacementFVMOperator::computeElasticTensor(), EMM_DisplacementFEMOperator::computeElasticTensor(), EMM_StaticMagneticTensorOperator::computeEnergy(), EMM_CubicAnisotropyOperator::computeEnergy(), EMM_MagnetostrictionOperator::computeEnergy(), EMM_DisplacementOperator::computeEnergy(), EMM_AnisotropyOperator::computeEnergyWithMagneticExcitation(), EMM_DisplacementFVMOperator::computeEquilibriumMatrixDiagonalConditioner(), EMM_DisplacementFEMOperator::computeEquilibriumMatrixDiagonalConditioner(), EMM_FullExchangeOperator::computeMagneticExcitationField(), EMM_StaticMagnetostrictionOperator::computeMagneticExcitationField(), EMM_LinearAnisotropyOperator::computeMagneticExcitationField(), EMM_StaticMagneticTensorOperator::computeMagneticExcitationField(), EMM_CubicAnisotropyOperator::computeMagneticExcitationField(), EMM_MinimalExchangeOperator::computeMagneticExcitationField(), EMM_AnisotropyOperator::computeMagneticExcitationField(), EMM_MagnetostrictionOperator::computeMagneticExcitationField(), EMM_CubicAnisotropyOperator::computeMagneticExcitationFieldGradient(), EMM_AnisotropyOperator::computeMagneticExcitationFieldGradient(), EMM_DisplacementFVMOperator::computeMagneticStress(), EMM_DisplacementFEMOperator::computeMagneticStress(), EMM_OptimalTimeStep::computeOptimalTimeStep(), EMM_DisplacementFEMOperator::computeStressConstraintEnergy(), EMM_FullExchangeOperator::discretize(), EMM_MinimalExchangeOperator::discretize(), EMM_CondensedMassMatrix::discretize(), EMM_LinearAnisotropyOperator::discretize(), EMM_AnisotropyOperator::discretize(), EMM_DemagnetizedOperator::discretize(), EMMG_SLDemagnetizedOperator::discretize(), EMM_LandauLifschitzSystem::discretize(), MATH_Vector::divide(), MATH_MaskVector::dot(), MATH_Vector::dot(), EMM_4SymmetricTensors::doubleDot(), EMM_4Tensors::doubleDotCrossDoubleDotScalar(), EMM_4Tensors::doubleDotCrossProduct(), EMM_4Tensors::doubleDotCrossSquaredScalar(), EMM_4Tensors::doubleDotProduct(), MATH_Vector::init(), MATH_MaskVector::init(), EMM_LandauLifschitzODE_RK::integrateMagnetizationFieldAtTime(), EMM_DisplacementFVM_Interpolator::interpolateUAtVertices(), EMMG_SLDemagnetizedOperator::localAssembly(), EMM_DisplacementOperator::nullProjectionOnDirichletBoundary(), EMM_DisplacementOperator::periodicProjection(), EMM_2PackedSymmetricTensors::product(), EMM_CanonicalMassMatrix::product(), MATH_FullMatrix::product(), EMM_CondensedMassMatrix::product(), EMM_BlockMassMatrix::product(), MATH_MorseMatrix::product(), EMMG_SLDemagnetizedOperator::product(), EMM_DisplacementOperator::projectionOnDirichletBoundary(), EMM_LandauLifschitzSystem::resetOperatorsToInitialState(), EMM_DisplacementFVMOperator::setBoundaryFaceTypes(), FFTW_MultiDFTs::setFFT(), FFTW_MultiLevelsDFT::setFFT(), FFTW_MultiLevelsDFT::setLevels(), FFTW_MultiDFTs::setPlan(), FFTW_MultiLevelsDFT::setPlan(), EMM_CondensedMassMatrix::solve(), EMM_LandauLifschitzODE::solveODE(), EMM_4SymmetricTensors::squaredDoubleDot(), EMM_4Tensors::squaredDoubleDotCrossScalar(), EMM_4Tensors::squaredDoubleDotScalar(), EMM_CanonicalMassMatrix::symmetricDot(), EMM_CondensedMassMatrix::symmetricDot(), EMM_BlockMassMatrix::symmetricDot(), FFTW_Test::test(), MATH_SolverTest::test(), EMM_ODETest::testODE(), and EMM_Grid3D::updateLimitConditionOnPoints().

Here is the caller graph for this function:

◆ getTypeName()

template<class T >
static tString CORE_Object::getTypeName ( )
inlinestaticinherited

get type name

Returns
the type name of the class

References tString.

◆ is32Architecture()

static tBoolean CORE_Object::is32Architecture ( )
inlinestaticinherited

return true if the machine is a 32 bits machine

Returns
true is the computing is done in a 32 bits machine

References CORE_Object::pointer2String(), CORE_Object::printObjectsInMemory(), and tString.

Referenced by CORE_Test::testType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is64Architecture()

static tBoolean CORE_Object::is64Architecture ( )
inlinestaticinherited

return true if the machine is a 64 bits machine

Returns
true is the computing is done in a 64 bits machine

Referenced by EMM_VTK::getVTKType(), and CORE_Test::testType().

Here is the caller graph for this function:

◆ isInBox()

tBoolean EMM_Test::isInBox ( const tReal  dim[3],
const tReal  x[3] 
)
staticinherited

return true if x[k] is in the [0,dim[k]] for all k in [0,3[

Parameters
dimdimension of the parallelepiped cube
xcoordinates of the point
Returns
trie if the point x is in the box

References tBoolean, and tUSInt.

Referenced by EMM_Test::createBox(), EMM_Test::createCube(), and EMM_Test::New().

Here is the caller graph for this function:

◆ isInstanceOf() [1/2]

template<class T >
tBoolean CORE_Object::isInstanceOf ( ) const
inlineinherited

test if the clas T is an instance of this class

Returns
true if the object is an instance of T

References null.

Referenced by MATH_ToeplitzTest::toeplitzTest().

Here is the caller graph for this function:

◆ isInstanceOf() [2/2]

tBoolean CORE_Object::isInstanceOf ( const tString name) const
inlineinherited

test if the object is an instance of className

Parameters
namename of the class
Returns
true if the object is an instance of class Name

References CORE_Object::getIdentityString().

Here is the call graph for this function:

◆ isMemoryChecked()

static const tBoolean& CORE_Object::isMemoryChecked ( )
inlinestaticinherited

get if the memory checking is used

Returns
true: if the memory checking is used.

References CORE_Object::getClassName(), CORE_Object::mIsMemoryTesting, and tString.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ linearPieceWise_function()

void EMM_WaveTest::linearPieceWise_function ( const tUInteger n,
const tReal X,
const tReal Y,
const tUInteger nEvals,
const tReal Xvalues,
tReal Yvalues 
)
staticprotectedinherited

References tReal, and tUInteger.

Referenced by EMM_WaveTest::barWave(), EMM_WaveTest::shark_function(), and EMM_WaveTest::triangle_function().

Here is the caller graph for this function:

◆ load()

tBoolean EMM_WaveTest::load ( const tString optionFile,
tString path,
tBoolean isTXTOutput,
tBoolean isPeriodic,
tBoolean  dirichletLC[2],
tReal L,
tUIndex nPoints,
tReal Umax,
tReal C,
tUIndex nTimes,
tReal cfl 
) const
protectedinherited

load the data from txt file

Parameters
optionFilename of the file containing lines key=value The keys are
  • "dirichlet0"
  • "dirichlet1"
  • "L"
  • "nPoints"
  • "Umax"
  • "C"
  • "nTimes"
  • "cfl"
  • "txt-output"
paththe path where the option file is found
isTXTOutput: true to save the evolution in txt files
isPeriodic: true if the domain is supposed to be periodic
dirichletLC: read the dirichlet conditions on x=0 and x=L
Lthe length of the 1D-domain
nPoints: number of discretized points on x
Umaxthe maximum amplitude of U
Cthe celerity of the wave
nTimesthe number of time steps
cflthe cfl condition <=1
Returns
true if the loading succeeded

References EMM_Test::getSearchingPaths(), CORE_Integer::parseInt(), CORE_Real::parseReal(), EMM_Test::searchPath(), CORE_String::string2Boolean(), tChar, tIndex, tString, tUIndex, and tUInt.

Referenced by EMM_WaveTest::barWave(), EMM_WaveTest::sharkWave(), EMM_WaveTest::sinusoidalWave(), EMM_WaveTest::trianglePeriodicalWave(), and EMM_WaveTest::triangleWave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ New()

static SP::EMM_WaveFDMTest EMM_WaveFDMTest::New ( )
inlinestatic

create a test class

References computeVelocityWaveAtPreviousTime(), computeWaveAtFirstTime(), computeWaveAtPreviousTime(), EMM_WaveFDMTest(), tBoolean, tReal, tString, tUIndex, waveSystemP1Propagation(), waveSystemP2Propagation(), and waveTE2Propagation().

Referenced by EMM_DisplacementWaveTest::test().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ null_function()

tReal EMM_WaveTest::null_function ( const tReal t)
staticprotectedinherited

◆ out()

static CORE_Out& CORE_Object::out ( )
inlinestaticinherited

get the output

Returns
the output stream

Referenced by EMM_Matter::adimensionize(), EMM_DisplacementFVMOperator::backup(), EMM_DisplacementOperator::backup(), MATH_ElementaryMultiLevelsToeplitzMatrix::buildSpectralVectorProjector(), EMM_Test::caseTest(), EMM_Test::caseTests(), EMM_MatterField::computeAnisotropyDirectionsField(), EMM_OptimalTimeStep::computeOptimalTimeStep(), MATH_MultiLevelsToeplitzMatrix::copy(), CORE_Exception::CORE_Exception(), EMM_MatterField::createAnisotropyOperator(), CORE_Run::createIO(), EMM_ElementaryTest::defaultBackupTest(), EMM_ElementaryTest::defaultTest(), MATH_MultiLevelsFFTToeplitzMatrix::diagonalize(), EMM_DisplacementFVMOperator::discretize(), EMM_MagnetostrictionOperator::discretize(), EMM_DisplacementFEMOperator::discretize(), EMM_4SymmetricTensors::doubleDot(), EMM_4Tensors::doubleDotCrossDoubleDotScalar(), EMM_TensorsTest::doubleDotCrossDoubleDotScalarTests(), EMM_4Tensors::doubleDotCrossProduct(), EMM_TensorsTest::doubleDotCrossProductTests(), EMM_4Tensors::doubleDotCrossSquaredScalar(), EMM_TensorsTest::doubleDotCrossSquaredScalarTests(), EMM_4Tensors::doubleDotProduct(), EMM_TensorsTest::doubleDotProductTests(), EMM_DisplacementWaveTest::elasticWaveTest(), EMM_Test::elementaryTests(), FFTW_Test::fftwTutorial(), MATH_IntegrationTest::gaussLegendreTest(), EMM_MagnetostrictionTest::HComputingTest(), EMM_DemagnetizedPeriodicalTest::HTest(), EMMH_HysteresisTest::hysteresisDefaultCycleTest(), EMM_TensorsTest::initializationTests(), EMM_MultiScaleGrid::initialize(), EMM_MultiScaleSDGrid::initialize(), EMM_MatterField::loadFromANIFile(), EMM_AnisotropyDirectionsField::loadFromFile(), EMM_Matter::loadFromFile(), EMM_Grid3D::loadFromGEOFile(), EMM_MatterField::loadFromLOCFile(), EMM_Array< tCellFlag >::loadFromStream(), EMM_Matter::loadFromStream(), EMM_Matter::loadMattersFromFile(), EMM_Run::loadSystemFromOptions(), EMM_ElementaryTest::magnetostrictionBackupTest(), CORE_Run::make(), EMMH_Run::makeHysteresis(), EMM_Run::makeRun(), CORE_Run::makeType(), EMM_ElementaryTest::optionsTest(), MATH_PolynomialTest::P4Tests(), EMM_Test::primaryTests(), EMM_LandauLifschitzSystem::printLog(), CORE_Run::printOptions(), EMM_2PackedSymmetricTensors::product(), EMMG_SLDemagnetizedOperator::projectionOnSpectralSpace(), CORE_Run::readOptionsFromCommandLine(), CORE_Test::readVectorTest(), EMM_DemagnetizedPeriodicalTest::relaxationTest(), EMM_DisplacementFVMOperator::restore(), EMM_DisplacementOperator::restore(), EMM_Input::restoreBackup(), EMMH_Hysteresis::run(), EMM_Output::save(), EMM_AnisotropyDirectionsField::saveToFile(), EMM_MatterField::saveToFile(), EMM_Grid3D::saveToGEOFile(), CORE_IOTest::searchTest(), EMMH_Hysteresis::setInitialMagnetizationField(), MATH_MultiLevelsToeplitzMatrix::setLevels(), EMM_4SymmetricTensors::squaredDoubleDot(), EMM_4Tensors::squaredDoubleDotCrossScalar(), EMM_TensorsTest::squaredDoubleDotCrossScalarTests(), EMM_4Tensors::squaredDoubleDotScalar(), EMM_TensorsTest::squaredDoubleDotScalarTests(), EMM_TensorsTest::squaredDoubleDotTests(), EMM_MatterTest::testAdimensionize(), EMM_MatterTest::testANIFile(), CORE_Test::testComplex(), CORE_Test::testDateWeek(), FFTW_Test::testDFT(), EMM_MatterTest::testIO(), EMM_ODETest::testODE(), CORE_Test::testOut(), CORE_Test::testReal(), EMM_FieldTest::testRealArray(), EMM_Grid3DTest::testSegment(), EMM_Grid3DTest::testThinSheet(), CORE_Test::testTime(), CORE_Test::testType(), MATH_FullMatrix::toString(), EMM_DemagnetizedPeriodicalTest::xyPeriodicalCubeSDGTest(), and EMM_DemagnetizedPeriodicalTest::xyPeriodicalSheetSDGTest().

Here is the caller graph for this function:

◆ performanceTest()

tBoolean EMM_Test::performanceTest ( const CORE_Run runner,
const map< tString, tString > &  options 
) const
virtualinherited

make the perfomance tests

Parameters
runnerthe associated runner
optionsthe option sof the test to run
Returns
true if succeeds

Reimplemented from CORE_Test.

Reimplemented in EMM_OperatorsTest.

References CORE_Run::getClassFactory(), tBoolean, and EMM_Test::test().

Referenced by EMM_Test::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pointer2String()

tString CORE_Object::pointer2String ( const void *  obj)
staticinherited

return the string representation of a pointer

Parameters
obj: oject to get the string pointer
Returns
the string pointer of the object

References tString.

Referenced by CORE_Object::CORE_Object(), CORE_Object::getIdentityString(), CORE_Object::getPointerAddress(), CORE_Object::is32Architecture(), and CORE_Object::~CORE_Object().

Here is the caller graph for this function:

◆ printObjectsInMemory() [1/2]

void CORE_Object::printObjectsInMemory ( ostream &  f)
staticinherited

print object in memory

Parameters
f: output to print the objects in memory

References CORE_Object::getIdentityString(), CORE_Object::getSharedPointer(), CORE_Object::mIsMemoryTesting, CORE_Object::mObjects, and tInteger.

Here is the call graph for this function:

◆ printObjectsInMemory() [2/2]

static void CORE_Object::printObjectsInMemory ( )
inlinestaticinherited

print object in memory in the standart output

Referenced by CORE_Object::is32Architecture(), and main().

Here is the caller graph for this function:

◆ resetOut()

static void CORE_Object::resetOut ( )
inlinestaticinherited

reset the output stream

Referenced by run().

Here is the caller graph for this function:

◆ resetThread()

static void CORE_Object::resetThread ( )
inlinestaticinherited

reset the output stream

Referenced by run().

Here is the caller graph for this function:

◆ save() [1/2]

tBoolean EMM_WaveTest::save ( const tString fileName,
const tReal dx,
const tReal U,
const tUIndex nPts 
) const
protectedinherited

save the displacement at time with space space of dx

Parameters
fileNamename of the file to save
dxthe space step
Uthe displacement U
nPts: the number of space step

References tReal, and tUIndex.

Referenced by waveSystemP1Propagation(), waveSystemP2Propagation(), waveTE2Propagation(), and EMM_WaveFEMTest::waveTE2Propagation().

Here is the caller graph for this function:

◆ save() [2/2]

tBoolean EMM_WaveTest::save ( const tString fileName,
const tReal dx,
const tReal U,
const tReal V,
const tUIndex nPts 
) const
protectedinherited

save the displacement at time with space space of dx

Parameters
fileNamename of the file to save
dxthe space step
Uthe displacement U
Vthe velocity V
nPts: the number of space step

References tReal, and tUIndex.

◆ searchPath()

tString EMM_Test::searchPath ( const tString fileName) const
inherited

◆ setIsMemoryChecked()

static void CORE_Object::setIsMemoryChecked ( const tBoolean v)
inlinestaticinherited

set if the memory checking is used

Parameters
v: true to check memory

Referenced by main().

Here is the caller graph for this function:

◆ setOut()

static void CORE_Object::setOut ( SP::CORE_Out  out)
inlinestaticinherited

set the output stream

Parameters
out: the shared pointer to the new output stream

References null.

◆ setThis()

void CORE_Object::setThis ( SP::CORE_Object  p)
inlineprotectedinherited

set this weak shared pointer called toDoAfterThis setting method

Parameters
p: shared pointer of the class This

References CORE_Object::toDoAfterThisSetting().

Here is the call graph for this function:

◆ setThread()

static void CORE_Object::setThread ( SP::CORE_Thread  thread)
inlinestaticinherited

set the thread

Parameters
threadthe shared pointer to the thread

References null.

Referenced by EMM_Run::EMM_Run(), EMM_TensorsRun::EMM_TensorsRun(), and MATH_SolverRun::MATH_SolverRun().

Here is the caller graph for this function:

◆ shark_function()

tReal EMM_WaveTest::shark_function ( const tReal t)
staticprotectedinherited

References EMM_WaveTest::linearPieceWise_function(), tReal, and tUInteger.

Referenced by EMM_WaveTest::sharkWave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sharkWave() [1/2]

tBoolean EMM_WaveTest::sharkWave ( const tString method) const
protectedinherited

◆ sharkWave() [2/2]

virtual tBoolean EMM_WaveFDMTest::sharkWave ( ) const
inlineprotectedvirtual

Implements EMM_WaveTest.

References EMM_WaveTest::sharkWave().

Here is the call graph for this function:

◆ sinusoidal_function()

tReal EMM_WaveTest::sinusoidal_function ( const tReal L,
const tReal U,
const tReal x 
)
staticprotectedinherited

References tReal.

Referenced by EMM_WaveTest::sinusoidalWave().

Here is the caller graph for this function:

◆ sinusoidalWave() [1/2]

tBoolean EMM_WaveTest::sinusoidalWave ( const tString method) const
protectedinherited

◆ sinusoidalWave() [2/2]

virtual tBoolean EMM_WaveFDMTest::sinusoidalWave ( ) const
inlineprotectedvirtual

Implements EMM_WaveTest.

References EMM_WaveTest::sinusoidalWave().

Here is the call graph for this function:

◆ SP_OBJECT()

EMM_WaveFDMTest::SP_OBJECT ( EMM_WaveFDMTest  )
private

◆ test()

tBoolean EMM_WaveTest::test ( const CORE_Run runner,
const map< tString, tString > &  options 
) const
virtualinherited

make the test

Returns
true if succeeds

Reimplemented from EMM_Test.

References EMM_WaveTest::barWave(), EMM_WaveTest::sharkWave(), EMM_WaveTest::sinusoidalWave(), tBoolean, EMM_WaveTest::trianglePeriodicalWave(), EMM_WaveTest::triangleWave(), and tString.

Here is the call graph for this function:

◆ testType()

tBoolean CORE_Test::testType ( ) const
inherited

test type

References CORE_Object::getDoubleEpsilon(), CORE_Object::getFloatEpsilon(), CORE_Object::getLDoubleEpsilon(), CORE_Object::getMaxChar(), CORE_Object::getMaxDouble(), CORE_Object::getMaxFlag(), CORE_Object::getMaxFloat(), CORE_Object::getMaxIndex(), CORE_Object::getMaxInt(), CORE_Object::getMaxInteger(), CORE_Object::getMaxLDouble(), CORE_Object::getMaxLInt(), CORE_Object::getMaxLLInt(), CORE_Object::getMaxReal(), CORE_Object::getMaxSInt(), CORE_Object::getMaxUChar(), CORE_Object::getMaxUIndex(), CORE_Object::getMaxUInt(), CORE_Object::getMaxUInteger(), CORE_Object::getMaxULInt(), CORE_Object::getMaxULLInt(), CORE_Object::getMaxUSInt(), CORE_Object::getMinChar(), CORE_Object::getMinDouble(), CORE_Object::getMinFlag(), CORE_Object::getMinFloat(), CORE_Object::getMinIndex(), CORE_Object::getMinInt(), CORE_Object::getMinInteger(), CORE_Object::getMinLDouble(), CORE_Object::getMinLInt(), CORE_Object::getMinLLInt(), CORE_Object::getMinReal(), CORE_Object::getMinSInt(), CORE_Object::getMinUChar(), CORE_Object::getMinUIndex(), CORE_Object::getMinUInt(), CORE_Object::getMinUInteger(), CORE_Object::getMinULInt(), CORE_Object::getMinULLInt(), CORE_Object::getMinUSInt(), CORE_Object::getRealEpsilon(), CORE_Object::getRealInfinity(), CORE_Object::is32Architecture(), CORE_Object::is64Architecture(), CORE_Object::out(), CORE_Out::setVerbose(), tBoolean, tChar, tComplex, tDouble, tFlag, tFloat, tIndex, tInt, tInteger, tLDouble, tLInt, tLLInt, tReal, tSInt, tString, tUChar, tUIndex, tUInt, tUInteger, tULInt, tULLInt, and tUSInt.

Referenced by CORE_Test::New(), and CORE_Test::test().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toDoAfterThisSetting()

virtual void CORE_Object::toDoAfterThisSetting ( )
inlineprotectedvirtualinherited

method called after setThis() method this method can oly be called once.

Reimplemented in EMM_DisplacementOperator, EMM_DisplacementFVMOperator, EMM_GaussLegendreRelaxation, EMM_GradGaussLegendreRelaxation, and EMM_Object.

Referenced by CORE_Object::setThis().

Here is the caller graph for this function:

◆ toString()

virtual tString CORE_Object::toString ( ) const
inlinevirtualinherited

return the string representation of the object node

Returns
the string representation of the object node

Reimplemented in EMM_DisplacementOperator, EMM_LandauLifschitzSystem, CORE_Array< T >, CORE_Array< tReal >, CORE_Array< tUInteger >, CORE_Array< tString >, CORE_Array< tLimitCondition >, CORE_Array< tUIndex >, CORE_Array< tUChar >, CORE_Array< tCellFlag >, EMM_Grid3D, CORE_Time, CORE_Vector< T >, EMM_Matter, CORE_Out, EMM_DisplacementFEMOperator, EMM_RealField, EMM_DisplacementFVMOperator, CORE_MorseArray< T >, CORE_MorseArray< tReal >, CORE_MorseArray< tUIndex >, CORE_MorseArray< tUChar >, EMM_MagnetostrictionOperator, MATH_MultiLevelsToeplitzMatrix, FFTW_ComplexArray, MATSGN_ComplexArray, EMM_MatterField, CORE_Color, FFTW_Complex, EMM_MultiScaleGrid, MATSGN_Complex, EMM_DisplacementFVM_VTEGROperator, EMM_CondensedMassMatrix, EMM_LandauLifschitzFunction, EMM_Tensors, EMM_DisplacementFVM_SSGROperator, EMMG_SLDemagnetizedOperator, EMM_BlockMassMatrix, CORE_Array2D< T >, EMM_DisplacementFVM_STEGROperator, EMMH_HysteresisFile, EMM_IterativeTimeStep, CORE_SharedPointersVMap< Key, Value >, CORE_SharedPointersVMap< tString, const CORE_Object >, CORE_SharedPointersVMap< tString, CORE_Object >, EMM_AnisotropyDirectionsField, EMM_DemagnetizedOperator, CORE_SharedPointersListVMap< Key, Value >, CORE_String, EMM_OptimalTimeStep, MATH_MaskArrayVector, CORE_SharedPointersKVMap< Key, Value >, MATH_ArrayVector, EMM_Stepper, EMM_CanonicalMassMatrix, MATH_Pn, MATH_FullMatrix, EMMG_SLPeriodicMultiScale, EMM_HyperElasticMatter, MATH_Matrix, CORE_Array3D< T >, EMM_CubicElasticMatter, CORE_Complex, CORE_Integer, CORE_Real, and EMM_MagnetostrictiveMatter.

References CORE_Object::getIdentityString().

Referenced by CORE_Out::genericPrint(), EMM_VelocitySolverTest::massMatrixTrivialSolverTest(), MATH_ConjugateGradient::solve(), CORE_SharedPointersKVMap< Key, Value >::toString(), CORE_SharedPointersListVMap< Key, Value >::toString(), CORE_SharedPointersVMap< tString, CORE_Object >::toString(), EMM_MagnetostrictionOperator::toString(), EMM_Matter::toString(), and EMM_DisplacementOperator::toString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triangle_function()

tReal EMM_WaveTest::triangle_function ( const tReal L,
const tReal U,
const tReal x 
)
staticprotectedinherited

References EMM_WaveTest::linearPieceWise_function(), tReal, and tUInteger.

Referenced by EMM_WaveTest::trianglePeriodicalWave(), and EMM_WaveTest::triangleWave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trianglePeriodicalWave() [1/2]

tBoolean EMM_WaveTest::trianglePeriodicalWave ( const tString method) const
protectedinherited

◆ trianglePeriodicalWave() [2/2]

virtual tBoolean EMM_WaveFDMTest::trianglePeriodicalWave ( ) const
inlineprotectedvirtual

Implements EMM_WaveTest.

References EMM_WaveTest::trianglePeriodicalWave().

Here is the call graph for this function:

◆ triangleWave() [1/2]

tBoolean EMM_WaveTest::triangleWave ( const tString method) const
protectedinherited

◆ triangleWave() [2/2]

virtual tBoolean EMM_WaveFDMTest::triangleWave ( ) const
inlineprotectedvirtual

Implements EMM_WaveTest.

References EMM_WaveTest::triangleWave().

Here is the call graph for this function:

◆ waveSystemP1Propagation()

tBoolean EMM_WaveFDMTest::waveSystemP1Propagation ( const tBoolean isTXTOutput,
const tString prefix,
const tBoolean  dirichletCL[2],
tReal   U_0const tReal &t,
tReal   U_Lconst tReal &t,
const tReal c,
const tReal L,
const tReal dt,
const tUIndex  nT,
EMM_RealArray U,
EMM_RealArray V 
) const
protectedvirtual

compute the wave at any time from initial conditions U(0,.) and V(0,x) and from dirichlet limit conditions $ U(t,0)=U_0(t) $ or/and $ U(t,L)=U_L(t) $ and/or Neumann limit conditions $ \frac{\partial U}{\partial x}(0) =0 $ or/and $ \frac{\partial U}{\partial x}(L) =0 $ based on solving a system (U,V) :

  • $ \displaystyle V=\frac{\partial U}{\partial t} $
  • $ \displaystyle \frac{\partial V }{\partial t}=c^2. \frac{\partial^2 U}{\partial x^2} $.

This relations imply : $ \displaystyle \frac{\partial^2 V }{\partial t^2}=c^2. \frac{\partial^2 V}{\partial x^2} $

Parameters
isTXTOutput: true to save evolution in TXT files
prefixprefix for saving file
dirichletCLlimit condition of dirichlet
U_0: function depending on time t at x=0 if dirichlet condition
U_L: function depending on time t at x=L if dirichlet condition
cthe celerity
Lthe length of the bar
dttime step
nT: the number of time steps
U: initial value of U on x a t=0, returned U(x,t)
V: initial value of velocity at t=0 for all x in [0,L[, returned V(x,t)
  1. compute the displacement U(-dt,x) at order 2 in time from U(0,x) and from the velocity dU_dt(0,x) for all x in [0,L[ with the formula :

    $ U(-dt,x)=U(0,x)-dt.V(0,x) + \displaystyle \frac{dt^2.c^2}{2}. \frac{\partial^2 U}{\partial x^2}(0,x)$

  2. compute the velocity at order 2 in time : V(-dt,x) from U(0,x) and the velocity dU_dt(0,x) for all x in [0,L[ with the formula :

    $ V(-dt,x)=V(0,x)-dt.c^2. \frac{\partial^2 U}{\partial x^2}(0,x) - \frac{dt^2.c^2}{2} \frac{\partial^2 V}{\partial x^2}(0,x) $

  3. at any time t > 0
    • compute the secund space variation of U : $ \partial^2 U=U(t,x+dx)+U(t,x-dx,t)-2.U(t,x) $
    • compute the secund space variation of V : $ \partial^2 V=V(t,x+dx)+V(t,x-dx,t)-2.V(t,x) $
    • compute the displacement U with the formula $ \displaystyle U(t+dt,x)=U(t,x)+dt.V(t,x)+\frac{dt^2.c^2}{2} \frac{ \partial^2 U}{\partial x^2 } $
    • compute the displacement V with the formula $ \displaystyle V(t+dt,x)=V(t,x)+dt.c^2. \frac{\partial^2 U}{\partial x^2} $
  4. use the dirichlet limit condition for all t at x=0 and x=L: for example,
    • if dirichlet condition on x=0 :
      • $ U(t+dt,0)=U_0(t+dt) $
      • $ V(t+dt,0)=\displaystyle \frac{U_0(t+dt)-U_0(t)}{dt} $
    • if neumann condition on x=0 :
      • $ U(t+dt,0)=U(t+dt,dx) $
      • $ V(t+dt,0)=\displaystyle \frac{U(t+dt,0)-U(t,0)}{dt}= \displaystyle \frac{U(t+dt,dx)-U(t,0)}{dt} $

For studying the stability of the solution, we suppose $ U(t^n,x_k)=P^n. e^{i.\omega.k.h}$ and $ V(t^n,x_k)=Q^n. e^{i.\Omega.k.h}$ where $ h=dx=x_{k+1}-x_k $. It gives:

  • $ P^{n+1}=P^n+dt.Q^n.e^{i\theta_k} - \displaystyle \frac{dt^2.c^2}{h^2}.P^n.(1-cos(\omega.h)) $ where $ \theta_k=(\Omega-\omega).k.h$
  • $ Q^{n+1}=Q^n - \displaystyle 2.\frac{dt.c^2}{h^2}.P^n.e^{-i\theta_k}(1-cos(\omega.h)) $

with $ s=\frac{c.dt}{h}$ and $ \lambda=s^2.(1-cos(\omega.h))$,

  • $ P^{n+1}=\displaystyle P^n+dt.Q^n.e^{i\theta_k} - \lambda.P^n $
  • $ Q^{n+1}=\displaystyle Q^n - 2.\frac{\lambda}{dt}.P^n.e^{-i\theta_k} $

So with,

$ P^n= \displaystyle - \frac{dt.e^{i\theta_k}}{2.\lambda} \left ( Q^{n+1}-Q^{n} \right ) $,

we obtain

$ \displaystyle \left ( Q^{n+2}-Q^{n+1} \right ) = \displaystyle \left ( Q^{n+1}-Q^{n} \right ) - 2.\lambda Q^n. - \lambda. \left ( Q^{n+1}-Q^{n} \right ) $

so, $ \displaystyle Q^{2}-Q = Q-1 - 2.\lambda - \lambda. \left ( Q-1 \right ) $

We have to find Q such that $ |Q| \leq 1 $ and $ Q^2+ (\lambda-2).Q + (1 + \lambda) = 0 $.

The discriment is $ \Delta=\lambda.(\lambda-8)$.

  • If $ \Delta \geq 0 $, then $ Q=(\lambda/2.-1) + \sqrt{\Delta}/2 > 1 $ , so the solution is unstable.
  • If $ \Delta < 0 $, then $ Q= (\lambda/2.-1) \pm i \sqrt{-\Delta}/2 $ whose module $ |Q|^2= 1+\lambda > 1 $. So the solution is always unstable.

Implements EMM_WaveTest.

References computeVelocityWaveAtPreviousTime(), computeWaveAtPreviousTime(), CORE_Array< T >::getSize(), EMM_WaveTest::save(), CORE_Real::toString(), CORE_Integer::toString(), tReal, tString, and tUIndex.

Referenced by New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ waveSystemP2Propagation()

tBoolean EMM_WaveFDMTest::waveSystemP2Propagation ( const tBoolean isTXTOutput,
const tString prefix,
const tBoolean  dirichletLC[2],
tReal   U_0const tReal &t,
tReal   U_Lconst tReal &t,
const tReal c,
const tReal L,
const tReal cfl,
const tUIndex  nT,
EMM_RealArray U,
EMM_RealArray V 
) const
protectedvirtual

compute the wave at any time from initial conditions U(0,.) and V(0,x) and from dirichlet limit conditions $ U(t,0)=U_0(t) $ or/and $ U(t,L)=U_L(t)$ and/or Neumann limit conditions $ \frac{\partial U}{\partial x}(0) =0 $ or/and $ \frac{\partial U}{\partial x}(L) =0 $ based on solving a system (V,W)

  • $ \displaystyle V=\frac{\partial U }{\partial t} $
  • $ \displaystyle W=\frac{\partial U }{\partial x} $
  • $ \displaystyle \frac{\partial V }{\partial t}=c^2. \frac{\partial W}{\partial x} $
  • $ \displaystyle \frac{\partial W }{\partial t}= \frac{\partial V }{\partial x} $
Parameters
isTXTOutput: true to generate output files
prefixprefix for saving file
dirichletLClimit condition of dirichlet
U_0: function depending on time t at x=0 if dirichlet condition
U_L: function depending on time t at x=L if dirichlet condition
cthe celerity
Lthe length of the bar
cflcondition for convergence cfl=C*dt/dx<=1
nT: the number of time steps
U: initial value of U on x a t=0, returned U(x,t)
V: initial value of velocity at t=0 for all x in [0,L[, returned V(x,t)
  • compute $ W(0,x)= \frac{\partial U(0,x)}{\partial x} $
  • for all time :
    • compute $ dW_x= W(t,x+dx)-W(t,x-dx) $
    • compute $ dV_x= V(t,x+dx)-V(t,x-dx) $
    • compute $ d^2V_x= V(t,x+dx)+V(t,x-dx) -2.V(t,x) $
    • compute $ d^2W_x= W(t,x+dx)+W(t,x-dx) -2.W(t,x) $
    • compute $ V(t+dt,x)=V(t,x)+dt. c^2 \frac{dW_x}{2.dx} + dt^2.c^2 \frac{d^2V_x}{2.dx^2} $
    • compute $ W(t+dt,x)=W(t,x)+dt. \frac{dV_x}{2.dx} + dt^2.c^2 \frac{d^2W_x}{2.dx^2} $
    • compute optional U $ U(t+dt,x)=U(t,x)+dt.V(t,x) + \frac{dt^2.c^2.dW_x}{4.dx} + \frac{dt^3.c^2.d2V_x}{6.dx^2} $
    • apply the limit conditions:
      • if dirichlet on x=0
        • $ V(t+dt,0)=\frac{\partial U(0,t)}{\partial t} $
        • $ W(t+dt,0)=W(t+dt,dx)$ ( $\frac{\partial W}{\partial x}=0$)
      • else if neumann on x=0
        • $ W(t+dt,0)=0 $ ( $\frac{\partial U}{\partial x}=0$)
        • $ V(t+dt,0)=V(dx,t)+\frac{dt.c^2.dW_x}{4.dx}+\frac{dt^2.c^2.d2V_x}{6.dx^2} $ because $ V(t+dt,0)=\frac{\partial U}{\partial t}=\frac{U(t+dt,0)-U(t,0)}{dt}$ and $U(t+dt,0)=U(t+dt,dx)$, $U(t,0)=U(t,dx)$ and $ U(t+dt,dx)-U(t,dx)=dt.V(t,dx)+\frac{dt^2.c^2.dW_x}{4.dx} +\frac{dt^3.c^2.d^2V_x}{6.dx^2}$

For studying the stability of the solution, we can transform the system by usig the variable U(t,x)=[V(t,x),W(t,x)], we have the Tyalor expansion at ordeer 2 in time

$ U(t+dt,x)=U(t,x)+dt.\frac{\partial U}{\partial t} + \frac{dt^2}{2} \frac{\partial^2 U}{\partial t^2}$

As we have $ \displaystyle \frac{\partial U }{\partial t}=A. \frac{\partial U }{\partial x} $ with

$ A = \left[ {\begin{array}{cc} 0 & c^2 \\ 1 & 0 \end{array} } \right] $

As A can be diagonilized with two different eigen values c and -c, we can study the stability in each coordinate of the eigen vectors basis:

By denoting by $ \tilde U_d $ the d-coordinate of the vector U in the eigen vector basis we have:

$ \tilde U_d(t+dt,x)=\displaystyle \tilde U(t,x)+\frac{\epsilon_d c.dt}{2.dx} \left (\tilde U_d(t,x+dx)-\tilde U_d(t,x-dx)\right ) + \frac{c^2. dt^2}{2.dx^2} \left( \tilde U_d(t,x+dx)+ \tilde U_d(t,x-dx)-2.\tilde U_d(t,x) \right ) $.

To study the stability , we find the solution $ \tilde U_d(t,x)=\rho^n . e^{i.\omega.k.dx} $. So, we obtain:

$ \rho = \displaystyle 1+ \frac{\epsilon_d.c.dt}{dx} i. sin(\omega dx) -\frac{c^2. dt^2}{dx^2} \left (1-cos(\omega.dx) \right ) $.

So the module of $ \rho $ is $ |\rho|^2=\displaystyle \left (1-s^2.(1-cos(\omega.dx) \right )^2 + s^2. sin^2(\omega.dx)$ when $s=\displaystyle \frac{c.dt}{dx} $.

So, $ |\rho| \leq 1 $ implies $ s \leq \displaystyle \frac{2}{1-cos(\omega.dx)} -\frac{sin^2(\omega.dx)}{\left(1-cos(\omega.dx)\right )^2 }=1 $. undex the condion $ d_leq 1 $ with have the satiblity of the solution

Implements EMM_WaveTest.

References EMM_WaveTest::computeEnergy(), CORE_Array< T >::getSize(), EMM_WaveTest::save(), CORE_Real::toString(), CORE_Integer::toString(), tReal, tString, and tUIndex.

Referenced by New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ waveTE2Propagation()

tBoolean EMM_WaveFDMTest::waveTE2Propagation ( const tBoolean isForward,
const tBoolean isTXTOutput,
const tString prefix,
const tBoolean isPeriodic,
const tBoolean  dirichletLC[2],
tReal   U_0const tReal &t,
tReal   U_Lconst tReal &t,
const tReal C,
const tReal L,
const tReal cfl,
const tUIndex  nT,
EMM_RealArray U,
EMM_RealArray V 
) const
protectedvirtual

compute the wave at any time from initial conditions U(0,.) and V(0,x) and from dirichlet limit conditions $ U_0(t) $ or/and $ U_L(t) $ and/or Neumann limit conditions $ \frac{\partial U}{\partial x}(0) =0 $ or/and $ \frac{\partial U}{\partial x}(L) =0 $ based on Taylor expansion of order 2 for time: $ \displaystyle \frac{\partial^2 U}{\partial t^2} = c^2. \frac{\partial^2 U}{\partial x^2} $

Parameters
isForward: the first displacement is computing at dt if true. Otherwise, the displacement at -dt is built
isTXTOutput: true to save evolution in TXT files
prefixprefix for saving file
isPeriodicthe wave is supposed to be periodic
dirichletLClimit condition of dirichlet
U_0: function depending on time t at x=0 if dirichlet condition
U_L: function depending on time t at x=L if dirichlet condition
Cthe celerity
Lthe length of the bar
cflcondition for convergence cfl=C*dt/dx<=1
nT: the number of time steps
U: initial value of U on x a t=0, returned U(t,x)
V: initial value of velocity at t=0 for all x in [0,L[, returned V(t,x)
  1. compute the displacement U(dt,x) from U(0,x) and U(-dt,x) for all x in [0,L[ with the following formula (see computeWaveAtFirstTime() ) :

    $ \displaystyle U(dt,x)= \displaystyle U(0,x) + dt. V(0,x) + \frac{c^2.dt^2}{2.dx^2} \left ( U(0,x+dx)+U(0,x-dx)-2.U(0,x)\right ) $

    $ \Rightarrow \displaystyle U(dt,x)= \displaystyle (1-s^2). U(0,x) + dt. V(0,x) + \frac{s^2}{2}. \left ( U(0,x+dx)+U(0,x-dx) \right ) $ with $ \displaystyle s=\frac{c.dt}{dx}$

  2. use the following formula: As $ \displaystyle \frac{\partial^2 U}{\partial t^2} = \displaystyle \frac{U(t+dt,.)+U(t-dt,.x)-2/U(t,.)}{dt^2} $, we have

    $ \forall t >dt, U(t+dt,x) = \displaystyle 2. (1- s^2) U(t,x) + s^2 \displaystyle \left ( U(t,x+dx)+U(t,x-dx) \right ) - U(t-dt,x) $

  3. update the limit conditions :
    • if the boundary limit condition on x=0 is Dirichlet , we have $ U(t+dt,0)=U_0(t+dt) $
    • if the boundary limit condition on x=0 is Neumann , to maintain a 2-order in dx, we have $ U(t+dt,0)=\frac{4*U(t+dt,dx)-U(t+dt,2dx)}{3}$
    • if the boundary limit condition on x=L is Dirichlet , we have $ U(t+dt,L)=U_L(t) $
    • if the boundary limit condition on x=L is Neumann , to maintain a 2-order in dx, we have $ U(t+dt,L)=\frac{4*U(t+dt,L-dx)-U(t+dt,L-2dx)}{3}$

The stability of the solution is given by finding a solution of the form $ U(t^n,x_k)=\rho^n. e^{i.\omega.k.h}$ where $ h=dx=x_{k+1}-x_k$ within the preceeding formula. It gives:

$ \rho^2 +1 -2.\alpha \rho = 0 $ with $ \alpha= 1-s^2.(1-cos(w.h)) $.

To have a solution with module less than one, we need to have a negative discriminant i.e; $ -1 \leq \alpha \leq 1 $ which leads to

$ \displaystyle s \leq \sqrt{\frac{2}{1-cos(wh)}} $.

As $ \displaystyle \sqrt{\frac{2}{1-cos(wh)}}>=1 $, if we have $ s<=1 $, then algorithm is stable.

Implements EMM_WaveTest.

References EMM_WaveTest::computeEnergy(), computeWaveAtFirstTime(), computeWaveAtPreviousTime(), CORE_Array< T >::getSize(), EMM_WaveTest::save(), CORE_Real::toString(), CORE_Integer::toString(), tReal, tString, and tUIndex.

Referenced by New().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ALL_TESTS

const tFlag EMM_Test::ALL_TESTS =3
staticinherited

Referenced by EMM_Test::test().

◆ CASE_TEST

const tFlag EMM_Test::CASE_TEST =4
staticinherited

Referenced by EMM_Test::test().

◆ CASE_TESTS

const tFlag EMM_Test::CASE_TESTS =2
staticinherited

Referenced by EMM_Test::test().

◆ ELEMENTARY_TESTS

const tFlag EMM_Test::ELEMENTARY_TESTS =1
staticinherited

Referenced by EMM_Test::test().

◆ PRIMARY_TESTS

const tFlag EMM_Test::PRIMARY_TESTS =0
staticinherited

Referenced by EMM_Test::test().


The documentation for this class was generated from the following files: