ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Namespaces | |
namespace | Interpolation |
namespace | Mpi |
namespace | Statistics |
Classes | |
class | Accumulator |
struct | AccumulatorData |
struct | Array |
class | Bag |
Bag of elements. More... | |
class | Cache |
class | compact_vector |
Custom vector container optimized for size. More... | |
struct | conjunction |
struct | conjunction< B1 > |
struct | conjunction< B1, Bn... > |
class | Counter |
class | CylindricalHistogram |
Histogram in cylindrical coordinates. More... | |
class | CylindricalTransformationParameters |
A class to hold and validate parameters for a cylindrical coordinate transformations. More... | |
struct | decay_to_scalar |
Meta function to turns a Vector<1, T> into T. More... | |
struct | decay_to_scalar< Vector< T, 1 > > |
struct | decay_to_scalar< Vector< T, N > > |
class | Factory |
Factory template. More... | |
struct | function_remove_const |
Remove const from a function signature. More... | |
struct | function_remove_const< R(Args...) const > |
struct | function_remove_const< R(Args...)> |
class | Histogram |
Histogram in Cartesian coordinates. More... | |
struct | is_statically_serializable |
Type trait to indicate that a type is serializable with a static size, e.g. More... | |
struct | Matrix |
Matrix representation with static size. More... | |
class | MemcpyIArchive |
Archive that deserializes from a buffer via memcpy. More... | |
class | MemcpyOArchive |
Archive that serializes to a buffer via memcpy. More... | |
class | NumeratedContainer |
Container for objects that are identified by a numeric id. More... | |
struct | Quaternion |
Quaternion representation. More... | |
struct | size_in_bits |
Size of a type in bits. More... | |
struct | tuple_element |
struct | tuple_element< I, Array< T, N > > |
struct | tuple_element< I, Vector< T, N > > |
struct | tuple_size |
struct | tuple_size< Array< T, N > > |
struct | tuple_size< Vector< T, N > > |
class | Vector |
Typedefs | |
using | Vector3b = Utils::Vector< bool, 3 > |
template<std::size_t I, class Tuple > | |
using | tuple_element_t = typename tuple_element< I, Tuple >::type |
template<class T > | |
using | Vector3 = Vector< T, 3 > |
template<std::size_t N> | |
using | VectorXd = Vector< double, N > |
using | Vector2d = VectorXd< 2 > |
using | Vector3d = VectorXd< 3 > |
using | Vector4d = VectorXd< 4 > |
using | Vector6d = VectorXd< 6 > |
using | Vector9d = VectorXd< 9 > |
template<std::size_t N> | |
using | VectorXf = Vector< float, N > |
using | Vector3f = VectorXf< 3 > |
template<std::size_t N> | |
using | VectorXi = Vector< int, N > |
using | Vector3i = VectorXi< 3 > |
Enumerations | |
enum class | MemoryOrder { COLUMN_MAJOR , ROW_MAJOR } |
Functions | |
template<std::size_t I, class T , std::size_t N> | |
auto | get (Array< T, N > const &a) -> std::enable_if_t<(I< N), const T & > |
template<typename Body , typename... ForwardRange> | |
void | cartesian_product (const Body &op, const ForwardRange &...rng) |
Call op with each element of the cartesian product set of rng. | |
template<class InputIt , class T > | |
bool | contains (InputIt first, InputIt last, T const &value) |
Check whether an iterator range contains a value. | |
template<class Range , class T > | |
bool | contains (const Range &rng, T const &value) |
Check whether a range contains a value. | |
template<class T > | |
std::string | demangle () |
Get a human-readable name for a type. | |
template<class Range , class OutputIterator > | |
void | flatten (Range const &v, OutputIterator out) |
Flatten a range of ranges. | |
template<typename ForwardIterator , typename BinaryOp > | |
void | for_each_pair (ForwardIterator first, ForwardIterator last, BinaryOp op) |
Execute op for each pair of elements in [first, last) once. | |
template<typename ForwardRange , typename BinaryOp > | |
void | for_each_pair (ForwardRange &&rng, BinaryOp &&op) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ForwardIterator , typename BinaryOp > | |
void | for_each_cartesian_pair (ForwardIterator first1, ForwardIterator last1, ForwardIterator first2, ForwardIterator last2, BinaryOp op) |
Execute op for each pair of elements between [first1, last1) and [first2, last2). | |
template<typename ForwardRange , typename BinaryOp > | |
void | for_each_cartesian_pair (ForwardRange &&rng1, ForwardRange &&rng2, BinaryOp &&op) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ForwardIterator , typename BinaryOp , typename BinaryCmp > | |
void | for_each_cartesian_pair_if (ForwardIterator first1, ForwardIterator last1, ForwardIterator first2, ForwardIterator last2, BinaryOp op, BinaryCmp cmp) |
Execute op for each pair of elements between [first1, last1) and [first2, last2) if a condition is satisfied. | |
template<typename ForwardRange , typename BinaryOp , typename BinaryCmp > | |
void | for_each_cartesian_pair_if (ForwardRange &&rng1, ForwardRange &&rng2, BinaryOp &&op, BinaryCmp cmp) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<std::size_t I, typename T > | |
const std::tuple_element_t< I, T > & | get (const T &v) |
int | get_linear_index (int a, int b, int c, const Vector3i &adim, MemoryOrder memory_order=MemoryOrder::COLUMN_MAJOR) |
get the linear index from the position (a ,b ,c ) in a 3D grid of dimensions adim . | |
int | get_linear_index (const Vector3i &ind, const Vector3i &adim, MemoryOrder memory_order=MemoryOrder::COLUMN_MAJOR) |
template<class T > | |
T | lower_triangular (T i, T j) |
Linear index into a lower triangular matrix. | |
template<typename T , template< T > class F, T min, T max, class... Args> | |
decltype(auto) | integral_parameter (T i, Args &&...args) |
Generate a call table for an integral non-type template parameter. | |
template<typename Map > | |
auto | keys (Map const &m) -> std::vector< typename Map::key_type > |
Return the keys of a map type. | |
template<typename T , typename Container > | |
T | linear_interpolation (Container const &table, T hi, T offset, T x) |
Linear interpolation between two data points. | |
template<class T , class Integral > | |
auto | mask (Integral mask, T t) -> std::enable_if_t< std::is_unsigned_v< Integral > &&(size_in_bits< Integral >::value >=tuple_size< T >::value), T > |
Pick elements of a tuple-like by a bit mask. | |
template<typename T > | |
constexpr T | AS_erfc_part (T d) |
Approximate \( \exp(d^2) \mathrm{erfc}(d)\) by applying a formula from [1] chapter 7. | |
template<int order, typename T > | |
DEVICE_QUALIFIER auto | bspline (int i, T x) -> std::enable_if_t<(order > 0) &&(order<=7), T > |
Formula of the B-spline. | |
template<class T > | |
auto | bspline (int i, T x, int k) |
Calculate B-splines. | |
template<int order, typename T = double> | |
DEVICE_QUALIFIER auto | bspline_d (int i, T x) -> std::enable_if_t<(order > 0) &&(order<=7), T > |
Derivative of the B-spline. | |
Vector3d | basis_change (Vector3d const &b1, Vector3d const &b2, Vector3d const &b3, Vector3d const &v, bool reverse=false) |
Basis change. | |
Vector3d | transform_coordinate_cartesian_to_cylinder (Vector3d const &pos) |
Coordinate transformation from Cartesian to cylindrical coordinates. | |
Vector3d | transform_coordinate_cartesian_to_cylinder (Vector3d const &pos, Vector3d const &axis, Vector3d const &orientation) |
Coordinate transformation from Cartesian to cylindrical coordinates with change of basis. | |
Vector3d | transform_coordinate_cylinder_to_cartesian (Vector3d const &pos) |
Coordinate transformation from cylindrical to Cartesian coordinates. | |
Vector3d | transform_coordinate_cylinder_to_cartesian (Vector3d const &pos, Vector3d const &axis, Vector3d const &orientation) |
Coordinate transformation from cylindrical to Cartesian coordinates with change of basis. | |
Vector3d | transform_vector_cartesian_to_cylinder (Vector3d const &vec, Vector3d const &axis, Vector3d const &pos) |
Vector transformation from Cartesian to cylindrical coordinates. | |
double | gaussian (Vector3d x, Vector3d x0, double sigma) |
Utils::Vector3d | del_gaussian (Vector3d x, Vector3d x0, double sigma) |
template<unsigned n, typename T > | |
DEVICE_QUALIFIER constexpr T | int_pow (T x) |
Calculate integer powers. | |
template<class T > | |
auto | make_lin_space (T start, T stop, std::size_t number, bool endpoint=true) |
Equally spaced values in interval. | |
template<typename T , std::size_t N, const std::array< std::array< int, N >, N > & matrix, typename Container > | |
constexpr std::array< T, N > | matrix_vector_product (const Container &vec) |
Calculate the matrix-vector product for a statically given (square) matrix. | |
template<typename T , std::size_t N> | |
Vector< T, N > | calc_orthonormal_vector (Vector< T, N > const &vec) |
Return a vector that is orthonormal to vec. | |
void | permute_ifield (int *field, int size, int permute) |
permute an integer array field of size size about permute positions. | |
template<class T > | |
Vector< T, 3 > | convert_quaternion_to_director (Quaternion< T > const &quat) |
Convert quaternion to director. | |
template<class T > | |
Quaternion< T > | convert_director_to_quaternion (Vector< T, 3 > const &d) |
Convert director to quaternion. | |
template<typename T > | |
constexpr int | sgn (T val) |
Calculate signum of val. | |
template<typename T > | |
DEVICE_QUALIFIER constexpr T | sqr (T x) |
Calculates the SQuaRe of x. | |
template<typename T , std::size_t N, std::size_t M> | |
Matrix< T, N, M > | tensor_product (const Vector< T, N > &x, const Vector< T, M > &y) |
template<typename T , std::size_t N> | |
Vector< T, N > | tensor_product (const T &x, const Vector< T, N > &y) |
Vector3d | get_n_triangle (const Vector3d &P1, const Vector3d &P2, const Vector3d &P3) |
Computes the normal vector of a triangle. | |
double | area_triangle (const Vector3d &P1, const Vector3d &P2, const Vector3d &P3) |
Computes the area of triangle between vectors P1,P2,P3, by computing the cross product P1P2 x P1P3 and taking the half of its norm. | |
double | angle_btw_triangles (const Vector3d &P1, const Vector3d &P2, const Vector3d &P3, const Vector3d &P4) |
Computes the angle between two triangles in 3D space. | |
Vector3d | vec_rotate (const Vector3d &axis, double angle, const Vector3d &vector) |
Rotate a vector around an axis. | |
double | angle_between (Vector3d const &v1, Vector3d const &v2) |
Determine the angle between two vectors. | |
template<typename T , std::size_t M, std::size_t N> | |
Utils::Vector< T, M *N > | flatten (Matrix< T, M, N > const &m) |
template<typename T , std::size_t Rows, std::size_t Cols> | |
Matrix< T, Rows, Cols > | diagonal_mat (Utils::Vector< T, Rows > const &v) |
template<typename T , std::size_t Rows, std::size_t Cols> | |
Matrix< T, Rows, Cols > | identity_mat () |
template<typename T , typename U , std::enable_if_t< std::is_arithmetic_v< U >, bool > = true> | |
Quaternion< T > | operator* (const U &b, const Quaternion< T > &a) |
Product quaternion and arithmetic type. | |
template<typename T > | |
Matrix< T, 3, 3 > | rotation_matrix (Quaternion< T > const &q) |
Convert quaternion to rotation matrix. | |
template<class T , class F > | |
auto | raster (Vector< T, 3 > const &offset, Vector< T, 3 > const &grid_spacing, Vector3i size, F f) |
Raster a function over a regular 3d grid. | |
std::vector< Vector3d > | get_cylindrical_sampling_positions (std::pair< double, double > const &r_limits, std::pair< double, double > const &phi_limits, std::pair< double, double > const &z_limits, std::size_t n_r_bins, std::size_t n_phi_bins, std::size_t n_z_bins, double sampling_density) |
Generate sampling positions for a cylindrical histogram. | |
template<class T > | |
std::string | pack (T const &v) |
Pack a serialize type into a string. | |
template<class T > | |
T | unpack (std::string const &state) |
Unpack a serialize type into a string. | |
template<class F , class Tuple > | |
void | for_each (F &&f, Tuple &t) |
template<class F , class Tuple > | |
void | for_each (F &&f, Tuple &&t) |
constexpr uint64_t | u32_to_u64 (uint32_t high, uint32_t low) |
constexpr std::pair< uint32_t, uint32_t > | u64_to_u32 (uint64_t in) |
constexpr double | uniform (uint64_t in) |
Uniformly map unsigned integer to double. | |
template<std::size_t N, typename T > | |
constexpr bool | operator< (Vector< T, N > const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T > | |
constexpr bool | operator> (Vector< T, N > const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T > | |
constexpr bool | operator<= (Vector< T, N > const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T > | |
constexpr bool | operator>= (Vector< T, N > const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T > | |
constexpr bool | operator== (Vector< T, N > const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T > | |
constexpr bool | operator!= (Vector< T, N > const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T , typename U > | |
auto | operator+ (Vector< T, N > const &a, Vector< U, N > const &b) |
template<std::size_t N, typename T > | |
Vector< T, N > & | operator+= (Vector< T, N > &a, Vector< T, N > const &b) |
template<std::size_t N, typename T , typename U > | |
auto | operator- (Vector< T, N > const &a, Vector< U, N > const &b) |
template<std::size_t N, typename T > | |
Vector< T, N > | operator- (Vector< T, N > const &a) |
template<std::size_t N, typename T > | |
Vector< T, N > & | operator-= (Vector< T, N > &a, Vector< T, N > const &b) |
template<std::size_t N, typename T , class U , std::enable_if_t< std::is_arithmetic_v< U >, bool > = true> | |
auto | operator* (U const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T , class U , std::enable_if_t< std::is_arithmetic_v< U >, bool > = true> | |
auto | operator* (Vector< T, N > const &b, U const &a) |
template<std::size_t N, typename T > | |
Vector< T, N > & | operator*= (Vector< T, N > &b, T const &a) |
template<std::size_t N, typename T > | |
Vector< T, N > | operator/ (Vector< T, N > const &a, T const &b) |
template<std::size_t N, typename T > | |
Vector< T, N > | operator/ (T const &a, Vector< T, N > const &b) |
template<std::size_t N, typename T > | |
Vector< T, N > & | operator/= (Vector< T, N > &a, T const &b) |
template<std::size_t N, typename T , class U , class = std::enable_if_t<not(detail::is_vector<T>::value or detail::is_vector<U>::value)>> | |
auto | operator* (Vector< T, N > const &a, Vector< U, N > const &b) |
template<std::size_t N, typename T , class U , class = std::enable_if_t<std::is_integral_v<T> and std::is_integral_v<U>>> | |
auto | operator% (Vector< T, N > const &a, Vector< U, N > const &b) |
template<std::size_t N, typename T > | |
Vector< T, N > | sqrt (Vector< T, N > const &a) |
template<class T > | |
Vector< T, 3 > | vector_product (Vector< T, 3 > const &a, Vector< T, 3 > const &b) |
template<class T , std::size_t N> | |
T | product (Vector< T, N > const &v) |
template<class T , class U , std::size_t N> | |
auto | hadamard_product (Vector< T, N > const &a, Vector< U, N > const &b) |
template<class T , class U , std::size_t N, class = std::enable_if_t<not(detail::is_vector<T>::value)>> | |
auto | hadamard_product (T const &a, Vector< U, N > const &b) |
template<class T , class U , std::size_t N, class = std::enable_if_t<not(detail::is_vector<U>::value)>> | |
auto | hadamard_product (Vector< T, N > const &a, U const &b) |
template<typename T , typename U , class = std::enable_if_t<not(detail::is_vector<T>::value or detail::is_vector<U>::value)>> | |
auto | hadamard_product (T const &a, U const &b) |
template<class T , class U , std::size_t N> | |
auto | hadamard_division (Vector< T, N > const &a, Vector< U, N > const &b) |
template<class T , class U , std::size_t N, class = std::enable_if_t<not(detail::is_vector<U>::value)>> | |
auto | hadamard_division (Vector< T, N > const &a, U const &b) |
template<class T , class U , std::size_t N, class = std::enable_if_t<not(detail::is_vector<T>::value)>> | |
auto | hadamard_division (T const &a, Vector< U, N > const &b) |
template<typename T , typename U , class = std::enable_if_t<not(detail::is_vector<T>::value or detail::is_vector<U>::value)>> | |
auto | hadamard_division (T const &a, U const &b) |
template<typename T > | |
Vector< T, 3 > | unit_vector (unsigned int i) |
template<std::size_t I, class T , std::size_t N> | |
auto | get (Vector< T, N > const &a) -> std::enable_if_t<(I< N), const T & > |
using Utils::tuple_element_t = typedef typename tuple_element<I, Tuple>::type |
using Utils::Vector2d = typedef VectorXd<2> |
Definition at line 163 of file Vector.hpp.
using Utils::Vector3 = typedef Vector<T, 3> |
Definition at line 160 of file Vector.hpp.
using Utils::Vector3b = typedef Utils::Vector<bool, 3> |
Definition at line 41 of file Variant.hpp.
using Utils::Vector3d = typedef VectorXd<3> |
Definition at line 164 of file Vector.hpp.
using Utils::Vector3f = typedef VectorXf<3> |
Definition at line 170 of file Vector.hpp.
using Utils::Vector3i = typedef VectorXi<3> |
Definition at line 173 of file Vector.hpp.
using Utils::Vector4d = typedef VectorXd<4> |
Definition at line 165 of file Vector.hpp.
using Utils::Vector6d = typedef VectorXd<6> |
Definition at line 166 of file Vector.hpp.
using Utils::Vector9d = typedef VectorXd<9> |
Definition at line 167 of file Vector.hpp.
using Utils::VectorXd = typedef Vector<double, N> |
Definition at line 162 of file Vector.hpp.
using Utils::VectorXf = typedef Vector<float, N> |
Definition at line 169 of file Vector.hpp.
using Utils::VectorXi = typedef Vector<int, N> |
Definition at line 172 of file Vector.hpp.
|
strong |
Determine the angle between two vectors.
Definition at line 52 of file vec_rotate.hpp.
References Utils::Vector< T, N >::norm2().
Referenced by Observables::CylindricalLBProfileObservable::calculate_sampling_positions(), and transform_vector_cartesian_to_cylinder().
|
inline |
Computes the angle between two triangles in 3D space.
Returns the angle between two triangles in 3D space given by points P1P2P3 and P2P3P4. Note, that the common edge is given as the second and the third argument. Here, the angle can have values from 0 to 2 * PI, depending on the orientation of the two triangles. So the angle can be convex or concave. For each triangle, an inward direction has been defined as the direction of one of the two normal vectors. Particularly, for triangle P1P2P3 it is the vector N1 = P2P1 x P2P3 and for triangle P2P3P4 it is N2 = P2P3 x P2P4. The method first computes the angle between N1 and N2, which gives always value between 0 and PI and then it checks whether this value must be corrected to a value between PI and 2 * PI.
As an example, consider 4 points A,B,C,D in space given by coordinates A = [1,1,1], B = [2,1,1], C = [1,2,1], D = [1,1,2]. We want to determine the angle between triangles ABC and ACD. In case the orientation of the triangle ABC is [0,0,1] and orientation of ACD is [1,0,0], the resulting angle must be PI/2.0. To get correct results, note that the common edge is AC, and one must call the method as angle_btw_triangles(B,A,C,D)
. With this call we have ensured that N1 = AB x AC (which coincides with [0,0,1]) and N2 = AC x AD (which coincides with [1,0,0]). Alternatively, if the orientations of the two triangles were the opposite, the correct call would be angle_btw_triangles(B,C,A,D)
so that N1 = CB x CA and N2 = CA x CD.
Definition at line 79 of file triangle_functions.hpp.
References get_n_triangle().
Referenced by OifLocalForcesBond::calc_forces().
|
inline |
Computes the area of triangle between vectors P1,P2,P3, by computing the cross product P1P2 x P1P3 and taking the half of its norm.
Definition at line 48 of file triangle_functions.hpp.
References get_n_triangle(), and Utils::Vector< T, N >::norm().
Referenced by add_oif_global_forces(), OifLocalForcesBond::calc_forces(), and calc_oif_mesh().
|
constexpr |
Approximate \( \exp(d^2) \mathrm{erfc}(d)\) by applying a formula from [1] chapter 7.
Definition at line 29 of file AS_erfc_part.hpp.
Referenced by CoulombP3M::pair_energy(), DipolarP3M::pair_energy(), CoulombP3M::pair_force(), and DipolarP3M::pair_force().
|
inline |
Basis change.
Definition at line 45 of file coordinate_transformation.hpp.
References Utils::Vector< T, N >::normalized(), and Utils::Matrix< T, Rows, Cols >::transposed().
Referenced by Shapes::HollowConicalFrustum::calculate_dist(), transform_coordinate_cartesian_to_cylinder(), and transform_coordinate_cylinder_to_cartesian().
DEVICE_QUALIFIER auto Utils::bspline | ( | int | i, |
T | x | ||
) | -> std::enable_if_t<(order > 0) && (order <= 7), T> |
Formula of the B-spline.
Definition at line 32 of file bspline.hpp.
References DEVICE_ASSERT, DEVICE_THROW, and sqr().
Referenced by Utils::Interpolation::bspline_3d(), Utils::Interpolation::bspline_3d_gradient(), and p3m_calculate_interpolation_weights().
auto Utils::bspline | ( | int | i, |
T | x, | ||
int | k | ||
) |
Calculate B-splines.
i | knot number, using 0-based indexing |
x | position in the range (-0.5, 0.5) |
k | order of the B-spline, using 1-based indexing, i.e. a B-spline of order k is a polynomial of degree k-1 |
Definition at line 186 of file bspline.hpp.
DEVICE_QUALIFIER auto Utils::bspline_d | ( | int | i, |
T | x | ||
) | -> std::enable_if_t<(order > 0) && (order <= 7), T> |
Derivative of the B-spline.
Definition at line 210 of file bspline.hpp.
References DEVICE_ASSERT, and DEVICE_THROW.
Vector< T, N > Utils::calc_orthonormal_vector | ( | Vector< T, N > const & | vec | ) |
Return a vector that is orthonormal to vec.
Definition at line 32 of file orthonormal_vec.hpp.
References Utils::Vector< T, N >::broadcast(), Utils::Vector< T, N >::norm(), and Utils::Vector< T, N >::norm2().
void Utils::cartesian_product | ( | const Body & | op, |
const ForwardRange &... | rng | ||
) |
Call op with each element of the cartesian product set of rng.
op | Operation to call for each element of the product set. |
rng | Ranges to form the product over |
Definition at line 54 of file cartesian_product.hpp.
Referenced by for_each_image().
bool Utils::contains | ( | const Range & | rng, |
T const & | value | ||
) |
Check whether a range contains a value.
rng | The range to search in. |
value | The value to search for. |
Definition at line 49 of file contains.hpp.
References contains().
bool Utils::contains | ( | InputIt | first, |
InputIt | last, | ||
T const & | value | ||
) |
Check whether an iterator range contains a value.
first | Beginning of the range |
last | End of the range. |
value | The value to search for. |
Definition at line 36 of file contains.hpp.
Referenced by add_exclusion(), contains(), ReactionMethods::ReactionAlgorithm::displacement_mc_move(), gather_traits_for_types(), mindist(), and CellStructure::remove_particle().
Quaternion< T > Utils::convert_director_to_quaternion | ( | Vector< T, 3 > const & | d | ) |
Convert director to quaternion.
d | Director |
Definition at line 54 of file math/quaternion.hpp.
References Utils::Vector< T, N >::norm().
Referenced by calculate_vs_relate_to_params(), convert_dip_to_quat(), and ScriptInterface::Particles::ParticleHandle::ParticleHandle().
Vector< T, 3 > Utils::convert_quaternion_to_director | ( | Quaternion< T > const & | quat | ) |
Convert quaternion to director.
Definition at line 41 of file math/quaternion.hpp.
Referenced by ParticlePosition::calc_director(), connection_vector(), gb_pair_energy(), gb_pair_force(), and ScriptInterface::Particles::ParticleHandle::ParticleHandle().
|
inline |
Definition at line 31 of file utils/include/utils/math/gaussian.hpp.
References gaussian().
std::string Utils::demangle | ( | ) |
Get a human-readable name for a type.
Uses boost to demangle the name, for details see documentation for boost::core::demangle.
T | type |
Definition at line 36 of file demangle.hpp.
Matrix< T, Rows, Cols > Utils::diagonal_mat | ( | Utils::Vector< T, Rows > const & | v | ) |
Definition at line 225 of file matrix.hpp.
Utils::Vector< T, M *N > Utils::flatten | ( | Matrix< T, M, N > const & | m | ) |
Definition at line 220 of file matrix.hpp.
References Utils::Matrix< T, Rows, Cols >::begin(), and Utils::Matrix< T, Rows, Cols >::end().
void Utils::flatten | ( | Range const & | v, |
OutputIterator | out | ||
) |
Flatten a range of ranges.
Copy a range of ranges to an output range by subsequently copying the nested ranges to the output. Arbitrary deep nesting is supported, the elements are copied into the output in a depth-first fashion.
Range | A Forward Range |
OutputIterator | An OutputIterator |
v | Input Range |
out | Output iterator |
Definition at line 64 of file flatten.hpp.
Referenced by System::System::calculate_pressure(), dpd_stress(), Observables::ParticleObservable< ObsType >::evaluate(), and Utils::Matrix< T, Rows, Cols >::Matrix().
void Utils::for_each | ( | F && | f, |
Tuple && | t | ||
) |
void Utils::for_each | ( | F && | f, |
Tuple & | t | ||
) |
void Utils::for_each_cartesian_pair | ( | ForwardIterator | first1, |
ForwardIterator | last1, | ||
ForwardIterator | first2, | ||
ForwardIterator | last2, | ||
BinaryOp | op | ||
) |
Execute op for each pair of elements between [first1, last1) and [first2, last2).
Diagonal elements are not excluded. Pairs are traversed ordered, so that for op(*it, *jt), it holds that distance(it - first) < distance(jt - first), and distance(it_n - first) < distance(it_n+1 - first) for consecutive calls.
Definition at line 62 of file for_each_pair.hpp.
Referenced by for_each_cartesian_pair().
void Utils::for_each_cartesian_pair | ( | ForwardRange && | rng1, |
ForwardRange && | rng2, | ||
BinaryOp && | op | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 76 of file for_each_pair.hpp.
References for_each_cartesian_pair().
void Utils::for_each_cartesian_pair_if | ( | ForwardIterator | first1, |
ForwardIterator | last1, | ||
ForwardIterator | first2, | ||
ForwardIterator | last2, | ||
BinaryOp | op, | ||
BinaryCmp | cmp | ||
) |
Execute op for each pair of elements between [first1, last1) and [first2, last2) if a condition is satisfied.
Diagonal elements are not excluded. Pairs are traversed ordered, so that for op(*it, *jt), it holds that distance(it - first) < distance(jt - first), and distance(it_n - first) < distance(it_n+1 - first) for consecutive calls.
Definition at line 93 of file for_each_pair.hpp.
Referenced by for_each_cartesian_pair_if().
void Utils::for_each_cartesian_pair_if | ( | ForwardRange && | rng1, |
ForwardRange && | rng2, | ||
BinaryOp && | op, | ||
BinaryCmp | cmp | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 109 of file for_each_pair.hpp.
References for_each_cartesian_pair_if().
void Utils::for_each_pair | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
BinaryOp | op | ||
) |
Execute op for each pair of elements in [first, last) once.
Diagonal elements are excluded. Pairs are traversed ordered, so that for op(*it, *jt), it holds that distance(it - first) < distance(jt - first), and distance(it_n - first) < distance(it_n+1 - first) for consecutive calls.
Definition at line 35 of file for_each_pair.hpp.
Referenced by for_each_pair(), and ClusterAnalysis::ClusterStructure::run_for_all_pairs().
void Utils::for_each_pair | ( | ForwardRange && | rng, |
BinaryOp && | op | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 47 of file for_each_pair.hpp.
References for_each_pair().
Definition at line 27 of file utils/include/utils/math/gaussian.hpp.
Referenced by del_gaussian().
auto Utils::get | ( | Array< T, N > const & | a | ) | -> std::enable_if_t<(I < N), const T &> |
const std::tuple_element_t< I, T > & Utils::get | ( | const T & | v | ) |
auto Utils::get | ( | Vector< T, N > const & | a | ) | -> std::enable_if_t<(I < N), const T &> |
Definition at line 496 of file Vector.hpp.
std::vector< Vector3d > Utils::get_cylindrical_sampling_positions | ( | std::pair< double, double > const & | r_limits, |
std::pair< double, double > const & | phi_limits, | ||
std::pair< double, double > const & | z_limits, | ||
std::size_t | n_r_bins, | ||
std::size_t | n_phi_bins, | ||
std::size_t | n_z_bins, | ||
double | sampling_density | ||
) |
Generate sampling positions for a cylindrical histogram.
r_limits | Range for radial coordinate as std::pair. |
phi_limits | Range for azimuthal angle as std::pair. |
z_limits | Range for z coordinate as std::pair. |
n_r_bins | Number of bins in radial direction. |
n_phi_bins | Number of bins in azimuthal direction. |
n_z_bins | Number of bins in z direction. |
sampling_density | The number of samples per unit volume. |
Cartesian | sampling coordinates. |
Definition at line 46 of file sampling.hpp.
References Utils::Array< T, N >::front(), make_lin_space(), and sqr().
Referenced by Observables::CylindricalLBProfileObservable::calculate_sampling_positions().
|
inline |
Definition at line 56 of file index.hpp.
References get_linear_index().
|
inline |
get the linear index from the position (a
,b
,c
) in a 3D grid of dimensions adim
.
a,b,c | Position in 3D space |
adim | Dimensions of the underlying grid |
memory_order | Row- or column-major |
Definition at line 43 of file index.hpp.
References COLUMN_MAJOR.
Referenced by fft::find_comm_groups(), get_linear_index(), fft::fft_data_struct< FloatType >::initialize_fft(), and p3m_calculate_interpolation_weights().
|
inline |
Computes the normal vector of a triangle.
The sign convention is such that P1P2, P1P3 and the normal form a right-handed system. The normal vector is not normalized, i.e. its length is arbitrary.
Definition at line 37 of file triangle_functions.hpp.
References vector_product().
Referenced by add_oif_global_forces(), angle_btw_triangles(), area_triangle(), OifLocalForcesBond::calc_forces(), and calc_oif_mesh().
auto Utils::hadamard_division | ( | T const & | a, |
U const & | b | ||
) |
Definition at line 461 of file Vector.hpp.
auto Utils::hadamard_division | ( | T const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 448 of file Vector.hpp.
References Utils::Array< T, N >::begin().
auto Utils::hadamard_division | ( | Vector< T, N > const & | a, |
U const & | b | ||
) |
Definition at line 437 of file Vector.hpp.
auto Utils::hadamard_division | ( | Vector< T, N > const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 422 of file Vector.hpp.
References Utils::Array< T, N >::begin(), Utils::Array< T, N >::cbegin(), and Utils::Array< T, N >::cend().
Referenced by TuningAlgorithm::get_mc_time(), LatticeWalberla::LatticeWalberla(), LocalBox::make_regular_decomposition(), P3MParameters::recalc_a_ai_cao_cut(), and BrownianThermostat::sigma().
auto Utils::hadamard_product | ( | T const & | a, |
U const & | b | ||
) |
Definition at line 417 of file Vector.hpp.
auto Utils::hadamard_product | ( | T const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 394 of file Vector.hpp.
auto Utils::hadamard_product | ( | Vector< T, N > const & | a, |
U const & | b | ||
) |
Definition at line 405 of file Vector.hpp.
auto Utils::hadamard_product | ( | Vector< T, N > const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 379 of file Vector.hpp.
References Utils::Array< T, N >::begin(), Utils::Array< T, N >::cbegin(), and Utils::Array< T, N >::cend().
Referenced by P3MParameters::calc_grid_pos(), FieldCoupling::Fields::Interpolated< T, codim >::fits_in_box(), LB::ParticleCoupling::get_noise_term(), lb_drag_force(), LocalBox::make_regular_decomposition(), and positions_in_halo_impl().
Matrix< T, Rows, Cols > Utils::identity_mat | ( | ) |
Definition at line 231 of file matrix.hpp.
|
constexpr |
Calculate integer powers.
This functions calculates x^n, where n is a positive integer that is known at compile time. It uses exponentiation by squaring to construct an efficient function.
Definition at line 61 of file int_pow.hpp.
References int_pow().
Referenced by gb_pair_energy(), gb_pair_force(), int_pow(), and p3m_k_space_error_gpu_kernel_ik().
decltype(auto) Utils::integral_parameter | ( | T | i, |
Args &&... | args | ||
) |
Generate a call table for an integral non-type template parameter.
Can be used to dynamically create a switch statement for contiguous values.
Definition at line 57 of file integral_parameter.hpp.
auto Utils::keys | ( | Map const & | m | ) | -> std::vector<typename Map::key_type> |
Return the keys of a map type.
Returns a vector of copies of the keys of a map, unordered_map, ...
Definition at line 34 of file keys.hpp.
Referenced by ComFixed::get_fixed_types(), get_particle_ids(), and get_particle_ids_parallel().
T Utils::linear_interpolation | ( | Container const & | table, |
T | hi, | ||
T | offset, | ||
T | x | ||
) |
Linear interpolation between two data points.
[in] | table | Tabulated values, equally-spaced along the x-axis |
[in] | hi | Distance on the x-axis between tabulated values |
[in] | offset | Position on the x-axis of the first tabulated value |
[in] | x | Position on the x-axis at which to interpolate the value |
x
. Definition at line 34 of file linear_interpolation.hpp.
Referenced by TabulatedPotential::energy(), and TabulatedPotential::force().
T Utils::lower_triangular | ( | T | i, |
T | j | ||
) |
Linear index into a lower triangular matrix.
This is row-major.
T | Integral type |
i | row index |
j | column index |
Definition at line 71 of file index.hpp.
Referenced by InteractionsNonBonded::get_ia_param_key().
auto Utils::make_lin_space | ( | T | start, |
T | stop, | ||
std::size_t | number, | ||
bool | endpoint = true |
||
) |
Equally spaced values in interval.
Returns a range of equally spaced values in the range start
to stop
, like numpy.linspace()
.
T | floating point type |
start | Start value of the interval |
stop | End value of the interval |
number | Number of partition points |
endpoint | If true, the last point is stop . |
Definition at line 41 of file make_lin_space.hpp.
Referenced by Observables::ProfileObservable::edges(), get_cylindrical_sampling_positions(), and raster().
auto Utils::mask | ( | Integral | mask, |
T | t | ||
) | -> std::enable_if_t<std::is_unsigned_v<Integral> && (size_in_bits<Integral>::value >= tuple_size<T>::value), T> |
Pick elements of a tuple-like by a bit mask.
E.g. every element of the input for which the corresponding bit is set in the mask is set is copied to the output unmodified, the elements that are not set are set to zero (default constructed instance of the type).
Example: mask(0b1011, {1, 2, 3, 4}) => {1, 0, 3, 4}
T | implements the tuple interface(get, tuple_size, ...) |
Integral | An unsigned integral type |
mask | bit mask, if the i-th bit is set, the i-th element in t is copied to the output, otherwise it is set to zero. |
t | input elements |
Definition at line 57 of file mask.hpp.
References mask().
Referenced by mask(), and propagate_omega_quat_particle().
|
constexpr |
Calculate the matrix-vector product for a statically given (square) matrix.
T | data type for the vector. |
N | size of the vector. |
matrix | const reference to a static integer array (size N) of arrays (each of size N). |
Container | container type for the vector. |
vec | Container with data of type T and length N with the vector data. |
An | array with the result of the matrix-vector product. |
Definition at line 104 of file matrix_vector_product.hpp.
|
constexpr |
Definition at line 234 of file Vector.hpp.
auto Utils::operator% | ( | Vector< T, N > const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 345 of file Vector.hpp.
Quaternion< T > Utils::operator* | ( | const U & | b, |
const Quaternion< T > & | a | ||
) |
Product quaternion and arithmetic type.
T | Data type of quaternion a . |
U | Type of multiplier b . |
b | Quaternion. |
a | Multiplier. |
Definition at line 142 of file quaternion.hpp.
References operator*().
Referenced by operator*(), operator*(), operator*(), and operator*().
auto Utils::operator* | ( | U const & | a, |
Vector< T, N > const & | b | ||
) |
Definition at line 270 of file Vector.hpp.
References operator*().
auto Utils::operator* | ( | Vector< T, N > const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 335 of file Vector.hpp.
References operator*().
auto Utils::operator* | ( | Vector< T, N > const & | b, |
U const & | a | ||
) |
Definition at line 282 of file Vector.hpp.
References operator*().
Definition at line 254 of file Vector.hpp.
References operator-().
auto Utils::operator- | ( | Vector< T, N > const & | a, |
Vector< U, N > const & | b | ||
) |
Definition at line 249 of file Vector.hpp.
References operator-().
Referenced by operator-(), and operator-().
Vector< T, N > Utils::operator/ | ( | T const & | a, |
Vector< T, N > const & | b | ||
) |
Definition at line 310 of file Vector.hpp.
References Utils::Array< T, N >::begin(), and operator/().
Vector< T, N > Utils::operator/ | ( | Vector< T, N > const & | a, |
T const & | b | ||
) |
Definition at line 301 of file Vector.hpp.
References Utils::Array< T, N >::begin(), and operator/().
Referenced by operator/(), and operator/().
|
constexpr |
Definition at line 209 of file Vector.hpp.
|
constexpr |
Definition at line 219 of file Vector.hpp.
|
constexpr |
Definition at line 214 of file Vector.hpp.
|
constexpr |
Definition at line 224 of file Vector.hpp.
std::string Utils::pack | ( | T const & | v | ) |
Pack a serialize type into a string.
T | Serializable type |
v | Value to serialize |
Definition at line 38 of file pack.hpp.
Referenced by ScriptInterface::Interactions::NonBondedInteractions::get_internal_state(), ScriptInterface::System::System::get_internal_state(), and ScriptInterface::ContextManager::serialize().
|
inline |
permute an integer array field of size size about permute positions.
Definition at line 24 of file permute_ifield.hpp.
References permute_ifield().
Referenced by permute_ifield().
T Utils::product | ( | Vector< T, N > const & | v | ) |
Definition at line 374 of file Vector.hpp.
References Utils::Array< T, N >::cbegin(), and Utils::Array< T, N >::cend().
Referenced by ScriptInterface::CellSystem::CellSystem::CellSystem(), dp3m_k_space_error(), dp3m_tune_aliasing_sums(), walberla::fill_3D_scalar_array(), walberla::fill_3D_vector_array(), fft::find_comm_groups(), G_opt(), G_opt_dipolar(), G_opt_dipolar_self_energy(), walberla::LBWalberlaImpl< FloatType, Architecture >::get_pressure_tensor(), grid_influence_function(), grid_influence_function(), fft::fft_data_struct< FloatType >::initialize_fft(), CoulombP3MImpl< FloatType, Architecture >::long_range_kernel(), p3m_gpu_add_farfield_force(), p3m_k_space_error(), p3m_real_space_error(), p3m_tune_aliasing_sums(), walberla::set_boundary_from_grid(), and BoxGeometry::volume().
auto Utils::raster | ( | Vector< T, 3 > const & | offset, |
Vector< T, 3 > const & | grid_spacing, | ||
Vector3i | size, | ||
F | f | ||
) |
Raster a function over a regular 3d grid.
This evaluates a function over a regular grid and returns the function values at the grid points.
offset | Position of the lowest grid point |
grid_spacing | Grid constant |
size | Grid size |
f | Function to evaluate |
Definition at line 42 of file raster.hpp.
References Utils::Array< T, N >::data(), and make_lin_space().
Matrix< T, 3, 3 > Utils::rotation_matrix | ( | Quaternion< T > const & | q | ) |
Convert quaternion to rotation matrix.
T | Data type of quaternion. |
q | Quaternion. |
Definition at line 152 of file quaternion.hpp.
References Utils::Quaternion< T >::normalized().
|
constexpr |
Calculate signum of val.
Definition at line 27 of file sgn.hpp.
Referenced by BoxGeometry::velocity_difference().
|
constexpr |
Calculates the SQuaRe of x.
Definition at line 28 of file sqr.hpp.
References sqr().
Referenced by math::analytic_cotangent_sum(), bspline(), IBMTriel::calc_forces(), calc_part_distribution(), calc_re(), calc_rg(), calc_rh(), Shapes::Ellipsoid::calculate_dist(), Shapes::SimplePore::calculate_dist(), Shapes::Slitpore::calculate_dist(), Shapes::Torus::calculate_dist(), CoulombMMM1D::CoulombMMM1D(), CoulombP3MImpl< FloatType, Architecture >::count_charged_particles(), elc_data::dielectric_layers_self_energy(), elc_data::dielectric_layers_self_forces(), dp3m_k_space_error(), dp3m_real_space_error(), dp3m_tune_aliasing_sums(), dpd_pair_force(), HarmonicBond::energy(), QuarticBond::energy(), AngleCosineBond::energy(), AngleCossquareBond::energy(), AngleHarmonicBond::energy(), DipolarLayerCorrection::energy_correction(), Accumulators::fcs_acf(), FeneBond::FeneBond(), force_capping(), AngleCosineBond::forces(), AngleHarmonicBond::forces(), TabulatedAngleBond::forces(), G_opt(), G_opt_dipolar(), gaussian_pair_energy(), gaussian_pair_force_factor(), gb_pair_energy(), gb_pair_force(), get_cylindrical_sampling_positions(), get_interacting_neighbors(), get_pairs_filtered(), get_short_range_neighbors(), hzeta(), CollisionDetection::BindAtPointOfCollision::initialize(), CollisionDetection::BindCenters::initialize(), CollisionDetection::GlueToSurface::initialize(), lj_pair_energy(), ljcos2_pair_energy(), ljcos_pair_energy(), ljcos_pair_force_factor(), LJcos_Parameters::LJcos_Parameters(), ljgen_pair_force_factor(), CoulombP3MImpl< FloatType, Architecture >::long_range_kernel(), DipolarP3MImpl< FloatType, Architecture >::long_range_kernel(), CoulombP3MImpl< FloatType, Architecture >::long_range_pressure(), modify_p3m_sums(), morse_pair_energy(), morse_pair_force_factor(), Observables::LBFluidPressureTensor::operator()(), VerletCriterion< CutoffGetter >::operator()(), p3m_k_space_error(), p3m_k_space_error_gpu_kernel_ik(), p3m_real_space_error(), p3m_tune_aliasing_sums(), DipolarP3M::pair_energy(), DipolarP3M::pair_force(), LB::ParticleCoupling::ParticleCoupling(), SmSt_pair_force_factor(), sqr(), steepest_descent_step(), structure_factor(), CoulombMMM1D::tune(), velocity_verlet_npt_finalize_p_inst(), velocity_verlet_npt_propagate_pos(), velocity_verlet_npt_propagate_vel(), velocity_verlet_npt_propagate_vel_final(), and wca_pair_energy().
Definition at line 357 of file Vector.hpp.
References Utils::Array< T, N >::begin().
Referenced by LB::ParticleCoupling::get_noise_term().
Vector< T, N > Utils::tensor_product | ( | const T & | x, |
const Vector< T, N > & | y | ||
) |
Definition at line 38 of file tensor_product.hpp.
Matrix< T, N, M > Utils::tensor_product | ( | const Vector< T, N > & | x, |
const Vector< T, M > & | y | ||
) |
Definition at line 30 of file tensor_product.hpp.
Referenced by add_non_bonded_pair_virials(), Utils::Interpolation::bspline_3d_gradient_accumulate(), calc_bonded_three_body_pressure_tensor(), calc_bonded_virial_pressure_tensor(), FieldCoupling::Fields::PlaneWave< T, codim >::jacobian(), and Coulomb::ShortRangePressureKernel::operator()().
Coordinate transformation from Cartesian to cylindrical coordinates.
The origins and z-axis of the coordinate systems co-incide. The \( \phi = 0 \) direction corresponds to the x-axis in the original coordinate system.
pos | Vector to transform |
Definition at line 70 of file coordinate_transformation.hpp.
Referenced by Shapes::HollowConicalFrustum::calculate_dist(), Observables::CylindricalDensityProfile::evaluate(), Observables::CylindricalFluxDensityProfile::evaluate(), Observables::CylindricalLBFluxDensityProfileAtParticlePositions::evaluate(), Observables::CylindricalVelocityProfile::evaluate(), Observables::CylindricalLBVelocityProfileAtParticlePositions::evaluate(), Observables::CylindricalLBVelocityProfile::operator()(), and transform_coordinate_cartesian_to_cylinder().
|
inline |
Coordinate transformation from Cartesian to cylindrical coordinates with change of basis.
The origins of the coordinate systems co-incide.
If the parameter axis
is not equal to [0, 0, 1]
, the value of the angle \( \phi \) in cylindrical coordinates is under-defined. To fully define it, it is necessary to provide an orientation vector in Cartesian coordinates that will be used as the reference point (i.e. such that \( \phi = 0 \)), by default it is the x-axis.
pos | Vector to transform |
axis | Longitudinal axis of the cylindrical coordinates |
orientation | Reference point (in untransformed coordinates) for which \( \phi = 0 \) |
Definition at line 91 of file coordinate_transformation.hpp.
References basis_change(), transform_coordinate_cartesian_to_cylinder(), and vector_product().
Coordinate transformation from cylindrical to Cartesian coordinates.
The origins and z-axis of the coordinate systems co-incide. The \( \phi = 0 \) direction corresponds to the x-axis in the transformed coordinate system.
pos | Vector to transform |
Definition at line 109 of file coordinate_transformation.hpp.
Referenced by Shapes::HollowConicalFrustum::calculate_dist(), Observables::CylindricalLBProfileObservable::calculate_sampling_positions(), and transform_coordinate_cylinder_to_cartesian().
|
inline |
Coordinate transformation from cylindrical to Cartesian coordinates with change of basis.
The origins of the coordinate systems co-incide.
If the parameter axis
is not equal to [0, 0, 1]
, the value of the angle \( \phi \) in cylindrical coordinates is under-defined. To fully define it, it is necessary to provide an orientation vector in Cartesian coordinates that will be used as the reference point (i.e. such that \( \phi = 0 \)).
pos | Vector to transform |
axis | Longitudinal axis of the cylindrical coordinates |
orientation | Reference point (in Cartesian coordinates) for which \( \phi = 0 \) |
Definition at line 131 of file coordinate_transformation.hpp.
References basis_change(), transform_coordinate_cylinder_to_cartesian(), and vector_product().
|
inline |
Vector transformation from Cartesian to cylindrical coordinates.
vec | Vector to transform |
axis | Longitudinal axis of the cylindrical coordinates |
pos | Origin of the vector |
Definition at line 147 of file coordinate_transformation.hpp.
References angle_between(), vec_rotate(), and vector_product().
Referenced by Observables::CylindricalFluxDensityProfile::evaluate(), Observables::CylindricalLBFluxDensityProfileAtParticlePositions::evaluate(), Observables::CylindricalVelocityProfile::evaluate(), Observables::CylindricalLBVelocityProfileAtParticlePositions::evaluate(), and Observables::CylindricalLBVelocityProfile::operator()().
|
inlineconstexpr |
Definition at line 26 of file u32_to_u64.hpp.
Referenced by Random::philox_4_uint64s().
|
inlineconstexpr |
Definition at line 30 of file u32_to_u64.hpp.
|
inlineconstexpr |
Uniformly map unsigned integer to double.
This maps a unsigned integer to the double interval (0., 1.], where 0 is mapped to the smallest representable value larger than 0., and the maximal integer value is mapped to 1.
in | Unsigned integer value |
Definition at line 36 of file uniform.hpp.
Vector< T, 3 > Utils::unit_vector | ( | unsigned int | i | ) |
Definition at line 465 of file Vector.hpp.
T Utils::unpack | ( | std::string const & | state | ) |
Unpack a serialize type into a string.
T | Serializable type |
state | String to construct the value from, as returned by Utils::pack. |
Rotate a vector around an axis.
axis | The axis to rotate about |
angle | Angle to rotate |
vector | Vector to act on |
Definition at line 40 of file vec_rotate.hpp.
Referenced by Observables::CylindricalLBProfileObservable::calculate_sampling_positions(), draw_polymer_positions(), ScriptInterface::System::rotate_system(), and transform_vector_cartesian_to_cylinder().
Vector< T, 3 > Utils::vector_product | ( | Vector< T, 3 > const & | a, |
Vector< T, 3 > const & | b | ||
) |
Definition at line 368 of file Vector.hpp.
Referenced by IBMTriel::calc_forces(), Shapes::HollowConicalFrustum::calculate_dist(), Observables::CylindricalLBProfileObservable::calculate_sampling_positions(), Observables::BondDihedrals::evaluate(), get_n_triangle(), IBMTriel::initialize(), transform_coordinate_cartesian_to_cylinder(), transform_coordinate_cylinder_to_cartesian(), and transform_vector_cartesian_to_cylinder().