42 std::valarray<tReal>
mJs;
155 [&nAloneParticles](
const auto& i){nAloneParticles+=(i==0);});
156 return nAloneParticles;
211 std::valarray<tIndex>&& neighborsIndices,
212 std::valarray<tReal>&& Js) {
223 const std::vector<tIndex>& neighborsIndices,
224 const std::vector<tReal>& Js) {
230 auto Ni=neighborsIndices.cbegin();
236 mJs.resize(Js.size());
237 std::for_each(std::begin(
mJs),std::end(
mJs),[&Ji](
tReal& e){e=(*Ji);Ji++;} );
tUCInt tDimension
Definition: CORE_StdPtrField.h:567
K getDimension() const
get the dimension of the field
Definition: CORE_Field.h:143
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: CORE_Field.h:93
void copy(const tIndex &n, const Q *vs)
initialize the field to the values of pointer of size n
Definition: CORE_Field.h:422
tIndex getElementsNumber() const
return the number values of the container
Definition: CORE_Field.h:118
void setElementsNumber(const tInteger &n)
set the number of element of the container
Definition: CORE_Field.h:112
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:94
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:259
This class is describes a a network.
Definition: SM_Network.h:18
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_Network.h:94
std::valarray< tReal > mJs
Definition: SM_Network.h:42
tReal mLambda
Definition: SM_Network.h:29
std::valarray< tIndex > mNeighborsIndices
Definition: SM_Network.h:39
tDimension getDimension() const
return the dimension
Definition: SM_Network.h:133
tIndex getConnectionsNumber() const
get the number of connections
Definition: SM_Network.h:246
tIndex computeAloneParticlesNumber() const
return the particles number
Definition: SM_Network.h:152
const tReal & getLambda() const
get the lambda value
Definition: SM_Network.h:201
const std::valarray< tIndex > & getNeighborsIndices() const
Definition: SM_Network.h:266
void setNeighbors(std::valarray< tUInt > &&neighborsNumber, std::valarray< tIndex > &&neighborsIndices, std::valarray< tReal > &&Js)
set the neighbors by moving
Definition: SM_Network.h:210
void create3DGrid(const tIndex &Nx, const tIndex Ny, const tIndex Nz, const tReal &Hx, const tReal &Hy, const tReal &Hz, const tReal &J, const tBoolean &hasSelfInteraction)
create a grid 3D of size Nx x Ny x Nz with distance between particles is hx x hy x hz the interaction...
Definition: SM_Network.cpp:5
std::valarray< tIndex > & getNeighborsIndices()
Definition: SM_Network.h:273
const std::valarray< tUInt > & getNeighborsNumber() const
get the neighbors number
Definition: SM_Network.h:252
const std::valarray< tReal > & getHeissenbergCoefficients() const
get the Heissenberg coefficients
Definition: SM_Network.h:283
void setParticlesCoordinates(std::initializer_list< tReal > &&coords)
void set particles 3D-coordinates
Definition: SM_Network.h:162
static CORE_UniquePointer< SM_Network > New()
build a new instance of a Network
Definition: SM_Network.h:74
void setParticlesCoordinates(const std::initializer_list< tReal > &coords)
void set particles 3D-coordinates
Definition: SM_Network.h:168
tInteger getParticlesNumber() const
return the particles number
Definition: SM_Network.h:146
void setNeighbors(const std::valarray< tUInt > &neighborsNumber, const std::vector< tIndex > &neighborsIndices, const std::vector< tReal > &Js)
set the neighbors by copy
Definition: SM_Network.h:222
const SM_RealField & getParticlesCoordinates() const
void get particles coordinates
Definition: SM_Network.h:181
std::valarray< tUInt > & getNeighborsNumber()
get the neighbors number
Definition: SM_Network.h:258
void setParticlesCoordinates(const SM_RealField &coords)
void set particles coordinates
Definition: SM_Network.h:174
SM_Network(void)
create a network class
Definition: SM_Network.h:52
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_Network.h:106
std::valarray< tReal > & getHeissenbergCoefficients()
get the Heissenberg coefficients
Definition: SM_Network.h:290
void setLambda(const tReal &L)
set the lambda value
Definition: SM_Network.h:195
virtual tString toString() const override
turn the class into a string representation
Definition: SM_Network.cpp:146
std::valarray< tUInt > mNeighborsNumber
Definition: SM_Network.h:36
void copy(const SM_Network &network)
copy the network
Definition: SM_Network.h:120
virtual ~SM_Network(void)
destroy
Definition: SM_Network.h:63
SM_RealField mPoints
Definition: SM_Network.h:33
SM_RealField & getParticlesCoordinates()
void get particles coordinates
Definition: SM_Network.h:188
void setParticlesNumber(const tInteger &nParticles)
set the particles number
Definition: SM_Network.h:140
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:19
typename std::unique_ptr< T, CORE_Object::Delete > CORE_UniquePointer
Definition: sp.h:8
#define tUInt
Definition: types.h:44
#define tIndex
Definition: types.h:157
#define tString
Definition: types.h:147
#define tMemSize
Definition: types.h:166
#define tInteger
Definition: types.h:114
#define tBoolean
Definition: types.h:151
#define tReal
Definition: types.h:137