C++ main module for stochmagnet Package
1.0
|
This class is describes a Zeman operator with const external magnetism by time and particles. More...
#include <SM_ConstantZeemanOperator.h>
Public Member Functions | |
virtual CORE_UniquePointer< SM_Operator > | NewInstance () const override |
create a New instance of this @retrun an unique pointer to the instance More... | |
virtual tMemSize | getMemorySize () const |
return the memory size of the class and the memory size of all its attributes/associations More... | |
virtual void | discretize (const SM_System &system) override |
discretize the operator : do nothing by default More... | |
void | setBext (const std::array< tReal, 3 > &values) |
set the Bext value More... | |
virtual tMemSize | getContentsMemorySize () const |
return nthe memory size of the included associations More... | |
virtual void | copy (const SM_Operator &op) |
copy More... | |
const tIndex & | getZeemanParticlesNumber () const |
return the number of particles for the zeeman operatpr More... | |
const tIndex & | getZeemanTimeStepsNumber () const |
return the number of time steps for the zeeman operatpr More... | |
const tDimension & | getZeemanDimension () const |
return the dimension of the zeeman operatpr More... | |
const tReal * | getBext (const tIndex &t) const |
return Bext at time step index t More... | |
tReal * | getBext (const tIndex &t) |
return Bext at time step index t More... | |
const tReal * | getBext () const |
return Bext at time 0 More... | |
tReal * | getBext () |
return Bext More... | |
void | setBext (std::initializer_list< tReal > &&values) |
set the Bext value More... | |
void | setBext (const std::vector< tReal > &values) |
set the Bext value More... | |
virtual void | computeMagneticField (const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B) const override |
compute the magnetic field at time t by virtual method More... | |
void | computeMagneticField (const tIndex &t, const SM_Network &network, const SM_RealField &Mu, SM_RealField &B) const |
compute the magnetic field at time t by virtual method More... | |
virtual void | computeMagneticFieldAndEnergy (const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B, tReal &E) const override |
compute the magnetic field at time t by virtual method More... | |
void | computeTemplatedMagneticField (const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B) const |
compute the magnetic field More... | |
void | computeTemplatedMagneticFieldAndEnergy (const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B, tReal &E) const |
compute the magnetic field More... | |
void | computeTemplatedMagneticFieldAndEnergy (const tIndex &t, const SM_Network &network, const tReal *mu, tReal *H, tReal &E) |
compute the magnetic field and energy at time t More... | |
virtual tReal | computeEnergy (const SM_Network &network, const tReal *mu, const tReal *H) const override |
compute the energy More... | |
virtual tReal | computeEnergy (const tIndex &t, const SM_Network &network, const tReal *mu) const override |
compute the energy More... | |
tReal | computeEnergy (const tIndex &t, const SM_Network &network, const SM_RealField &mu) const |
compute the energy at time t by virtual method More... | |
tReal | computeTemplatedEnergy (const tIndex &t, const SM_Network &network, const tReal *mu) const |
compute the energy More... | |
const tString & | getName () const |
return the operator name 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... | |
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... | |
virtual tString | toString () const |
return the string representation of the object node More... | |
Static Public Member Functions | |
static CORE_UniquePointer< SM_ConstantZeemanOperator > | New () |
build a new instance of the operator More... | |
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... | |
Protected Member Functions | |
SM_ConstantZeemanOperator (void) | |
create a network class More... | |
virtual | ~SM_ConstantZeemanOperator (void) |
destroy More... | |
void | setZeemanParticlesNumber (const tIndex &p) |
set zeeman particlules number More... | |
void | setZeemanTimeStepsNumber (const tIndex &n) |
set zeeman time steps More... | |
const std::valarray< tReal > & | getBextAsArray () const |
return Bext as an array More... | |
std::valarray< tReal > & | getBextAsArray () |
return Bext as an array More... | |
void | setName (const tString &name) |
set the name More... | |
Private Member Functions | |
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 | |
tIndex | mZeemanTimeStepsNumber |
tIndex | mZeemanParticlesNumber |
tDimension | mDimension |
std::valarray< tReal > | mBext |
tString | mName |
std::weak_ptr< CORE_Object > | mThis |
This class is describes a Zeman operator with const external magnetism by time and particles.
|
inlineprotected |
create a network class
References SM_ZeemanOperator::setZeemanParticlesNumber(), and SM_ZeemanOperator::setZeemanTimeStepsNumber().
Referenced by New().
|
inlineprotectedvirtual |
destroy
|
inlineoverridevirtualinherited |
compute the energy
[in] | network | : network |
[in] | mu | magnetic moments of size nParticles x dim |
[in] | H | magnetic field of size nParticles x dim |
Reimplemented from SM_Operator.
References SM_Network::getDimension(), SM_Network::getParticlesNumber(), tIndex, and tReal.
|
inlineinherited |
compute the energy at time t by virtual method
[in] | t | : time step index |
[in] | network | : network |
[in] | mu | magnetic moments of size nParticles x dim |
Referenced by SM_Test::testDerivative().
|
inlineoverridevirtualinherited |
compute the energy
[in] | t | index of time step for computation |
[in] | network | : network of the field |
[in] | mu | magnetic moments of size nParticles |
Implements SM_Operator.
References SM_ZeemanOperator::computeTemplatedEnergy().
|
inlineinherited |
compute the magnetic field at time t by virtual method
[in] | t | : time step index |
[in] | network | : network |
[in] | Mu | magnetic moments of size nParticles x dim |
[out] | B | magnetic field of size nParticles x dim defined by B=H(mu) |
References SM_Operator::computeMagneticField(), CORE_Field< T, K, D, S, I >::getElementsNumber(), CORE_Field< T, K, D, S, I >::setElementsNumber(), and tIndex.
|
inlineoverridevirtualinherited |
compute the magnetic field at time t by virtual method
[in] | t | : time step index |
[in] | network | network of points |
[in] | mu | magnetic moments of size nParticles x dim |
[in,out] | B | magnetic field of size nParticles x dim B+=H(Mu) |
Implements SM_Operator.
References SM_ZeemanOperator::computeTemplatedMagneticField().
|
inlineoverridevirtualinherited |
compute the magnetic field at time t by virtual method
[in] | t | : time step index |
[in] | network | : network of the field |
[in] | mu | magnetic moments of size nParticles x dim |
[in,out] | B | magnetic field of size nParticles x dim |
[out] | E | Energy of the operator |
Implements SM_Operator.
References SM_ZeemanOperator::computeTemplatedMagneticFieldAndEnergy().
|
inlineinherited |
compute the energy
[in] | t | index of time step for computation |
[in] | network | : network of the field |
[in] | mu | magnetic moments of size nParticles x dim |
References SM_ZeemanOperator::getBext(), SM_Network::getDimension(), SM_Network::getParticlesNumber(), SM_ZeemanOperator::mZeemanParticlesNumber, tBoolean, tIndex, and tReal.
Referenced by SM_ZeemanOperator::computeEnergy().
|
inlineinherited |
compute the magnetic field
[in] | t | index of time step for computation |
[in] | network | : network of the field |
[in] | mu | magnetic moments of size nParticles x dim |
[in,out] | B | magnetic field of size nParticles x dim |
References SM_ZeemanOperator::computeTemplatedMagneticFieldAndEnergy(), and tReal.
Referenced by SM_ZeemanOperator::computeMagneticField(), and SM_TemplatedSystem< SystemImpl >::computeTemplatedMagneticField().
|
inlineinherited |
compute the magnetic field
[in] | t | index of time step for computation |
[in] | network | : network of |
[in] | mu | magnetic moments of size nParticles x dim |
[in,out] | B | magnetic field of size nParticles x dim |
[out] | E | energy of the operator return B+=Bext |
References SM_ZeemanOperator::getBext(), SM_Network::getDimension(), SM_Network::getParticlesNumber(), SM_ZeemanOperator::mZeemanParticlesNumber, tBoolean, tIndex, and tReal.
Referenced by SM_ZeemanOperator::computeMagneticFieldAndEnergy(), SM_ZeemanOperator::computeTemplatedMagneticField(), and SM_TemplatedSystem< SystemImpl >::computeTemplatedMagneticFieldAndEnergies().
|
inlineinherited |
compute the magnetic field and energy at time t
[in] | t | index of time step for computation |
[in] | network | : network of the field |
[in] | mu | magnetic moments of size nParticles x dim |
[in,out] | H | magnetic field of size nParticles x dim |
[out] | E | energy of the operator |
|
inlinevirtualinherited |
copy
[in] | op | : operator to copy |
Reimplemented from SM_Operator.
References SM_Operator::copy(), SM_ZeemanOperator::getBextAsArray(), SM_ZeemanOperator::getZeemanDimension(), SM_ZeemanOperator::getZeemanParticlesNumber(), SM_ZeemanOperator::getZeemanTimeStepsNumber(), SM_ZeemanOperator::mBext, SM_ZeemanOperator::mDimension, SM_ZeemanOperator::mZeemanParticlesNumber, and SM_ZeemanOperator::mZeemanTimeStepsNumber.
|
inlinestaticinherited |
disable the memory stack
Referenced by CORE_Object::EnableMemoryStack().
|
inlineoverridevirtual |
discretize the operator : do nothing by default
[in] | system | : system of the operator |
Reimplemented from SM_ZeemanOperator.
References SM_ZeemanOperator::setZeemanParticlesNumber(), and SM_ZeemanOperator::setZeemanTimeStepsNumber().
|
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().
|
inlineinherited |
|
inlineinherited |
return Bext at time 0
References SM_ZeemanOperator::mBext.
Referenced by SM_ZeemanOperator::computeTemplatedEnergy(), and SM_ZeemanOperator::computeTemplatedMagneticFieldAndEnergy().
return Bext at time step index t
[in] | t | time step index of Bext in [0,SM_TimeStepper::GetMaximimumTimeStepsNumber()[ |
References SM_ZeemanOperator::mBext, SM_ZeemanOperator::mDimension, SM_ZeemanOperator::mZeemanParticlesNumber, and SM_ZeemanOperator::mZeemanTimeStepsNumber.
return Bext at time step index t
[in] | t | time step index of Bext in [0,SM_TimeStepper::GetMaximimumTimeStepsNumber()[ |
References SM_ZeemanOperator::mBext, SM_ZeemanOperator::mDimension, SM_ZeemanOperator::mZeemanParticlesNumber, and SM_ZeemanOperator::mZeemanTimeStepsNumber.
Referenced by SM_Beam::computeL2Convergence().
|
inlineprotectedinherited |
return Bext as an array
References SM_ZeemanOperator::mBext.
|
inlineprotectedinherited |
return Bext as an array
References SM_ZeemanOperator::mBext.
Referenced by SM_ZeemanOperator::copy(), and setBext().
|
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 from SM_Operator.
References SM_Operator::getContentsMemorySize(), SM_ZeemanOperator::mBext, tMemSize, and tReal.
Referenced by getMemorySize(), SM_PermanentZeemanOperator::getMemorySize(), and SM_ZeemanOperator::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_ZeemanOperator.
References SM_ZeemanOperator::getContentsMemorySize().
|
inlineinherited |
return the operator name
References SM_Operator::mName.
Referenced by SM_Operator::copy(), and SM_TemplatedSystem< SystemImpl >::getOperatorNames().
|
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 |
return the dimension of the zeeman operatpr
References SM_ZeemanOperator::mDimension.
Referenced by SM_ZeemanOperator::copy().
|
inlineinherited |
return the number of particles for the zeeman operatpr
References SM_ZeemanOperator::mZeemanParticlesNumber.
Referenced by SM_ZeemanOperator::copy().
|
inlineinherited |
return the number of time steps for the zeeman operatpr
References SM_ZeemanOperator::mZeemanTimeStepsNumber.
Referenced by SM_ZeemanOperator::copy().
|
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().
|
inlinestaticinherited |
get the memory stack in string
Referenced by main().
|
inlinestatic |
build a new instance of the operator
References SM_ConstantZeemanOperator().
Referenced by NewInstance(), and SM_ClassFactory::NewInstance().
|
inlineoverridevirtual |
create a New instance of this @retrun an unique pointer to the instance
Reimplemented from SM_ZeemanOperator.
References New().
|
inline |
set the Bext value
[in] | values | init value |
References SM_ZeemanOperator::getBextAsArray(), SM_ZeemanOperator::setZeemanParticlesNumber(), SM_ZeemanOperator::setZeemanTimeStepsNumber(), and tReal.
Referenced by SM_Test::linedParticlesTestCase(), and SM_Test::testOperators().
|
inlineinherited |
set the Bext value
[in] | values | iniializer list of the values of Bext |
References SM_ZeemanOperator::mBext, and tReal.
|
inlineinherited |
set the Bext value
[in] | values | iniializer list of the values of Bext |
References SM_ZeemanOperator::mBext.
Referenced by SM_Run::loadOperatorsFromOptions().
|
inlineprotectedinherited |
set the name
[in] | name | name of the operator |
References SM_Operator::mName.
Referenced by SM_DemagnetizedOperator::SM_DemagnetizedOperator(), SM_HeissenbergOperator::SM_HeissenbergOperator(), and SM_ZeemanOperator::SM_ZeemanOperator().
|
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.
|
inlineprotectedinherited |
set zeeman particlules number
[in] | p | : the number of Zeeman particules number |
References SM_ZeemanOperator::mZeemanParticlesNumber.
Referenced by discretize(), SM_PermanentZeemanOperator::discretize(), SM_ZeemanOperator::discretize(), setBext(), and SM_ConstantZeemanOperator().
|
inlineprotectedinherited |
set zeeman time steps
[in] | n | : the number of Zeeman times steps |
References SM_ZeemanOperator::mZeemanTimeStepsNumber.
Referenced by discretize(), SM_PermanentZeemanOperator::discretize(), SM_ZeemanOperator::discretize(), setBext(), SM_ConstantZeemanOperator(), and SM_PermanentZeemanOperator::SM_PermanentZeemanOperator().
|
inlinevirtualinherited |
return the string representation of the object node
Reimplemented in SM_TimeStepper, SM_System, SM_StochasticFunction, SM_Network, SM_LandauLifschitzFunction, SM_Beam, 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_Collection< T, I >, CORE_ClassFactory, and SM_NoiseRateFunction.
References CORE_Object::getIdentityString().
Referenced by SM_Run::run(), CORE_Collection< T, I >::toString(), SM_Beam::toString(), SM_Network::toString(), SM_StochasticFunction::toString(), SM_System::toString(), and SM_TimeStepper::toString().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().
|
privateinherited |
Referenced by SM_ZeemanOperator::computeTemplatedEnergy(), SM_ZeemanOperator::computeTemplatedMagneticFieldAndEnergy(), SM_ZeemanOperator::copy(), SM_ZeemanOperator::getBext(), SM_ZeemanOperator::getZeemanParticlesNumber(), SM_ZeemanOperator::setZeemanParticlesNumber(), and SM_ZeemanOperator::SM_ZeemanOperator().
|
privateinherited |