Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronicity of outputs #46

Open
alextbradley opened this issue Oct 20, 2021 · 0 comments
Open

Synchronicity of outputs #46

alextbradley opened this issue Oct 20, 2021 · 0 comments

Comments

@alextbradley
Copy link
Collaborator

alextbradley commented Oct 20, 2021

Currently, we do velocity solve, then update thickness, then update clock, then test for outputting, which gives a slightly asychronous result: the clock and thickness is one timestep further along than the velocity. We should output after the velocity has been updated, e.g.

    for i = (simulation.clock.n_iter+1):timestepping_params.n_iter_total 
        update_state!(model)                                               #do the velocity solve   
        check_and_output_solution(simulation)                   #output solutions if appropriate  
        check_and_output_checkpoints(simulation)             #create checkpoints if appropriate  
        if timestepping_params.step_thickness  
            update_thickness!(simulation)                               #update the thickness   
        end  
        update_clock!(simulation)                                          #update the clock  
    end

(Does this index of loop catch the final timestep?)

alextbradley added a commit that referenced this issue Oct 20, 2021
The output at time t = 0 is truly the solution at that time, but noticed that current formulation has outputs at t = t* - dt, where t* is the intended time of output (see #46) -- this is because the clock and thickness are updated *before* the outputting is performed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant