C++ main module for emicrom Package  1.0
EMM_OptimalTimeStep.h
Go to the documentation of this file.
1 #ifndef EMM_OptimalTimeStep_H
2 #define EMM_OptimalTimeStep_H
3 
4 #include "EMM_RegularTimeStep.h"
5 
6 
7 #include "EMM_RealField.h"
8 #include "MATH_P4.h"
9 
12 
120 
122  // ATTRIBUTES
123 
124 public:
125 
126 
127 
128 private:
129 
130  mutable MATH_P4 mP4;
131 
132  //working array
133  tReal mT[4];
134  SP::EMM_RealField mGradH_gradF;
135 
136 
137 protected:
138  // METHODS
139 
140  // CONSTRUCTORS
141 
144  EMM_OptimalTimeStep(void);
145 
146 
147 
148  // DESTRUCTORS
149 
150 
153  virtual ~EMM_OptimalTimeStep(void);
154 
155 
156 private:
157 
158 public:
159  // New share pointer constructor
162  static inline SP::EMM_OptimalTimeStep New() {
163  SP::EMM_OptimalTimeStep p(new EMM_OptimalTimeStep(),EMM_OptimalTimeStep::Delete());
164  p->setThis(p);
165  return p;
166  }
167 
168  // SET methods
169 
170 
171  // GET methods
172 
173 public:
178  virtual tBoolean isSystemCompatible(SPC::EMM_LandauLifschitzSystem system) const {
179  return EMM_RegularTimeStep::isSystemCompatible(system) && system->isAffine();
180  }
181 
206  virtual tBoolean computeNewTimeStep(tReal& dt,tUInteger& nEvaluations);
207 
208 public:
209  // OTHERS methods
210 
211 
212 
216  virtual tString toString() const {
218  }
219 
220 
221 
222 private:
229 };
230 
231 #endif
tReal mT[4]
Definition: EMM_OptimalTimeStep.h:133
This class describes implements the gradient of the landau Lifschitz function to use optimal time ste...
Definition: EMM_GradGaussLegendreRelaxation.h:24
MATH_P4 mP4
Definition: EMM_OptimalTimeStep.h:130
EMM_OptimalTimeStep(void)
create
Definition: EMM_OptimalTimeStep.cpp:6
#define tUInteger
Definition: types.h:91
virtual tBoolean isSystemCompatible(SPC::EMM_LandauLifschitzSystem system) const
return true if the system is comatible with the computeNewDt() method
Definition: EMM_OptimalTimeStep.h:178
virtual tString toString() const
turn the regular time into a string
Definition: EMM_Stepper.cpp:49
#define tBoolean
Definition: types.h:139
tBoolean computeOptimalTimeStep(EMM_GradGaussLegendreRelaxation &GSystem, tReal &dt)
update the time step
Definition: EMM_OptimalTimeStep.cpp:28
SP::EMM_RealField mGradH_gradF
Definition: EMM_OptimalTimeStep.h:134
virtual tBoolean computeNewTimeStep(tReal &dt, tUInteger &nEvaluations)
compute the new time step
Definition: EMM_OptimalTimeStep.cpp:15
virtual ~EMM_OptimalTimeStep(void)
destroy
Definition: EMM_OptimalTimeStep.cpp:11
virtual tString toString() const
turn the regular time into a string
Definition: EMM_OptimalTimeStep.h:216
virtual tBoolean isSystemCompatible(SPC::EMM_LandauLifschitzSystem system) const
return true if the system is compatible
Definition: EMM_Stepper.h:169
#define tString
Definition: types.h:135
SP_OBJECT(EMM_OptimalTimeStep)
static SP::EMM_OptimalTimeStep New()
build a shared pointer associated to the class
Definition: EMM_OptimalTimeStep.h:162
DEFINE_SPTR(EMM_OptimalTimeStep)
#define tReal
Definition: types.h:118
This class describes the optimal time.
Definition: EMM_OptimalTimeStep.h:119
This class describes a regular time.
Definition: EMM_RegularTimeStep.h:15
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
This class describes a polynom of degre 4 .
Definition: MATH_P4.h:15