C++ main module for stochmagnet Package  1.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SM_LandauLifschitzFunction Class Reference

This class describes a landau lifschitz function of the form : More...

#include <SM_LandauLifschitzFunction.h>

Inheritance diagram for SM_LandauLifschitzFunction:
Inheritance graph
[legend]
Collaboration diagram for SM_LandauLifschitzFunction:
Collaboration graph
[legend]

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 tRealgetAlpha () const
 get the alpha parameter More...
 
const tRealgetBeta () 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_ObjectmThis
 

Detailed Description

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()

Author
Stephane Despreaux
Version
1.0

Constructor & Destructor Documentation

◆ SM_LandauLifschitzFunction()

SM_LandauLifschitzFunction::SM_LandauLifschitzFunction ( void  )
inline

create

References mAlpha, mBeta, and mIsMuNormalized.

◆ ~SM_LandauLifschitzFunction()

virtual SM_LandauLifschitzFunction::~SM_LandauLifschitzFunction ( void  )
inlinevirtual

destroy

Member Function Documentation

◆ computeFunction() [1/2]

void SM_LandauLifschitzFunction::computeFunction ( const SM_RealField Mu,
const SM_RealField B,
SM_RealField F 
) const
inline

computes the magnetic function

Parameters
[in]Muthe magnetic moment
[in]Bthe total magnetic field
[out]Fthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeFunction() [2/2]

void SM_LandauLifschitzFunction::computeFunction ( const tIndex nParticles,
const tDimension dim,
const tReal mu,
const tReal B,
tReal F 
) const
inline

compute the magnetic function

Parameters
[in]nParticles: number of particles
[in]dimdimension of particle
[in]muthe magnetic moment
[in]Bthe total magnetic field
[out]Fthe 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.

Here is the call graph for this function:

◆ computeLLFunction()

void SM_LandauLifschitzFunction::computeLLFunction ( const tIndex nParticles,
const tDimension dim,
const tReal mu,
const tReal B,
tReal F 
) const
inlineprivate

compute the magnetic function

Parameters
[in]nParticles: number of particles
[in]dimdimension of particle
[in]muthe magnetic moment
[in]Bthe total magnetic field
[out]Fthe 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().

Here is the caller graph for this function:

◆ computeNLLFunction()

void SM_LandauLifschitzFunction::computeNLLFunction ( const tIndex nParticles,
const tDimension dim,
const tReal mu,
const tReal B,
tReal F 
) const
inlineprivate

compute the normalized magnetic function

Parameters
[in]nParticles: number of particles
[in]dimdimension of particle
[in]muthe magnetic moment
[in]Bthe total magnetic field
[out]Fthe 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().

Here is the caller graph for this function:

◆ copy()

void SM_LandauLifschitzFunction::copy ( const SM_LandauLifschitzFunction LL)
inline

copy the LL function

Parameters
[in]LL: the function to copy

References getAlpha(), getBeta(), isMuNormalized(), mAlpha, mBeta, and mIsMuNormalized.

Here is the call graph for this function:

◆ DisableMemoryStack()

static void CORE_Object::DisableMemoryStack ( )
inlinestaticinherited

disable the memory stack

Referenced by CORE_Object::EnableMemoryStack().

Here is the caller graph for this function:

◆ EnableMemoryStack() [1/2]

static void CORE_Object::EnableMemoryStack ( )
inlinestaticinherited

enable the memory stack

Referenced by CORE_Object::EnableMemoryStack(), and CORE_Run::SetDebugOptions().

Here is the caller graph for this function:

◆ EnableMemoryStack() [2/2]

static tBoolean CORE_Object::EnableMemoryStack ( const tBoolean isMemoryChecked)
inlinestaticinherited

enable the memory stack

Parameters
[in]isMemoryChecked: true to verify memory allocation of CORE_Object classes
Returns
true if the memroy is checked

References CORE_Object::DisableMemoryStack(), CORE_Object::EnableMemoryStack(), and CORE_Object::IsMemoryStackEnabled().

Here is the call graph for this function:

◆ getAlpha()

const tReal& SM_LandauLifschitzFunction::getAlpha ( ) const
inline

get the alpha parameter

Returns
alpha value

References mAlpha.

Referenced by copy(), SM_StratonovichNormalizedSystem::discretize(), and SM_StratonovichSystem::discretize().

Here is the caller graph for this function:

◆ getBeta()

const tReal& SM_LandauLifschitzFunction::getBeta ( ) const
inline

get the beta parameter

Returns
beta value

References mBeta.

Referenced by copy(), SM_StratonovichNormalizedSystem::discretize(), and SM_StratonovichSystem::discretize().

Here is the caller graph for this function:

◆ getClassName()

tString CORE_Object::getClassName ( ) const
inlineinherited

return the name of the class

Returns
the string name of the class

Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().

Here is the caller graph for this function:

◆ getConstSharedPointer()

template<class T >
std::shared_ptr<const T> CORE_Object::getConstSharedPointer ( ) const
inlineinherited

return a const shared pointer for this

Returns
the shared pointer as a type T

References CORE_Object::mThis.

◆ getContentsMemorySize()

virtual tMemSize CORE_Object::getContentsMemorySize ( ) const
inlinevirtualinherited

return nthe memory size of the included associations

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

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().

Here is the caller graph for this function:

◆ getIdentityString()

tString CORE_Object::getIdentityString ( ) const
inlineinherited

retrun the string identification of the class

Returns
the string identity 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMemorySize()

virtual tMemSize SM_LandauLifschitzFunction::getMemorySize ( ) const
inlinevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes The mamory size is :
  • the added size of the base classes which contains:
    • the primary attributes size depends on the order: (first delare the smallest attributes size
    • all virtual functions costs <pointer-size> (4 32xor 8 64x) bytes by virtual function
    • virtual inherihtance will increase of (4 or 8) bytes
  • we add the size of the contains values of the attributes : for example the size of a string is the length of the string 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from SM_Object.

References CORE_Object::getContentsMemorySize().

Here is the call graph for this function:

◆ getPointerString()

tString CORE_Object::getPointerString ( ) const
inlineinherited

retrun the pointer of the class as a string

Returns
the pointer of the calss as a string

References core_functions::pointerToString().

Here is the call graph for this function:

◆ GetRegisteredClassesNumber()

static tIndex CORE_Object::GetRegisteredClassesNumber ( )
inlinestaticinherited

get the memory stack in string

Returns
the string representation of the memory stack

◆ getSharedPointer()

template<class T >
std::shared_ptr<T> CORE_Object::getSharedPointer ( )
inlineinherited

return the shared pointer for this

Returns
the shared pointer as a type T

References CORE_Object::mThis.

◆ isInstanceOf()

template<class T >
tBoolean CORE_Object::isInstanceOf ( ) const
inlineinherited

test if the clas T is an instance of this class

Returns
true if the object is an instance of T

Referenced by SM_Beam::templatedSimulate().

Here is the caller graph for this function:

◆ IsMemoryStackEnabled()

static tBoolean CORE_Object::IsMemoryStackEnabled ( )
inlinestaticinherited

return trur if the memory stack is enabled

Referenced by CORE_Object::EnableMemoryStack(), and main().

Here is the caller graph for this function:

◆ isMuNormalized()

tBoolean SM_LandauLifschitzFunction::isMuNormalized ( ) const
inline

return true if M is supposed to be normalized

Returns
true if M is supposed to be normalized

References mIsMuNormalized.

Referenced by copy().

Here is the caller graph for this function:

◆ MemoryStackToString()

static tString CORE_Object::MemoryStackToString ( )
inlinestaticinherited

get the memory stack in string

Returns
the string representation of the memory stack

Referenced by main().

Here is the caller graph for this function:

◆ setAlpha()

void SM_LandauLifschitzFunction::setAlpha ( const tReal v)
inline

set the alpha parameter

Parameters
[in]valpha value

References mAlpha.

Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::loadBeamFromOptions(), SM_System::SM_System(), and SM_Test::testOperators().

Here is the caller graph for this function:

◆ setBeta()

void SM_LandauLifschitzFunction::setBeta ( const tReal v)
inline

set the beta parameter

Parameters
[in]vbeta value

References mBeta.

Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::loadBeamFromOptions(), SM_System::SM_System(), and SM_Test::testOperators().

Here is the caller graph for this function:

◆ setIsMuNormalized()

void SM_LandauLifschitzFunction::setIsMuNormalized ( const tBoolean v)
inline

set true if M is supposed to be normalized

Parameters
[in]v: true to normalize M

References mIsMuNormalized.

◆ setThis()

template<class T >
std::shared_ptr<T> CORE_Object::setThis ( std::unique_ptr< T, CORE_Object::Delete > &  up)
inlineprivateinherited

set the shared pointer from an unique pointer

Parameters
[in,out]upunique pointer of the class at input, points to null pointer at output
Returns
the shared pointer of the class

Method only calledby the friend class CORE_ClassFactory::NewSharedInstance()

References CORE_Object::mThis.

◆ toString()

virtual tString SM_LandauLifschitzFunction::toString ( ) const
inlineoverridevirtual

turn the class into a string

Returns
the string representation of the class

Reimplemented from CORE_Object.

References mAlpha, mBeta, and mIsMuNormalized.

Referenced by SM_System::toString().

Here is the caller graph for this function:

Member Data Documentation

◆ mAlpha

tReal SM_LandauLifschitzFunction::mAlpha
private

◆ mBeta

tReal SM_LandauLifschitzFunction::mBeta
private

◆ mIsMuNormalized

tBoolean SM_LandauLifschitzFunction::mIsMuNormalized
private

◆ mThis

std::weak_ptr<CORE_Object> CORE_Object::mThis
privateinherited

The documentation for this class was generated from the following file: