class
#include <src/particle-system/chain.hpp>
Chain Static class for chain coordinates transformation.
Contents
Public types
Public static variables
- static bool bijective_transfer constexpr
- Method flag. Indicates the transformation type;.
Public static functions
-
template<typename VectorArray, typename IdxArray>static void calc_chain_index(VectorArray const& pos, IdxArray& index)
- Calculate the chain index.
-
template<typename VectorArray, typename IdxArray>static void update_chain(VectorArray& chain, VectorArray const& cartesian, IdxArray const& idx, IdxArray const& new_idx)
- Update the chain coordinates from old index array to new index array.
-
template<typename ScalarArray, typename VectorArray, typename IdxArray>static void calc_cartesian(ScalarArray const& mass, VectorArray const& chain, VectorArray& cartesian, IdxArray const& index)
- Calculate the corresponding Cartesian coordinates of the chain coordinates.
-
template<typename VectorArray, typename IdxArray>static void calc_chain(VectorArray const& cartesian, VectorArray& chain, IdxArray const& index)
- Calculate the corresponding chain coordinates of the Cartesian coordinates.
Constructors, destructors, conversion operators
Public functions
Function documentation
template<typename VectorArray, typename IdxArray>
static void hub::Chain:: calc_chain_index(VectorArray const& pos,
IdxArray& index)
Calculate the chain index.
Template parameters | |
---|---|
VectorArray | Type of the Structure of Array coordinates. |
IdxArray | Type of the index array. |
Parameters | |
pos in | Input position in Cartesian coordinates. |
index out | Output index array. |
template<typename VectorArray, typename IdxArray>
static void hub::Chain:: update_chain(VectorArray& chain,
VectorArray const& cartesian,
IdxArray const& idx,
IdxArray const& new_idx)
Update the chain coordinates from old index array to new index array.
Template parameters | |
---|---|
VectorArray | Type of the Structure of Array coordinates. |
IdxArray | Type of the index array. |
Parameters | |
chain in/out | The chain coordinates. |
cartesian | |
idx in | Old chain index array. |
new_idx in | New chain index array. |
template<typename ScalarArray, typename VectorArray, typename IdxArray>
static void hub::Chain:: calc_cartesian(ScalarArray const& mass,
VectorArray const& chain,
VectorArray& cartesian,
IdxArray const& index)
Calculate the corresponding Cartesian coordinates of the chain coordinates.
Template parameters | |
---|---|
ScalarArray | Type of the mass array. |
VectorArray | Type of the Structure of Array coordinates. |
IdxArray | Type of the index array. |
Parameters | |
mass in | The mass array(needed for centre of mass movement). |
chain in | The chain coordinates. |
cartesian out | The Cartesian coordinates. |
index in | The chain index array. |
template<typename VectorArray, typename IdxArray>
static void hub::Chain:: calc_chain(VectorArray const& cartesian,
VectorArray& chain,
IdxArray const& index)
Calculate the corresponding chain coordinates of the Cartesian coordinates.
Template parameters | |
---|---|
VectorArray | Type of the Structure of Array coordinates. |
IdxArray | Type of the index array. |
Parameters | |
cartesian in | The Cartesian coordinates. |
chain out | The chain coordinates. |
index in | The chain index array. |
hub::Chain:: Chain() defaulted
Default constructor.
Variable documentation
static bool hub::Chain::bijective_transfer constexpr
Method flag. Indicates the transformation type;.
If this flag is true, the transformation between chain coordinates and Cartesian coordinates is bijective mapping, otherwise, a centre of mass movement will be performed after the transformation from chain coordinates to Cartesian coordinates.