C++ main module for emicrom Package  1.0
EMM_DisplacementWaveTest.h
Go to the documentation of this file.
1 #ifndef EMM_DisplacementWaveTest_H
2 #define EMM_DisplacementWaveTest_H
3 
4 #include "EMM_Test.h"
5 
6 
510 
512 
514  // ATTRIBUTES
515 
516 
517 public:
518 
519 
520 protected:
521  // METHODS
522 
523  // CONSTRUCTORS
524 
528 
529 
530 
531  // DESTRUCTORS
532 
533 
536  virtual ~EMM_DisplacementWaveTest(void);
537 
538 
539 
540 public:
543  inline static SP::EMM_DisplacementWaveTest New() {
544  SP::EMM_DisplacementWaveTest p(new EMM_DisplacementWaveTest(),
546  p->setThis(p);
547  return p;
548  };
549 
550 
551 
552 
553 
559  virtual tBoolean test(const CORE_Run& runner,const map<tString,tString>& options) const;
560 
561 
562 private:
563 
588  tBoolean loadData(const tString& fn,
589  tBoolean& isTXTOutput,
590  tBoolean& isVTIOutput,
591  tUSInt& dim,
592  tBoolean periodicity[3],
593  tBoolean dirichletLC[6],
594  tFlag& neumannFaces,
595  tReal neumannLC[6],
596  tReal& C,tReal& lambda,tReal& mu,tReal& rho,
597  tReal& L100,tReal& L111,
598  tReal L[3],
599  tUInteger N[3],
600  tUIndex& nTimes,
601  tReal& cfl,
602  tString& name,
603  EMM_RealArray& U,
604  tReal M0[3],
605  tString& solverName) const;
606 
613  tBoolean elasticWaveTest(const tBoolean& isHyperElastic,
614  const tString& method,
615  const tBoolean& equilibrium,
616  const tString& optionsFile) const;
617 
618 
627  tBoolean saveIntoFile(const tString& fileName,const tReal& Lc,const tReal L[],const tUIndex N[],const EMM_RealField& U) const;
628 
635  tBoolean saveIntoFile(const tString& fileName,const tUIndex& n, const vector<const tReal*>& data) const;
636 
644  tBoolean loadFromFile(const tString& fileName,const tUIndex &N,tReal* times, tReal * data) const;
645 
652  tBoolean loadFromFile(const tString& fileName,const tUIndex &N,EMM_RealField& U) const;
653 
654 private:
655  static void linearPieceWise_function(const tUInteger& n,//number of points
656  const tReal *X,//X values
657  const tReal* Y,//Y values
658  const tUInteger& nEvals,//number of evaluations
659  const tReal *Xvalues,//values of evaluations of x
660  tReal *Yvalues);
661 
662 };
663 
664 #endif
This class is a Run class for Common package.
Definition: CORE_Run.h:38
EMM_DisplacementWaveTest(void)
create the class
Definition: EMM_DisplacementWaveTest.cpp:16
#define tUInteger
Definition: types.h:91
tBoolean saveIntoFile(const tString &fileName, const tReal &Lc, const tReal L[], const tUIndex N[], const EMM_RealField &U) const
save into file of the form: x y z Ux Uy Uz
Definition: EMM_DisplacementWaveTest.cpp:1220
tBoolean loadFromFile(const tString &fileName, const tUIndex &N, tReal *times, tReal *data) const
load file of the form: t x into times and data arrays
Definition: EMM_DisplacementWaveTest.cpp:1326
#define tUSInt
Definition: types.h:28
#define tBoolean
Definition: types.h:139
This class is a test class for testing only the wave displacement in the magnetostriction equation: ...
Definition: EMM_DisplacementWaveTest.h:511
This class is a test class for E-MicromM package.
Definition: EMM_Test.h:25
static SP::EMM_DisplacementWaveTest New()
create a test class
Definition: EMM_DisplacementWaveTest.h:543
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
#define tString
Definition: types.h:135
DEFINE_SPTR(EMM_DisplacementWaveTest)
static void linearPieceWise_function(const tUInteger &n, const tReal *X, const tReal *Y, const tUInteger &nEvals, const tReal *Xvalues, tReal *Yvalues)
Definition: EMM_DisplacementWaveTest.cpp:194
virtual ~EMM_DisplacementWaveTest(void)
destroy the class
Definition: EMM_DisplacementWaveTest.cpp:19
tBoolean loadData(const tString &fn, tBoolean &isTXTOutput, tBoolean &isVTIOutput, tUSInt &dim, tBoolean periodicity[3], tBoolean dirichletLC[6], tFlag &neumannFaces, tReal neumannLC[6], tReal &C, tReal &lambda, tReal &mu, tReal &rho, tReal &L100, tReal &L111, tReal L[3], tUInteger N[3], tUIndex &nTimes, tReal &cfl, tString &name, EMM_RealArray &U, tReal M0[3], tString &solverName) const
load the data for the 1D wave
Definition: EMM_DisplacementWaveTest.cpp:247
SP_OBJECT(EMM_DisplacementWaveTest)
This class describes a real field.
Definition: EMM_RealField.h:21
tBoolean elasticWaveTest(const tBoolean &isHyperElastic, const tString &method, const tBoolean &equilibrium, const tString &optionsFile) const
test the 1D elastic bar
Definition: EMM_DisplacementWaveTest.cpp:597
#define tReal
Definition: types.h:118
virtual tBoolean test(const CORE_Run &runner, const map< tString, tString > &options) const
make the test
Definition: EMM_DisplacementWaveTest.cpp:24
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74