C++ main module for stochmagnet Package
1.0
|
This class describes a landau lifschitz function of the form : More...
#include <SM_LandauLifschitzFunction.h>
Public Member Functions | |
SM_LandauLifschitzFunction (void) | |
create More... | |
virtual | ~SM_LandauLifschitzFunction (void) |
destroy More... | |
virtual tMemSize | getMemorySize () const |
return the memory size of the class and the memory size of all its attributes/associations More... | |
void | copy (const SM_LandauLifschitzFunction &LL) |
copy the LL function More... | |
void | setAlpha (const tReal &v) |
set the alpha parameter More... | |
void | setBeta (const tReal &v) |
set the beta parameter More... | |
void | setIsMuNormalized (const tBoolean &v) |
set true if M is supposed to be normalized More... | |
const tReal & | getAlpha () const |
get the alpha parameter More... | |
const tReal & | getBeta () const |
get the beta parameter More... | |
tBoolean | isMuNormalized () const |
return true if M is supposed to be normalized More... | |
void | computeFunction (const SM_RealField &Mu, const SM_RealField &B, SM_RealField &F) const |
computes the magnetic function More... | |
void | computeFunction (const tIndex &nParticles, const tDimension &dim, const tReal *mu, const tReal *B, tReal *F) const |
compute the magnetic function More... | |
virtual tString | toString () const override |
turn the class into a string More... | |
template<class T > | |
std::shared_ptr< T > | getSharedPointer () |
return the shared pointer for this More... | |
template<class T > | |
std::shared_ptr< const T > | getConstSharedPointer () const |
return a const shared pointer for this More... | |
virtual tMemSize | getContentsMemorySize () const |
return nthe memory size of the included associations More... | |
template<class T > | |
tBoolean | isInstanceOf () const |
test if the clas T is an instance of this class More... | |
tString | getClassName () const |
return the name of the class More... | |
tString | getPointerString () const |
retrun the pointer of the class as a string More... | |
tString | getIdentityString () const |
retrun the string identification of the class More... | |
Static Public Member Functions | |
static tBoolean | EnableMemoryStack (const tBoolean &isMemoryChecked) |
enable the memory stack More... | |
static void | EnableMemoryStack () |
enable the memory stack More... | |
static void | DisableMemoryStack () |
disable the memory stack More... | |
static tBoolean | IsMemoryStackEnabled () |
return trur if the memory stack is enabled More... | |
static tString | MemoryStackToString () |
get the memory stack in string More... | |
static tIndex | GetRegisteredClassesNumber () |
get the memory stack in string More... | |
Private Member Functions | |
void | computeLLFunction (const tIndex &nParticles, const tDimension &dim, const tReal *mu, const tReal *B, tReal *F) const |
compute the magnetic function More... | |
void | computeNLLFunction (const tIndex &nParticles, const tDimension &dim, const tReal *mu, const tReal *B, tReal *F) const |
compute the normalized magnetic function More... | |
template<class T > | |
std::shared_ptr< T > | setThis (std::unique_ptr< T, CORE_Object::Delete > &up) |
set the shared pointer from an unique pointer More... | |
Private Attributes | |
tReal | mAlpha |
tReal | mBeta |
tBoolean | mIsMuNormalized |
std::weak_ptr< CORE_Object > | mThis |
This class describes a landau lifschitz function of the form :
\( f(\mu,b)= \displaystyle \alpha. \left ( \mu \wedge b + \beta ( \mu \cdot b \mu - |\mu|^2 b ) \right ) \).
The normalized formultation on the landau lifschitz function when \( |\mu|=1 \) is :
\( f(\mu,b)= \displaystyle \alpha. \left ( \mu \wedge b + \beta ( \mu \cdot b \mu - b ) \right ) \).
The main method to compute the function is the method SM_LandauLifschitzFunction::computeFunction()
|
inline |
create
References mAlpha, mBeta, and mIsMuNormalized.
|
inlinevirtual |
destroy
|
inline |
computes the magnetic function
[in] | Mu | the magnetic moment |
[in] | B | the total magnetic field |
[out] | F | the return output vector |
\( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta \mu \wedge ( \mu \wedge B ) \right ) \). or \( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta ( <\mu,B> mu - |mu|^2 . B ) \right ) \).
References CORE_Field< T, K, D, S, I >::getDimension(), CORE_Field< T, K, D, S, I >::getElementsNumber(), CORE_Field< T, K, D, S, I >::setElementsNumber(), and tIndex.
Referenced by SM_System::makeRelaxation(), and SM_TemplatedSystem< SystemImpl >::makeTemplatedRelaxation().
|
inline |
compute the magnetic function
[in] | nParticles | : number of particles |
[in] | dim | dimension of particle |
[in] | mu | the magnetic moment |
[in] | B | the total magnetic field |
[out] | F | the return output vector |
\( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta \mu \wedge ( \mu \wedge B ) \right ) \). or \( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta ( <\mu,B> mu - |mu|^2 . B ) \right ) \).
References computeLLFunction(), computeNLLFunction(), and mIsMuNormalized.
|
inlineprivate |
compute the magnetic function
[in] | nParticles | : number of particles |
[in] | dim | dimension of particle |
[in] | mu | the magnetic moment |
[in] | B | the total magnetic field |
[out] | F | the return output vector |
\( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta \mu \wedge ( \mu \wedge B ) \right ) \). or \( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta ( <\mu,B> mu - |mu|^2 . B ) \right ) \).
References ASSERT_IN, mAlpha, mBeta, tIndex, and tReal.
Referenced by computeFunction().
|
inlineprivate |
compute the normalized magnetic function
[in] | nParticles | : number of particles |
[in] | dim | dimension of particle |
[in] | mu | the magnetic moment |
[in] | B | the total magnetic field |
[out] | F | the return output vector |
\( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta \mu \wedge ( \mu \wedge B ) \right ) \). or \( F=f(\mu,b)= \displaystyle alpha. \left ( \mu \wedge B + \beta ( <\mu,B> mu - |mu|^2 . B ) \right ) \).
References ASSERT_IN, mAlpha, mBeta, tIndex, and tReal.
Referenced by computeFunction().
|
inline |
copy the LL function
[in] | LL | : the function to copy |
References getAlpha(), getBeta(), isMuNormalized(), mAlpha, mBeta, and mIsMuNormalized.
|
inlinestaticinherited |
disable the memory stack
Referenced by CORE_Object::EnableMemoryStack().
|
inlinestaticinherited |
enable the memory stack
Referenced by CORE_Object::EnableMemoryStack(), and CORE_Run::SetDebugOptions().
|
inlinestaticinherited |
enable the memory stack
[in] | isMemoryChecked | : true to verify memory allocation of CORE_Object classes |
References CORE_Object::DisableMemoryStack(), CORE_Object::EnableMemoryStack(), and CORE_Object::IsMemoryStackEnabled().
|
inline |
get the alpha parameter
References mAlpha.
Referenced by copy(), SM_StratonovichNormalizedSystem::discretize(), and SM_StratonovichSystem::discretize().
|
inline |
get the beta parameter
References mBeta.
Referenced by copy(), SM_StratonovichNormalizedSystem::discretize(), and SM_StratonovichSystem::discretize().
|
inlineinherited |
return the name of the class
Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().
|
inlineinherited |
return a const shared pointer for this
References CORE_Object::mThis.
|
inlinevirtualinherited |
return nthe memory size of the included associations
Reimplemented in CORE_VectorList< T, I >, CORE_VectorList< tString, CORE_StringsList >, CORE_ValArray< T, I >, CORE_ValArray< T, CORE_StdValArray< T > >, CORE_Run, CORE_PtrArray< T, I >, CORE_PtrArray< T, CORE_StdPtrArray< T > >, CORE_Field< T, K, D, S, I >, CORE_Field< T, K, D, CORE_StdPtrArray< T >, CORE_StdPtrField< T, K, D > >, CORE_Field< T, K, D, CORE_StdValArray< T >, CORE_StdValField< T, K, D > >, CORE_ClassFactory, SMS_STDUniformFunction, SMS_STDNormalFunction, SMS_BoostUniformFunction, SMS_BoostNormalFunction, SM_ZeemanOperator, SM_XDMF, SM_VTK, SM_System, SM_Output, SM_Operator, SM_Network, SM_DemagnetizedOperator, SM_Beam, CORE_StringsList, and CORE_Out.
Referenced by CORE_Out::getContentsMemorySize(), SM_Beam::getContentsMemorySize(), SM_Network::getContentsMemorySize(), SM_Operator::getContentsMemorySize(), SM_Output::getContentsMemorySize(), SM_System::getContentsMemorySize(), SM_VTK::getContentsMemorySize(), SMS_BoostNormalFunction::getContentsMemorySize(), SMS_BoostUniformFunction::getContentsMemorySize(), SMS_STDNormalFunction::getContentsMemorySize(), SMS_STDUniformFunction::getContentsMemorySize(), CORE_ClassFactory::getContentsMemorySize(), CORE_PtrArray< T, I >::getContentsMemorySize(), CORE_ValArray< T, I >::getContentsMemorySize(), CORE_VectorList< T, I >::getContentsMemorySize(), CORE_Object::getMemorySize(), SM_ConstantNoiseRateFunction::getMemorySize(), SM_InverseNoiseRateFunction::getMemorySize(), getMemorySize(), SM_NoiseRateFunction::getMemorySize(), SM_Object::getMemorySize(), SM_StochasticFunction::getMemorySize(), SM_TemplatedNoiseRateFunction< DerivedClass >::getMemorySize(), SM_TimeStepper::getMemorySize(), SMS_BoostRandomFunction::getMemorySize(), CORE_Array< T, I >::getMemorySize(), CORE_Chrono::getMemorySize(), CORE_Collection< T, I >::getMemorySize(), CORE_IO::getMemorySize(), CORE_List< T, K, I >::getMemorySize(), CORE_OptionsReader::getMemorySize(), CORE_OutputFile::getMemorySize(), and CORE_Test::getMemorySize().
|
inlineinherited |
retrun the string identification of the class
References CORE_Object::getClassName(), and core_functions::pointerToString().
Referenced by CORE_Test::testArray(), CORE_Test::testField(), CORE_Test::testTypes(), CORE_Object::toString(), CORE_ClassFactory::toString(), and CORE_Field< T, K, D, S, I >::toString().
|
inlinevirtual |
return the memory size of the class and the memory size of all its attributes/associations
Reimplemented from SM_Object.
References CORE_Object::getContentsMemorySize().
|
inlineinherited |
retrun the pointer of the class as a string
References core_functions::pointerToString().
|
inlinestaticinherited |
get the memory stack in string
|
inlineinherited |
return the shared pointer for this
References CORE_Object::mThis.
|
inlineinherited |
test if the clas T is an instance of this class
Referenced by SM_Beam::templatedSimulate().
|
inlinestaticinherited |
return trur if the memory stack is enabled
Referenced by CORE_Object::EnableMemoryStack(), and main().
|
inline |
return true if M is supposed to be normalized
References mIsMuNormalized.
Referenced by copy().
|
inlinestaticinherited |
get the memory stack in string
Referenced by main().
|
inline |
set the alpha parameter
[in] | v | alpha value |
References mAlpha.
Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::loadBeamFromOptions(), SM_System::SM_System(), and SM_Test::testOperators().
|
inline |
set the beta parameter
[in] | v | beta value |
References mBeta.
Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::loadBeamFromOptions(), SM_System::SM_System(), and SM_Test::testOperators().
|
inline |
set true if M is supposed to be normalized
[in] | v | : true to normalize M |
References mIsMuNormalized.
|
inlineprivateinherited |
set the shared pointer from an unique pointer
[in,out] | up | unique pointer of the class at input, points to null pointer at output |
Method only calledby the friend class CORE_ClassFactory::NewSharedInstance()
References CORE_Object::mThis.
|
inlineoverridevirtual |
turn the class into a string
Reimplemented from CORE_Object.
References mAlpha, mBeta, and mIsMuNormalized.
Referenced by SM_System::toString().
|
private |
Referenced by computeLLFunction(), computeNLLFunction(), copy(), getAlpha(), setAlpha(), SM_LandauLifschitzFunction(), and toString().
|
private |
Referenced by computeLLFunction(), computeNLLFunction(), copy(), getBeta(), setBeta(), SM_LandauLifschitzFunction(), and toString().
|
private |
Referenced by computeFunction(), copy(), isMuNormalized(), setIsMuNormalized(), SM_LandauLifschitzFunction(), and toString().
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().