Skip to content

Refactor timestepping to better integrate paranoid update #5300

@dkytezab

Description

@dkytezab

Wrap up the following code in its own function that depends on the model. This simplifies maintaining the timestepping workaround in OceananigansReactantExt

if model.clock.iteration == 0
update_state!(model, callbacks)
end

Something like

maybe_initialize_state!(model)

function maybe_initialize_state!(model)
    if model.clock.iteration == 0
        update_state!(model)
    end
    return nothing
end

For all three currently supported timesteppers

Metadata

Metadata

Assignees

Labels

reactant ∇all day I dream about MLIR

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions