1 /* -*- c++ -*- ----------------------------------------------------------
2    LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3    https://www.lammps.org/, Sandia National Laboratories
4    Steve Plimpton, sjplimp@sandia.gov
5 
6    Copyright (2003) Sandia Corporation.  Under the terms of Contract
7    DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8    certain rights in this software.  This software is distributed under
9    the GNU General Public License.
10 
11    See the README file in the top-level LAMMPS directory.
12 ------------------------------------------------------------------------- */
13 
14 #ifndef LMP_MATH_CONST_H
15 #define LMP_MATH_CONST_H
16 
17 namespace LAMMPS_NS {
18 
19 namespace MathConst {
20   static constexpr double THIRD = 1.0 / 3.0;
21   static constexpr double TWOTHIRDS = 2.0 / 3.0;
22   static constexpr double MY_PI = 3.14159265358979323846;           // pi
23   static constexpr double MY_2PI = 6.28318530717958647692;          // 2pi
24   static constexpr double MY_3PI = 9.42477796076937971538;          // 3pi
25   static constexpr double MY_4PI = 12.56637061435917295384;         // 4pi
26   static constexpr double MY_PI2 = 1.57079632679489661923;          // pi/2
27   static constexpr double MY_PI4 = 0.78539816339744830962;          // pi/4
28   static constexpr double MY_PIS = 1.77245385090551602729;          // sqrt(pi)
29   static constexpr double MY_ISPI4 = 1.12837916709551257389;        // 1/sqrt(pi/4)
30   static constexpr double MY_SQRT2 = 1.41421356237309504880;        // sqrt(2)
31   static constexpr double MY_CUBEROOT2 = 1.25992104989487316476;    // 2*(1/3)
32 }    // namespace MathConst
33 
34 }    // namespace LAMMPS_NS
35 
36 #endif
37