C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
SMOMPI_LandauLifschitzFunction Class Reference

This class describes an OMP implementation of the LL function The main method to compute the function is the method SM_LandauLifschitzFunction::computeFunction() More...

#include <SMOMPI_LandauLifschitzFunction.h>

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

Public Member Functions

virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
- Public Member Functions inherited from SM_LandauLifschitzFunction
void copy (const SM_LandauLifschitzFunction &LL)
 copy the LL function More...
 
void setAlphaFunction (const LambdaF &L)
 set the alpha function More...
 
void setGamma (const tReal &gamma)
 set the alpha parameter \( \alpha=\frac{\gamma }{\lambda^2 +1} \) More...
 
void setLambda (const tReal &v)
 set the lambda parameter \( \alpha=\frac{\gamma }{\lambda^2 +1} \) More...
 
void setAlpha (const tReal &v)
 set the alpha parameter directly without setting setGamma() More...
 
void setIsSNormalized (const tBoolean &v)
 set true if M is supposed to be normalized More...
 
const tReal & getGamma () const
 get the gamma parameter More...
 
const tReal & getAlpha () const
 get the alpha parameter More...
 
const tReal & getLambda () const
 get the lambda parameter More...
 
tBoolean isSNormalized () const
 return true if M is supposed to be normalized More...
 
void computeFunction (const tIndex &nParticles, const SM_RealField &S, const SM_RealField &B, SM_RealField &F) const
 computes the magnetic function More...
 
void computeFunction (const tIndex &nSParticles, const tReal *S, const tIndex &nBParticles, const tReal *B, tReal *F) const
 compute the magnetic function More...
 
virtual tString toString () const override
 turn the class into a string More...
 
- Public Member Functions inherited from SM_Object
 SM_Object (void)
 create
 
virtual ~SM_Object (void)
 destroy
 
- Public Member Functions inherited from CORE_Object
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 CORE_UniquePointer< SMOMPI_LandauLifschitzFunctionNew ()
 build a new instance of the class this More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Protected Member Functions

 SMOMPI_LandauLifschitzFunction (void)
 create
 
virtual ~SMOMPI_LandauLifschitzFunction (void)
 destroy
 
virtual void computeLLFunction (const tIndex &nSParticles, const tReal *S, const tIndex &nBParticles, const tReal *B, tReal *F) const final
 compute the magnetic function More...
 
virtual void computeNLLFunction (const tIndex &nSParticles, const tReal *S, const tIndex &nBParticles, const tReal *B, tReal *F) const final
 compute the normalized magnetic function More...
 
- Protected Member Functions inherited from SM_LandauLifschitzFunction
 SM_LandauLifschitzFunction (void)
 create
 
virtual ~SM_LandauLifschitzFunction (void)
 destroy
 
void computeSliceLLFunction (tIndex start, tIndex end, const tIndex &nSParticles, const tReal *S, const tIndex &nBParticles, const tReal *B, tReal *F) const
 compute the magnetic function for particle indices in [start,end[ More...
 
void computeSliceNLLFunction (tIndex start, tIndex end, const tIndex &nSParticles, const tReal *S, const tIndex &nBParticles, const tReal *B, tReal *F) const
 compute the normalized magnetic function for particle indices in [start,end[ More...
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

This class describes an OMP implementation of the LL function The main method to compute the function is the method SM_LandauLifschitzFunction::computeFunction()

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ computeLLFunction()

void SMOMPI_LandauLifschitzFunction::computeLLFunction ( const tIndex &  nSParticles,
const tReal *  S,
const tIndex &  nBParticles,
const tReal *  B,
tReal *  F 
) const
finalprotectedvirtual

compute the magnetic function

Parameters
[in]nSParticles: number of particles of S
[in]Sthe magnetic moment
[in]nBParticles: number of particles of B
[in]Bthe total magnetic field
[out]Fthe return output vector

\( F=f(S,B)= \displaystyle alpha. \left ( S \wedge B + \lambda ( <S,B> S - |S|^2 . B ) \right ) \).

Implements SM_LandauLifschitzFunction.

◆ computeNLLFunction()

void SMOMPI_LandauLifschitzFunction::computeNLLFunction ( const tIndex &  nSParticles,
const tReal *  S,
const tIndex &  nBParticles,
const tReal *  B,
tReal *  F 
) const
finalprotectedvirtual

compute the normalized magnetic function

Parameters
[in]nSParticles: number of particles of S
[in]Sthe magnetic moment
[in]nBParticles: number of particles of B
[in]Bthe total magnetic field
[out]Fthe return output vector

\( F=f(S,B)= \displaystyle alpha. \left ( S \wedge B + \lambda S \wedge ( S \wedge B ) \right ) \).

Implements SM_LandauLifschitzFunction.

◆ getMemorySize()

virtual tMemSize SMOMPI_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_LandauLifschitzFunction.

◆ New()

static CORE_UniquePointer<SMOMPI_LandauLifschitzFunction> SMOMPI_LandauLifschitzFunction::New ( )
inlinestatic

build a new instance of the class this

Returns
an unique pointer of the class this

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