-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathempty_rhs.H
More file actions
110 lines (71 loc) · 1.86 KB
/
Copy pathempty_rhs.H
File metadata and controls
110 lines (71 loc) · 1.86 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef actual_rhs_H
#define actual_rhs_H
#include <AMReX_REAL.H>
#include <AMReX_Array.H>
#include <extern_parameters.H>
#include <actual_network.H>
#include <burn_type.H>
#include <jacobian_utilities.H>
#include <extern_parameters.H>
using namespace amrex;
using namespace ArrayUtil;
using namespace network_rp;
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void rhs_specie(const burn_t& state,
Array1D<Real, 1, neqs>& ydot,
const Array1D<Real, 0, NumSpec-1>& X,
Real const /*z*/) {
using namespace Rates;
Real T = state.T;
<ydot>
}
AMREX_GPU_HOST_DEVICE AMREX_INLINE
Real rhs_eint(const burn_t& state,
const Array1D<Real, 0, NumSpec-1>& X,
Real const z) {
using namespace Rates;
Real T = state.T;
<edot>
return <edot_return>;
}
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void actual_rhs (burn_t& state, Array1D<Real, 1, neqs>& ydot)
{
Real z = redshift;
Array1D<Real, 0, NumSpec-1> X;
for (int i = 0; i < NumSpec; ++i) {
X(i) = state.xn[i];
}
// YDOTS
rhs_specie(state, ydot, X, z);
// Edot
Real edot = rhs_eint(state, X, z);
// Append the energy equation (this is erg/g/s)
ydot(net_ienuc) = edot;
}
template<class MatrixType>
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void jac_nuc(const burn_t& state,
MatrixType& jac,
const Array1D<Real, 0, NumSpec-1>& X,
Real const z)
{
Real T = state.T;
<jac>
}
template<class MatrixType>
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void actual_jac(const burn_t& state, MatrixType& jac)
{
Real z = redshift;
Array1D<Real, 0, NumSpec-1> X;
for (int i = 0; i < NumSpec; ++i) {
X(i) = state.xn[i];
}
// Species Jacobian elements with respect to other species
jac_nuc(state, jac, X, z);
}
AMREX_INLINE
void actual_rhs_init () {
}
#endif