OISEAU
A modern DGTD framework
Loading...
Searching...
No Matches
integrator.hpp
1
// Copyright (C) 2026 Tiago V. L. Amorim (@tiagovla)
2
//
3
// This file is part of oiseau (https://github.com/tiagovla/oiseau)
4
//
5
// SPDX-License-Identifier: GPL-3.0-or-later
6
7
#pragma once
8
9
#include <concepts>
10
11
namespace
oiseau::time {
12
13
template
<
typename
State>
14
concept
AddScaledState
=
requires
(
const
State& base,
const
State& increment,
double
scale) {
15
{ add_scaled(base, increment, scale) } -> std::same_as<State>;
16
};
17
18
template
<
typename
State>
19
concept
ScaleAddInPlaceState
=
20
requires
(State& target,
const
State& source,
double
target_scale,
double
source_scale) {
21
{ scale_add_in_place(target, target_scale, source, source_scale) } -> std::same_as<void>;
22
};
23
24
template
<
typename
Integrator,
typename
System,
typename
State>
25
concept
TimeIntegrator
=
26
requires
(Integrator& integrator, System& system, State& state,
double
time,
double
time_step) {
27
{ integrator.step(system, state, time, time_step) } -> std::same_as<void>;
28
};
29
30
}
// namespace oiseau::time
oiseau::time::AddScaledState
Definition
integrator.hpp:14
oiseau::time::ScaleAddInPlaceState
Definition
integrator.hpp:19
oiseau::time::TimeIntegrator
Definition
integrator.hpp:25
src
oiseau
time
integrator.hpp
Generated by
1.15.0