Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 16 additions & 25 deletions kratos/includes/global_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,40 @@
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Pooyan Dadvand
// Riccardo Rossi
//
//

#pragma once

// System includes
#include <numbers>

// External includes

// Project includes

namespace Kratos::Globals
{
constexpr double Pi = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651L;
///@name Kratos Globals
///@{

// Using the STL to constants variables
constexpr double Pi = std::numbers::pi;
constexpr double pi = std::numbers::pi; // NOTE: Consistent lowercase naming is often preferred
constexpr double e = std::numbers::e;
constexpr double sqrt2 = std::numbers::sqrt2;
constexpr double sqrt3 = std::numbers::sqrt3;
constexpr double log2e = std::numbers::log2e;
constexpr double log10e = std::numbers::log10e;
constexpr double phi = std::numbers::phi;

static constexpr int MaxAllowedThreads = 128; //we assume that no more than MaxAllowedThreads is used in SMP

///@name Kratos Globals
///@{
///@}
///@name Enums
///@{

Expand All @@ -40,7 +50,6 @@ namespace Kratos::Globals
Current = 1
};


/**
* @brief Enum for location of data
*/
Expand All @@ -56,22 +65,4 @@ namespace Kratos::Globals
};

///@}
///@}
///@name Kratos Globals
///@{

///@}
///@name Type Definitions
///@{

///@}
///@name Enum's
///@{

///@}
///@name Functions
///@{

///@}

} // namespace Kratos::Globals
Loading