QMCPACK
RandomRotationMatrix.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2022 QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #ifndef QMCPLUSPLUS_RANDOM_ROTATION_MATRIX_H
14 #define QMCPLUSPLUS_RANDOM_ROTATION_MATRIX_H
15 
16 #include "Configuration.h"
19 #include <array>
20 
21 namespace qmcplusplus
22 {
23 
24 /// Create a random 3D rotation matrix using a random generator
26 {
27  auto rng1 = rng();
28  auto rng2 = rng();
29  auto rng3 = rng();
30  return generateRotationMatrix<QMCTraits::RealType>(rng1, rng2, rng3);
31  // The order of evaluation of function arguments is unspecified by the standard.
32  // The following code will cause failures in the deterministic tests.
33  // return generateRotationMatrix<QMCTraits::RealType>(rng(), rng(), rng());
34 }
35 
36 } // namespace qmcplusplus
37 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QMCTraits::TensorType generateRandomRotationMatrix(RandomBase< QMCTraits::FullPrecRealType > &rng)
Create a random 3D rotation matrix using a random generator.
Declare a global Random Number Generator.