C++ main module for emicrom Package  1.0
EMM_DemagnetizedPeriodicalTest.h
Go to the documentation of this file.
1 #ifndef EMM_DemagnetizedPeriodicalTest_H
2 #define EMM_DemagnetizedPeriodicalTest_H
3 
4 #include "EMM_Test.h"
5 
6 
230 
232 
234  // ATTRIBUTES
235 
236 
237 public:
238 
239 
240 protected:
241  // METHODS
242 
243  // CONSTRUCTORS
244 
248 
249 
250 
251  // DESTRUCTORS
252 
253 
256  virtual ~EMM_DemagnetizedPeriodicalTest(void);
257 
258 
259 
260 public:
263  inline static SP::EMM_DemagnetizedPeriodicalTest New() {
264  SP::EMM_DemagnetizedPeriodicalTest p(new EMM_DemagnetizedPeriodicalTest(),
266  p->setThis(p);
267  return p;
268  };
269 
270 
271 
272 
273 
277  virtual tBoolean test(const CORE_Run& runner,const map<tString,tString>& options) const;
278 
279 
280 private:
284  tBoolean shrinkingTest() const;
285 
290 
294  tBoolean multiSDGridScaleTest(const CORE_Run& runner,const map<tString,tString>& options) const;
295 
296 
297  /* \brief testing of H computing on a domain Nx x Ny x Nz with periodicity from constannt M
298  * @param[in] Xperiodicity : periodicity on x is enabled
299  * @param[in] Yperiodicity : periodicity on y is enabled
300  * @param[in] Zperiodicity : periodicity on z is enabled
301  * @param[in] storage: type of storage in {"SL","GP","LP","LC","LT"}
302  * @param[in] multiGrid: type of multi-grid in {"","RP","SDX","SDXL"}
303  * @param[in] Nx: number of segments along x-direction
304  * @param[in] Ny: number of segments along y-direction
305  * @param[in] Nz: number of segments along z-direction
306  * @param[in] Lx : length of the geometry in the direction x
307  * @param[in] Ly : length of the geometry in the direction y
308  * @param[in] Lz : length of the geometry in the direction z
309  * @param[in] Ms : magnetization at saturation of the matter
310  * @param[in] p : levels number
311  * @param[in] zlevels : zonal levels number for SDG method
312  * @param[in] M0: M values
313  * @patam[in] Href : H values
314  * @param[in] runner : main class of the program
315  * @param[in] options : options from the command line
316  *
317  * test issue from
318  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
319  * from Stéphane Labbe, Sylvain Faure
320  *
321  *
322  * The demagnetized field is computed from M0 and supposed to be equals to Href
323  *
324  */
325  tBoolean HTest(const tBoolean& Xperiodicity,const tBoolean& Yperiodicity,const tBoolean& Zperiodicity,
326  const tString& storage,const tString& multiGrid,
327  const tUInteger& Nx,const tUInteger& Ny,const tUInteger& Nz,
328  const tReal& Lx,const tReal& Ly,const tReal& Lz,
329  const tReal& Ms,const tSInt& p,const tSInt& zlevels,
330  tReal M0[3],tReal Href[3],
331  const CORE_Run& runner,const map<tString,tString>& options) const;
332 
333 
334  /* \brief periodical on X & Y cube test for H
335  *
336  * @param[in] runner : main class of the program
337  * @param[in] options : options from the command line
338  *
339  * test issue from
340  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
341  * from Stéphane Labbe, Sylvain Faure
342  *
343  * - M(0,0,1) in a cube of size L x L x L periodical in the direction x and y
344  * - the number p of levels verifies \f$ L=2^p=16\f$
345  * - we choose p=4
346  *
347  * The demagnetized field is supposed to be \f$ H_d=(0,0,-1) \f$
348  */
349  tBoolean xyPeriodicalCubeHTest(const CORE_Run& runner,const map<tString,tString>& options) const;
350 
351  /* \brief periodical on X & Y cube test for H
352  * @param[in] newVersion : true to run the SDG method, false to run SDG-RP method
353  * @param[in] runner : main class of the program
354  * @param[in] options : options from the command line
355  *
356  * test issue from
357  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
358  * from Stéphane Labbe, Sylvain Faure
359  *
360  * - M(0,0,1) in a cube of size L x L x L periodical in the direction x and y
361  *
362  * We compare the results given by SL/SDG-RP and LC/SDG with nLevels=1 and 2 and zlevels=1
363  *
364  */
365  tBoolean xyPeriodicalCubeSDGTest(const tBoolean& newVersion,const CORE_Run& runner,const map<tString,tString>& options) const;
366 
367  /* \brief periodical on X & Y cube test for H
368  * @param[in] newVersion : true to run the SDG method, false to run SDG-RP method
369  * @param[in] runner : main class of the program
370  * @param[in] options : options from the command line
371  *
372  * test issue from
373  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
374  * from Stéphane Labbe, Sylvain Faure
375  *
376  * - M(0,0,1) in a cube of size L x L x L periodical in the direction x and y
377  *
378  * We compare the results given by SL/SDG-RP and LC/SDG with nLevels=1 and 2 and zlevels=1
379  */
380  tBoolean xyPeriodicalSheetSDGTest(const tBoolean& newVersion,const CORE_Run& runner,const map<tString,tString>& options) const;
381 
382  /* \brief periodical on X & Y cube ith not cubic mesh test for H
383  *
384  * @param[in] runner : main class of the program
385  * @param[in] options : options from the command line
386  *
387  * test issue from
388  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
389  * from Stéphane Labbe, Sylvain Faure
390  *
391  * - M(0,0,1) in a cube of size L x L x L periodical in the direction x and y with discretization 32x16x8
392  * - the number p of levels verifies \f$ L=2^p=16\f$
393  * - we choose p=4
394  *
395  * The demagnetized field is supposed to be \f$ H_d=(0,0,-1) \f$
396  */
397  tBoolean xyPeriodicalNotCubicCubeHTest(const CORE_Run& runner,const map<tString,tString>& options) const;
398 
399 
400 
401  /* \brief periodical on X & Y sheet test for H
402  *
403  * @param[in] runner : main class of the program
404  * @param[in] options : options from the command line
405  *
406  * test issue from
407  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
408  * from Stephane Labbe, Sylvain Faure
409  *
410  * - \f$ M(0,1/\sqrt{2},1/\sqrt{2}) \f$ in a rectangular sheet of size L x H periodical in the direction x and y
411  * - the number p of levels verifies \f$ min(L,H)=2^p\f$
412  * - L=16 H=64 with cubic/rectangular mesh
413  * - we choose p=4
414  *
415  *
416  * The demagnetized field is supposed to be \f$ H=(0,0,-1/\sqrt{2}) \f$
417  *
418  */
419  tBoolean xyPeriodicalSheetHTest(const CORE_Run& runner,const map<tString,tString>& options) const;
420 
421  /* \brief periodical on X & Y sheet test for H
422  *
423  * @param[in] runner : main class of the program
424  * @param[in] options : options from the command line
425  *
426  * test issue from
427  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
428  * from Stephane Labbe, Sylvain Faure
429  *
430  * - \f$ M(1,0,0) \f$ in a rectangular sheet of size L x H periodical in the direction x and y
431  * - the number p of levels verifies \f$ min(L,H)=2^p\f$
432  * - L=16 H=64 with cubic/rectangular mesh
433  * - we choose p=4
434  *
435  *
436  * The demagnetized field is supposed to be \f$ H=(0,0,0) \f$
437  *
438  */
439  tBoolean xyPeriodicalSheetNullHTest(const CORE_Run& runner,const map<tString,tString>& options) const;
440 
441 
442  /* \brief testing of relxation computing on a domain Nx x Ny x Nz with periodicity from constannt M
443  * @param[in] Xperiodicity : periodicity on x is enabled
444  * @param[in] Yperiodicity : periodicity on y is enabled
445  * @param[in] Zperiodicity : periodicity on z is enabled
446  * @param[in] storage: type of storage in {"SL","GP","LP","LC","LT"}
447  * @param[in] multiGrid: type of multi-grid in {"","CDG","SDG","SDG-RP"}
448  * @param[in] Nx: number of segments along x-direction
449  * @param[in] Ny: number of segments along y-direction
450  * @param[in] Nz: number of segments along z-direction
451  * @param[in] p : levels number
452  * @param[in] zlevels : zonal levels number for SDG method
453  * @param[in] Lx: size in the x-direction of the box
454  * @param[in] Ly: size in the y-direction of the box
455  * @param[in] Lz: size in the z-direction of the box
456  * @param[in] A: exchange coefficient
457  * @param[in] runner : main class of the program
458  * @param[in] options : options from the command line
459  *
460  *
461  */
462  tBoolean relaxationTest(const tBoolean& Xperiodicity,const tBoolean& Yperiodicity,const tBoolean& Zperiodicity,
463  const tString& storage,const tString& multiGrid,
464  const tUInteger& Nx,const tUInteger& Ny,const tUInteger& Nz,const tSInt& p,const tSInt& zlevels,
465  const tReal& Lx,const tReal& Ly,const tReal& Lz,
466  const tReal& A,const tReal *M0,
467  const CORE_Run& runner,const map<tString,tString>& options) const;
468 
469  /* \brief periodical on X & Y cubic test
470  *
471  * @param[in] runner : main class of the program
472  * @param[in] options : options from the command line
473  *
474  * test issue from
475  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
476  *
477  * We compute the equilibrium of the state M in a cube of size L (L=8) wit the different periodiity configuration
478  * - a non periodical domain
479  * - a periodical domain the the y-direction only
480  * - a periodical domain the the x,y-directions only
481  *
482  * The exchange operator is used wth A=1.3e-11, the cubic or rectangular cell mesh size is more or less equalts to 2.5e-9 and M is randomized at initial state
483  *
484  */
485  tBoolean periodicalCubeRelaxationTest(const CORE_Run& runner,const map<tString,tString>& options) const;
486 
487  /* \brief periodical on X & Y cubic test
488  * @param[in] runner : main class of the program
489  * @param[in] options : options from the command line
490  *
491  *
492  * test issue from
493  * Multilevel computation of the demagnetization field in eriodic domains applied to micromagnetism computations
494  *
495  * We compute the equilibrium of the state M in a sheet of size L x L x H (L=16 H=4) with the different periodiciiy configuration :
496  * - a non periodical domain
497  * - a periodical domain the the x-direction only
498  * - a periodical domain the the y-direction only
499  * - a periodical domain the the z-direction only
500  *
501  * The exchange operator is used wth A=1.3e-11, the cubic cell mesh size is 2.5e-9 and M is randomized at initial state
502  *
503  */
504  tBoolean periodicalSheetRelaxationTest(const CORE_Run& runner,const map<tString,tString>& options) const;
505 
506 
507 
511  const tString& ms,
512  const tBoolean& isMHlSaved,
513  const CORE_Run& runner) const;
514 
515 
516 };
517 
518 #endif
tBoolean xyPeriodicalCubeHTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:2950
This class is a Run class for Common package.
Definition: CORE_Run.h:38
#define tUInteger
Definition: types.h:91
This class is a test class for testing demagnetized operator in periodical domain.
Definition: EMM_DemagnetizedPeriodicalTest.h:231
tBoolean periodicalSheetRelaxationTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3479
EMM_DemagnetizedPeriodicalTest(void)
create the class
Definition: EMM_DemagnetizedPeriodicalTest.cpp:20
tBoolean xyPeriodicalSheetHTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3051
#define tBoolean
Definition: types.h:139
tBoolean multiCDGridScaleTest() const
test the Centered Dyoptic Grids scale routines
Definition: EMM_DemagnetizedPeriodicalTest.cpp:298
tBoolean periodicalDemagnetizedTestCase(const tString &name, const tString &ms, const tBoolean &isMHlSaved, const CORE_Run &runner) const
some test case for periodical demagnetized excitation field
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3549
This class is a test class for E-MicromM package.
Definition: EMM_Test.h:25
tBoolean xyPeriodicalCubeSDGTest(const tBoolean &newVersion, const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:2161
tBoolean relaxationTest(const tBoolean &Xperiodicity, const tBoolean &Yperiodicity, const tBoolean &Zperiodicity, const tString &storage, const tString &multiGrid, const tUInteger &Nx, const tUInteger &Ny, const tUInteger &Nz, const tSInt &p, const tSInt &zlevels, const tReal &Lx, const tReal &Ly, const tReal &Lz, const tReal &A, const tReal *M0, const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3154
DEFINE_SPTR(EMM_DemagnetizedPeriodicalTest)
tBoolean shrinkingTest() const
test theshrinking methods
Definition: EMM_DemagnetizedPeriodicalTest.cpp:245
tBoolean HTest(const tBoolean &Xperiodicity, const tBoolean &Yperiodicity, const tBoolean &Zperiodicity, const tString &storage, const tString &multiGrid, const tUInteger &Nx, const tUInteger &Ny, const tUInteger &Nz, const tReal &Lx, const tReal &Ly, const tReal &Lz, const tReal &Ms, const tSInt &p, const tSInt &zlevels, tReal M0[3], tReal Href[3], const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:2716
virtual tBoolean test(const CORE_Run &runner, const map< tString, tString > &options) const
make the test
Definition: EMM_DemagnetizedPeriodicalTest.cpp:27
#define tSInt
Definition: types.h:30
tBoolean xyPeriodicalSheetNullHTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3096
tBoolean periodicalCubeRelaxationTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3420
virtual ~EMM_DemagnetizedPeriodicalTest(void)
destroy the class
Definition: EMM_DemagnetizedPeriodicalTest.cpp:23
#define tString
Definition: types.h:135
SP_OBJECT(EMM_DemagnetizedPeriodicalTest)
tBoolean multiSDGridScaleTest(const CORE_Run &runner, const map< tString, tString > &options) const
test the Shift Dyoptic Grids scale routines
Definition: EMM_DemagnetizedPeriodicalTest.cpp:786
tBoolean xyPeriodicalNotCubicCubeHTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:3005
static SP::EMM_DemagnetizedPeriodicalTest New()
create a test class
Definition: EMM_DemagnetizedPeriodicalTest.h:263
#define tReal
Definition: types.h:118
tBoolean xyPeriodicalSheetSDGTest(const tBoolean &newVersion, const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_DemagnetizedPeriodicalTest.cpp:2440
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141