ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
checkpointing.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
11
12#include <deal.II/base/parameter_acceptor.h>
13
14#include <string>
15
16namespace ryujin
17{
30 template <int dim, typename Number = double>
31 class Checkpointing final : public dealii::ParameterAcceptor,
32 public Interface::Task<Number>
33 {
34 public:
39 const std::string &subsection = "/Checkpointing");
40
45
51 void start(TaskContext<Number> &context) override;
52
56 void execute(TaskContext<Number> &context) override;
57
61 void finalize(TaskContext<Number> &context) override;
62
64
65 private:
70
71 bool resume_;
72 bool resume_at_time_zero_;
73
75
79
80 Trigger<Number> trigger_;
81
83
85
89
93 void write_checkpoint(const TaskContext<Number> &context);
94
96 };
97} // namespace ryujin
void finalize(TaskContext< Number > &context) override
Checkpointing(Interface::Simulation< dim, Number > &simulation, const std::string &subsection="/Checkpointing")
void start(TaskContext< Number > &context) override
void execute(TaskContext< Number > &context) override