Skip to content

Commit

Permalink
Rework Schwarz time advancement
Browse files Browse the repository at this point in the history
This is to avoid accumulation errors and in preparation
for adaptive time steppping in multidomain simulations.

The asssumption is that Schwarz stepping will always
be at a fixed time step and that adaptive time stepping
will happen only in subdomain subcycling.
  • Loading branch information
lxmota committed Feb 5, 2025
1 parent a6b5a5b commit 2843235
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/evolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,13 @@ end

function advance_time(sim::MultiDomainSimulation)
sim.schwarz_controller.prev_time = sim.schwarz_controller.time
next_time = round(sim.schwarz_controller.time + sim.schwarz_controller.time_step, digits=12)
stop = sim.schwarz_controller.stop + 1
final_time = sim.schwarz_controller.final_time
initial_time = sim.schwarz_controller.initial_time
num_stops = sim.schwarz_controller.num_stops
next_time = (final_time - initial_time) * Float64(stop) / Float64(num_stops - 1) + initial_time
sim.schwarz_controller.time = next_time
sim.schwarz_controller.stop += 1
sim.schwarz_controller.stop = stop
end

function regress_time(sim::SingleDomainSimulation)
Expand Down

0 comments on commit 2843235

Please sign in to comment.