|
12 | 12 | #include <integrator_rhs_simplified_sdc.H>
|
13 | 13 | #endif
|
14 | 14 |
|
15 |
| -template <typename IArray1D, typename BurnT, typename DvodeT> |
| 15 | +template <typename BurnT, typename DvodeT> |
16 | 16 | AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
|
17 |
| -void dvjac (IArray1D& pivot, int& IERPJ, BurnT& state, DvodeT& vstate) |
| 17 | +void dvjac (int& IERPJ, BurnT& state, DvodeT& vstate) |
18 | 18 | {
|
19 | 19 | // dvjac is called by dvnlsd to compute and process the matrix
|
20 | 20 | // P = I - h*rl1*J , where J is an approximation to the Jacobian
|
@@ -116,11 +116,11 @@ void dvjac (IArray1D& pivot, int& IERPJ, BurnT& state, DvodeT& vstate)
|
116 | 116 | R0 = 1.0_rt;
|
117 | 117 | }
|
118 | 118 |
|
119 |
| - bool in_jacobian = true; |
| 119 | + const bool in_jacobian = true; |
120 | 120 | for (int j = 1; j <= int_neqs; ++j) {
|
121 |
| - Real yj = vstate.y(j); |
| 121 | + const Real yj = vstate.y(j); |
122 | 122 |
|
123 |
| - Real R = amrex::max(std::sqrt(UROUND) * std::abs(yj), R0 / vstate.ewt(j)); |
| 123 | + const Real R = amrex::max(std::sqrt(UROUND) * std::abs(yj), R0 / vstate.ewt(j)); |
124 | 124 | vstate.y(j) += R;
|
125 | 125 | fac = 1.0_rt / R;
|
126 | 126 |
|
@@ -160,25 +160,24 @@ void dvjac (IArray1D& pivot, int& IERPJ, BurnT& state, DvodeT& vstate)
|
160 | 160 | // Multiply Jacobian by a scalar, add the identity matrix
|
161 | 161 | // (along the diagonal), and do LU decomposition.
|
162 | 162 |
|
163 |
| - Real hrl1 = vstate.H * vstate.RL1; |
164 |
| - Real con = -hrl1; |
| 163 | + const Real hrl1 = vstate.H * vstate.RL1; |
| 164 | + const Real con = -hrl1; |
165 | 165 |
|
166 | 166 | vstate.jac.mul(con);
|
167 | 167 | vstate.jac.add_identity();
|
168 | 168 |
|
169 |
| - int IER; |
| 169 | + int IER{}; |
170 | 170 |
|
171 | 171 | #ifdef NEW_NETWORK_IMPLEMENTATION
|
172 |
| - amrex::ignore_unused(pivot); |
173 | 172 | RHS::dgefa(vstate.jac);
|
174 | 173 | IER = 0;
|
175 | 174 | #else
|
176 | 175 | if (integrator_rp::linalg_do_pivoting == 1) {
|
177 | 176 | constexpr bool allow_pivot{true};
|
178 |
| - dgefa<int_neqs, allow_pivot>(vstate.jac, pivot, IER); |
| 177 | + dgefa<int_neqs, allow_pivot>(vstate.jac, vstate.pivot, IER); |
179 | 178 | } else {
|
180 | 179 | constexpr bool allow_pivot{false};
|
181 |
| - dgefa<int_neqs, allow_pivot>(vstate.jac, pivot, IER); |
| 180 | + dgefa<int_neqs, allow_pivot>(vstate.jac, vstate.pivot, IER); |
182 | 181 | }
|
183 | 182 | #endif
|
184 | 183 |
|
|
0 commit comments