C++ main module for emicrom Package  1.0
EMM_Input.h
Go to the documentation of this file.
1 #ifndef EMM_Input_H
2 #define EMM_Input_H
3 
4 #include "EMM_IO.h"
5 
6 
8 
17 class EMM_Input : public EMM_IO {
18 
20  // ATTRIBUTES
21 
22 public:
23 
24 
25 
26 private:
27  //mModule: work array only used to save in AIM file.
28  //is mutable because this modification has no incidence on class state
29  //unsafe for openmp
31 
32 
33 protected:
34  // METHODS
35 
36  // CONSTRUCTORS
37 
40  EMM_Input(void);
41 
42 
43 
44  // DESTRUCTORS
45 
46 
49  virtual ~EMM_Input(void);
50 
51 public:
55  inline static SP::EMM_Input New() {
56  SP::EMM_Input p(new EMM_Input(),EMM_Input::Delete());
57  p->setThis(p);
58  return p;
59  };
60 
61 private:
62  // SET methods
63 
64 public:
65 
66 
67 
68 
69  // GET methods
70 
71 public:
72  // OTHERS methods
73 
77  virtual SP::EMM_LandauLifschitzSystem load() const {
78  SP::EMM_LandauLifschitzSystem p;
79  throw EMM_Exception("EMM_Input::load(beam)","not yet implemented");
80  return p;
81  }
82 
90  static tBoolean loadFieldFromFile(const tString& fileName,EMM_RealField& M);
91 
101  virtual tBoolean restoreBackup(EMM_LandauLifschitzSystem& system,tUInteger& timeStep,tReal& t,tReal& dt,tReal& E,tString& fn);
102 
111  static tBoolean loadBackup(const tString& fn,tUInteger& timeStep,tReal& t,tReal& dt,tReal& E);
112 
113 
114 
115 private:
121  tBoolean loadFieldFromTXTFile(EMM_RealField& M,const tString& suffix) const;
122 
129  return loadFieldFromAIMFile(getPath()+getPrefix()+".aim",M,module);
130  }
131 public:
138  static tBoolean loadFieldFromAIMFile(const tString& file,EMM_RealField& M,EMM_RealArray& module);
139 };
140 
141 #endif
This class is a I/O class for E-MicroM core package.
Definition: EMM_IO.h:16
DEFINE_SPTR(EMM_Input)
#define tUInteger
Definition: types.h:91
virtual ~EMM_Input(void)
destroy
Definition: EMM_Input.cpp:14
#define tBoolean
Definition: types.h:139
virtual tBoolean restoreBackup(EMM_LandauLifschitzSystem &system, tUInteger &timeStep, tReal &t, tReal &dt, tReal &E, tString &fn)
restore the backup for system
Definition: EMM_Input.cpp:17
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzSystem.h:88
static tBoolean loadBackup(const tString &fn, tUInteger &timeStep, tReal &t, tReal &dt, tReal &E)
loaf the backup file .rel
Definition: EMM_Input.cpp:97
tBoolean loadFieldFromTXTFile(EMM_RealField &M, const tString &suffix) const
load the field from txt file with suffix in txt file
Definition: EMM_Input.cpp:171
const tString & getPath() const
get the path
Definition: EMM_IO.h:88
This class describes a real array.
Definition: EMM_RealArray.h:16
#define tString
Definition: types.h:135
const tString & getPrefix() const
get the prefix
Definition: EMM_IO.h:95
this class describes the exceptions raised for E-MicromM package
Definition: EMM_Exception.h:14
static SP::EMM_Input New()
create an input class
Definition: EMM_Input.h:55
SP_OBJECT(EMM_Input)
static EMM_RealArray mModule
Definition: EMM_Input.h:30
This class describes a real field.
Definition: EMM_RealField.h:21
This class is a Input class for StochMagnet core package.
Definition: EMM_Input.h:17
#define tReal
Definition: types.h:118
EMM_Input(void)
create
Definition: EMM_Input.cpp:10
static tBoolean loadFieldFromFile(const tString &fileName, EMM_RealField &M)
load the magnetization from file
Definition: EMM_Input.cpp:156
virtual SP::EMM_LandauLifschitzSystem load() const
load the landau lifchitz system from file
Definition: EMM_Input.h:77
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
tBoolean loadFieldFromAIMFile(EMM_RealField &M, EMM_RealArray &module) const
save the field M and the module of the field H in aim file
Definition: EMM_Input.h:128