Skip to content

Commit

Permalink
correct a constructor + add and delete some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
warisa-r committed Sep 11, 2024
1 parent a98f50e commit f78703f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ end
function compute_PairedExplicitRK2_butcher_tableau(num_stages,
base_path_monomial_coeffs::AbstractString,
bS, cS)

#TODO: If the user has a specific set of monomial coefficients, they must also have already obtained dt_opt
#TODO: where did I get this monomial in unit test....
# c Vector form Butcher Tableau (defines timestep per stage)
c = zeros(num_stages)
for k in 2:num_stages
Expand Down Expand Up @@ -154,11 +151,12 @@ end # struct PairedExplicitRK2
function PairedExplicitRK2(num_stages, base_path_monomial_coeffs::AbstractString,
dt_opt,
bS = 1.0, cS = 0.5)
# If the user has the monomial coefficients, they also must have the optimal time step
a_matrix, c = compute_PairedExplicitRK2_butcher_tableau(num_stages,
base_path_monomial_coeffs,
bS, cS)

return PairedExplicitRK2(num_stages, a_matrix, c, 1 - bS, bS, cS)
return PairedExplicitRK2(num_stages, a_matrix, c, 1 - bS, bS, cS, dt_opt)
end

# Constructor that calculates the coefficients with polynomial optimizer from a
Expand Down

0 comments on commit f78703f

Please sign in to comment.