Skip to content

Commit

Permalink
- add an extra argument to solve_a_butcher_coeffs_unknown! so that e …
Browse files Browse the repository at this point in the history
…can be varied.

- modify solve_a_butcher_coeffs_unknown! in methods_PERK3.jl to match the change
  • Loading branch information
warisa-r committed Oct 13, 2024
1 parent 23a838c commit e7a6ee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ext/TrixiNLsolveExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ end
# non-linear equations that arise from the relation of the stability polynomial to the Butcher tableau.
# For details, see Proposition 3.2, Equation (3.3) from
# Hairer, Wanner: Solving Ordinary Differential Equations 2
function Trixi.solve_a_butcher_coeffs_unknown!(a_unknown, num_stages, monomial_coeffs,
function Trixi.solve_a_butcher_coeffs_unknown!(a_unknown, num_stages, num_stage_evals, monomial_coeffs,
c_s2, c;
verbose, max_iter = 100000) #TODO: Add an argument of num_stage_evals here
verbose, max_iter = 100000)

# Define the objective_function
function objective_function!(c_eq, x)
return PairedExplicitRK3_butcher_tableau_objective_function!(c_eq, x,
num_stages,
num_stages,
num_stage_evals,
monomial_coeffs,
c_s2)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function compute_PairedExplicitRK3_butcher_tableau(num_stages, tspan,
# Solve the nonlinear system of equations from monomial coefficient and
# Butcher array abscissae c to find Butcher matrix A
# This function is extended in TrixiNLsolveExt.jl
a_unknown = solve_a_butcher_coeffs_unknown!(a_unknown, num_stages,
a_unknown = solve_a_butcher_coeffs_unknown!(a_unknown, num_stages, num_stages,
monomial_coeffs, cS2, c;
verbose)
end
Expand Down

0 comments on commit e7a6ee1

Please sign in to comment.