MarmotConstants.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------
2  * _
3  * _ __ ___ __ _ _ __ _ __ ___ ___ | |_
4  * | '_ ` _ \ / _` | '__| '_ ` _ \ / _ \| __|
5  * | | | | | | (_| | | | | | | | | (_) | |_
6  * |_| |_| |_|\__,_|_| |_| |_| |_|\___/ \__|
7  *
8  * Unit of Strength of Materials and Structural Analysis
9  * University of Innsbruck,
10  * 2020 - today
11  *
12  * festigkeitslehre@uibk.ac.at
13  *
14  * Matthias Neuner matthias.neuner@uibk.ac.at
15  * Magdalena Schreter magdalena.schreter@uibk.ac.at
16  *
17  * This file is part of the MAteRialMOdellingToolbox (marmot).
18  *
19  * This library is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU Lesser General Public
21  * License as published by the Free Software Foundation; either
22  * version 2.1 of the License, or (at your option) any later version.
23  *
24  * The full text of the license can be found in the file LICENSE.md at
25  * the top level directory of marmot.
26  * ---------------------------------------------------------------------
27  */
28 
29 #pragma once
30 #include <cmath>
31 
32 namespace Marmot {
33  namespace Constants {
34  constexpr double Pi = 3.141592653589793238463;
35  constexpr double numZeroPos = 1e-16;
36  inline double cubicRootEps()
37  {
38  return std::pow( std::numeric_limits< double >::epsilon(), 1. / 3 );
39  }
40  inline double squareRootEps()
41  {
42  return std::pow( std::numeric_limits< double >::epsilon(), 0.5 );
43  }
44 
45  const inline double SquareRootEps = squareRootEps();
46  const inline double CubicRootEps = cubicRootEps();
47  constexpr double sqrt3_8 = 0.61237243569579452454932101867647;
48  constexpr double sqrt2_3 = 0.8164965809277260327324280249019;
49  constexpr double sqrt3_2 = 1.2247448713915890490986420373529;
50  constexpr double sqrt2 = 1.4142135623730950488016887242097;
51  constexpr double sqrt3 = 1.7320508075688772935274463415059;
52  constexpr double sqrt6 = 2.4494897427831780981972840747059;
53  } // namespace Constants
54 } // namespace Marmot
Marmot::Constants::sqrt2_3
constexpr double sqrt2_3
Definition: MarmotConstants.h:48
Marmot::Constants::SquareRootEps
const double SquareRootEps
Definition: MarmotConstants.h:45
Marmot::Constants::sqrt6
constexpr double sqrt6
Definition: MarmotConstants.h:52
Marmot::Constants::sqrt2
constexpr double sqrt2
Definition: MarmotConstants.h:50
Marmot::Constants::sqrt3_2
constexpr double sqrt3_2
Definition: MarmotConstants.h:49
Marmot::Constants::CubicRootEps
const double CubicRootEps
Definition: MarmotConstants.h:46
Marmot::Constants::sqrt3_8
constexpr double sqrt3_8
Definition: MarmotConstants.h:47
Marmot::Constants::squareRootEps
double squareRootEps()
Definition: MarmotConstants.h:40
Marmot
This file includes functions needed for calculations with stress and strain tensors written in voigt ...
Definition: MarmotTesting.h:30
Marmot::Constants::numZeroPos
constexpr double numZeroPos
Definition: MarmotConstants.h:35
Marmot::Constants::sqrt3
constexpr double sqrt3
Definition: MarmotConstants.h:51
Marmot::Constants::cubicRootEps
double cubicRootEps()
Definition: MarmotConstants.h:36
Marmot::Constants::Pi
constexpr double Pi
Definition: MarmotConstants.h:34