-
- Downloads
There was an error fetching the commit references. Please try again later.
Template version of vector and Tensor
It allows to declare vectors (tensors) of arbitrary size N (NxM). The difference wrt Matrix and std::vector is that dimensions should be declared at compilation time. This allows to save the storage of extra information (useful for small 3 or 3x3 objects) and to optimize the code. To improve the performance, I used a single n*m array for Tensors (instead of a [n][m] array). However, the external interface is untouched. Finally, I defined some typedefs to simplify usage: Vector (for 3d, so as to maintain compatibility with the rest of plumed) Tensor (for 3x3d, so as to maintain compatibility with the rest of plumed) From the tests that I performed, there is no visible overhead when compared with the older (fixed 3 or 3x3) vector/tensor.
Loading
Please register or sign in to comment