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

This class describes an MPI implementation of the demagnetized field for one master core. More...

#include <SMOMPI_OneMasterMacroCellsDemagnetizedField.h>

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

Public Member Functions

virtual CORE_UniquePointer< SM_MacroCellsDemagnetizedFieldnewInstance () const override
 create a New instance of this More...
 
virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual tMemSize getContentsMemorySize () const
 return the memory size of the included associations More...
 
const SM_RealFieldgetBoundingBoxMacroCellsDemagnetizedField () const
 get the magnetization field on all not empty macro cells of the bounding box of macro cells
 
SM_RealFieldgetBoundingBoxMacroCellsDemagnetizedField ()
 get the magnetization field on all not empty macro cells of the bounding box of macro cells
 
virtual void discretize (const SM_Material &material, const SM_MacroCellsNetwork &network) final
 discretize the field More...
 
virtual void computeMatrix (const SM_Material &material, const SM_MacroCellsNetwork &network) override
 compute the matrix More...
 
virtual void computeField (const SM_MacroCellsNetwork &network, const SM_MacroCellsMagnetizationField &M) override
 compute the demagnetized field on macro cells network More...
 
- Public Member Functions inherited from SM_MacroCellsDemagnetizedField
void setStorage (const tFlag &f)
 set storage type More...
 
const tFlag & getStorage () const
 yet storage type in {NO_STORAGE,PACKED_STORAGE}
 
const SM_RealFieldgetField () const
 get the demagnetized field on macro cells
 
SM_RealFieldgetField ()
 get the demagnetized field on macro cells
 
tBoolean hasMatrix () const
 return true if the matrix exists
 
void setMatrix (CORE_UniquePointer< SM_PackedBlockMatrix< tReal, SM_Constants::DIM >> matrix)
 set matrix
 
SM_PackedBlockMatrix< tReal, SM_Constants::DIM > & getMatrix ()
 get matrix
 
const SM_PackedBlockMatrix< tReal, SM_Constants::DIM > & getMatrix () const
 get matrix
 
const tReal & getLambdaH () const
 get lambda H More...
 
const tReal & getLambdaHs () const
 get self lambda Hs More...
 
void computeSeparatedFieldSlice (const tReal &lambdaH, const tReal &lambdaHs, const tReal *P, const tReal *eP, const tReal *M_P, const tInteger &nMacroCells, const tReal *X, tReal *H) const
 compute Hdem[X]=F_{P,M}(X) More...
 
virtual tString toString () const override
 return string representaton of the operator
 
- 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...
 
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< SelfClassNew ()
 build a new instance of the operator 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_OneMasterMacroCellsDemagnetizedField (void)
 create a network class
 
virtual ~SMOMPI_OneMasterMacroCellsDemagnetizedField (void)
 destroy
 
- Protected Member Functions inherited from SM_MacroCellsDemagnetizedField
 SM_MacroCellsDemagnetizedField (void)
 create a network class
 
virtual ~SM_MacroCellsDemagnetizedField (void)
 destroy
 
void computeBlocksSymmetricMatrix (const tReal &lambdaH, const tReal &lambdaHs, const tReal *vMCsVolume, const tReal *vMCsX, const tInteger &start, const tInteger &end, tReal *supBlocksValues, tReal *diagBlocksValues) const
 compute the column blocks matrix (i,j) j in [start,end] and j in [0,i] More...
 
void computeBlocksGeneralMatrix (const tReal &lambdaH, const tReal &lambdaHs, const tReal *vMCsVolumes, const tInteger &nX, const tReal *vX, const tInteger &nP, const tReal *vP, tReal *supBlocksValues) const
 compute the column blocks matrix (i,j) j in [start,end] and j in [0,i] More...
 
void computeFieldSlice (const tReal &lambdaH, const tReal &lambdaHs, const tReal *P, const tReal *eP, const tReal *M_P, const tInteger &nMacroCells, const tReal *X, const tReal *M_X, const tReal *iMCsVolume, tReal *H) const
 compute Hdem[X]=F_{P,M}(X) 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

 

Additional Inherited Members

- Static Public Attributes inherited from SM_MacroCellsDemagnetizedField
static constexpr tFlag PACKED_STORAGE =1
 the storage if in a packed matrix
 
static constexpr tFlag NO_STORAGE =0
 no storage
 
- Static Protected Member Functions inherited from SM_MacroCellsDemagnetizedField
static void BuildPackedBlockMatrix (tReal lambdaH, const tReal &lambdaHs, const tReal &Wi, tInteger i, tInteger j, const tReal *Xi, const tReal *Xj, tReal *vBij, tReal &rij, std::array< tReal, SM_Constants::DIM > &U)
 build the symmetric block element of the superior matrix in a packed storage More...
 
static void BuildPackedSupBlockMatrix (tReal lambdaH, tInteger i, tInteger j, const tReal *Xi, const tReal *Xj, tReal *vBij, tReal &rij, std::array< tReal, SM_Constants::DIM > &U)
 build the symmetric block element of the superior matrix in a packed storage More...
 
static void BuildDiagonalBlockMatrix (const tReal &V, const tReal &lambdaHs, tReal &diag)
 build the diagonal block element of the matrix More...
 
static void BuildPackedDiagonalBlockMatrix (const tReal &V, const tReal &lambdaHs, tReal *iDiag)
 build the diagonal block element of the matrix More...
 

Detailed Description

This class describes an MPI implementation of the demagnetized field for one master core.

Author
Stephane Despreaux
Version
2.0

Member Function Documentation

◆ computeField()

void SMOMPI_OneMasterMacroCellsDemagnetizedField::computeField ( const SM_MacroCellsNetwork network,
const SM_MacroCellsMagnetizationField M 
)
overridevirtual

compute the demagnetized field on macro cells network

Parameters
[in]networknetwork of macro cell
[in]M: magnetezation fieldl on macro cell

It computes the demagnetized field on the whole domain for each core

Implements SM_MacroCellsDemagnetizedField.

◆ computeMatrix()

void SMOMPI_OneMasterMacroCellsDemagnetizedField::computeMatrix ( const SM_Material material,
const SM_MacroCellsNetwork network 
)
overridevirtual

compute the matrix

Parameters
[in]material: material used to build the matrix
[in]networkmacro cells network It computes the matrix on the whole domain

Implements SM_MacroCellsDemagnetizedField.

◆ discretize()

void SMOMPI_OneMasterMacroCellsDemagnetizedField::discretize ( const SM_Material material,
const SM_MacroCellsNetwork network 
)
finalvirtual

discretize the field

Parameters
[in]network:operator on which the operatr is applied
[in]material: material of the network
  • It allocates :
    • the local Hdem field
    • the global Hdem field o the whole domain
  • It computes :
    • lambdaH : demagnatized factor for 2 different macro cells
    • lambdaHs : demagnetized factor for interaction of a macro cell with itself
    • the matrix of the demagnetized operator

Reimplemented from SM_MacroCellsDemagnetizedField.

◆ getContentsMemorySize()

virtual tMemSize SMOMPI_OneMasterMacroCellsDemagnetizedField::getContentsMemorySize ( ) const
inlinevirtual

return the 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 from SM_MacroCellsDemagnetizedField.

◆ getMemorySize()

virtual tMemSize SMOMPI_OneMasterMacroCellsDemagnetizedField::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_MacroCellsDemagnetizedField.

◆ New()

static CORE_UniquePointer<SelfClass> SMOMPI_OneMasterMacroCellsDemagnetizedField::New ( )
inlinestatic

build a new instance of the operator

Returns
an unique pointer of the operator

◆ newInstance()

virtual CORE_UniquePointer<SM_MacroCellsDemagnetizedField> SMOMPI_OneMasterMacroCellsDemagnetizedField::newInstance ( ) const
inlineoverridevirtual

create a New instance of this

Returns
an unique pointer to the instance

Implements SM_MacroCellsDemagnetizedField.


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