-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathphysics.hpp
More file actions
54 lines (46 loc) · 1.52 KB
/
physics.hpp
File metadata and controls
54 lines (46 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// ***********************************************************************************
// Idefix MHD astrophysical code
// Copyright(C) Geoffroy R. J. Lesur <[email protected]>
// and other code contributors
// Licensed under CeCILL 2.1 License, see COPYING for more information
// ***********************************************************************************
#ifndef PHYSICS_HPP_
#define PHYSICS_HPP_
#include "idefix.hpp"
// Physics type
// The default Physics class
struct DefaultPhysics {
static constexpr bool dust{false};
#if HAVE_ENERGY == 1
static constexpr bool pressure{true};
#else
static constexpr bool pressure{false};
#endif
#ifdef ISOTHERMAL
static constexpr bool isothermal{true};
#else
static constexpr bool isothermal{false};
#endif
static constexpr bool eos = isothermal || pressure; // whether we have a eos
#if MHD == YES
static constexpr bool mhd{true};
static constexpr int nvar{1+2*COMPONENTS + (pressure?1:0)};
#else
static constexpr bool mhd{false};
static constexpr int nvar{1+COMPONENTS + (pressure?1:0)};
#endif
// prefix
static constexpr std::string_view prefix = "Hydro";
};
// Some Dust
struct DustPhysics {
static constexpr bool dust{true};
static constexpr bool pressure{false};
static constexpr bool isothermal{false};
static constexpr bool eos{false};
static constexpr bool mhd{false};
static constexpr int nvar{1+COMPONENTS};
// prefix
static constexpr std::string_view prefix = "Dust";
};
#endif // PHYSICS_HPP_