Skip to content

Commit

Permalink
remove sdc_newton_use_analytic_jac (#2573)
Browse files Browse the repository at this point in the history
We will rely on integrator.jacobian now
  • Loading branch information
zingale authored Sep 22, 2023
1 parent f7a5cc2 commit 716dd64
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Docs/source/sdc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ The options that affect the nonlinear solve are:
* 3 : use VODE for the first iteration and then Newton for the
subsequent iterations.

In all cases, the type of Jacobian (analytic or numerical) is determined by
``integrator.jacobian``.

* ``sdc_solver_tol_dens`` : the relative error on the density in solving the nonlinear system.

* ``sdc_solver_tol_spec`` : the relative error on the partial densities, :math:`(\rho X_k)`
Expand All @@ -57,9 +60,6 @@ The options that affect the nonlinear solve are:

* ``sdc_solve_for_rhoe`` : whether we solve the system in terms of :math:`(\rho e)` or :math:`(\rho E)`.

* ``sdc_newton_use_analytic_jac`` : whether we use the analytic Jacobian when doing Newton iterations for
the reaction part of the system or compute it numerically.




Expand Down
2 changes: 1 addition & 1 deletion Exec/science/Detonation/inputs-det-x.sdc.test
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ castro.sdc_solver_tol_dens = 1.e-5
castro.sdc_solver_tol_spec = 1.e-5
castro.sdc_solver_tol_ener = 1.e-5
castro.sdc_solver_atol = 1.e-10
castro.sdc_newton_use_analytic_jac = 1

castro.ppm_type = 0

Expand Down Expand Up @@ -102,3 +101,4 @@ amr.refine.tempgrad.field_name = Temp
# Microphysics

integrator.call_eos_in_rhs = 1
integrator.jacobian = 1
2 changes: 0 additions & 2 deletions Exec/science/Detonation/nse_runs/inputs.template.true_sdc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ castro.sdc_solver_tol_spec=1.e-8
castro.sdc_solver_tol_ener=1.e-8
castro.sdc_solver_atol = 1.e-8
castro.sdc_solver=2
castro.sdc_newton_use_analytic_jac = 1



# TIME STEP CONTROL
Expand Down
3 changes: 1 addition & 2 deletions Exec/science/flame/inputs.1d.sdc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ castro.sdc_solver_tol_spec = 1.e-10
castro.sdc_solver_tol_ener = 1.e-6
castro.sdc_solver_atol = 1.e-10
castro.sdc_solver = 1
castro.sdc_newton_use_analytic_jac = 1
castro.sdc_solver_relax_factor = 1

castro.use_reconstructed_gamma1 = 1
Expand Down Expand Up @@ -113,4 +112,4 @@ integrator.atol_spec = 1.e-8

network.small_x = 1.e-10

integrator.jacobian = 2
integrator.jacobian = 1
4 changes: 0 additions & 4 deletions Source/driver/_cpp_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,6 @@ sdc_solver_relax_factor Real 1.0
# do we solve for (rho e) or (rho E) in the SDC nonlinear solve?
sdc_solve_for_rhoe int 1

# do we use the analytic or numerical Jacobian for the Newton-Raphson solver?
# for the VODE solver, we use integrator.jacobian instead
sdc_newton_use_analytic_jac int 1

# for 2-d axisymmetry, do we include the geometry source terms from Bernand-Champmartin?
use_axisymmetric_geom_source int 1

Expand Down
2 changes: 1 addition & 1 deletion Source/sdc/sdc_react_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ single_zone_jac(GpuArray<Real, NUM_STATE> const& state,
// Jac has the derivatives with respect to the native
// network variables, X, e. Note: the e derivative

if (sdc_newton_use_analytic_jac == 0) {
if (integrator_rp::jacobian == 2) {
// note the numerical Jacobian will be returned in terms of X
// and will already have the corrections to convert into d/de
// instead of d/dT
Expand Down

0 comments on commit 716dd64

Please sign in to comment.