16 int checkEvery = 1000;
18 for (
int tw = 1; tw <= twc; ++tw) {
20 if (tw % checkEvery == 0) {
21 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
22 BOOST_TEST(th.
time() == tws * tw);
26 if (tw % checkEvery == 0) {
27 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
28 BOOST_TEST(th.
time() == tws * tw);
42 int checkEvery = 1000;
44 for (
int tw = 1; tw <= twc; ++tw) {
46 if (tw % checkEvery == 0) {
47 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
48 BOOST_TEST(th.
time() == tws * tw);
52 if (tw % checkEvery == 0) {
53 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
54 BOOST_TEST(th.
time() == tws * tw);
69 int checkEvery = 1000;
72 for (
int tw = 1; tw <= twc; ++tw) {
82 double t = n1 * tws1 + n2 * tws2;
83 if (tw % checkEvery == 0) {
84 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
85 BOOST_TEST_INFO_SCOPE(
"this time-window size is " << tws);
86 BOOST_TEST(th.
time() == t);
90 if (tw % checkEvery == 0) {
91 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
92 BOOST_TEST_INFO_SCOPE(
"this time-window size is " << tws);
93 BOOST_TEST(th.
time() == t);
111 int checkEvery = 1000;
113 for (
int tw = 1; tw <= twc; ++tw) {
115 for (
int ts = 1;
ts <= tsc; ++
ts) {
117 if (tw % checkEvery == 0) {
118 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
119 BOOST_TEST_INFO_SCOPE(
"time-step " <<
ts <<
"/" << tsc);
120 BOOST_TEST(th.
time() == (tw - 1) * tws +
ts * tss);
124 if (tw % checkEvery == 0) {
125 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
127 BOOST_TEST(th.
time() == tws * tw);
130 if (tw % checkEvery == 0) {
131 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
132 BOOST_TEST(th.
time() == tws * tw);
148 int checkEvery = 1000;
150 for (
int tw = 1; tw <= twc; ++tw) {
151 for (
int ts = 1;
ts <= tsc; ++
ts) {
153 if (
ts % checkEvery == 0) {
154 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
155 BOOST_TEST_INFO_SCOPE(
"time-step " <<
ts <<
"/" << tsc);
156 BOOST_TEST(th.
time() == (tw - 1) * tws +
ts * tss);
160 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
162 BOOST_TEST(th.
time() == tws * tw);
164 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
165 BOOST_TEST(th.
time() == tws * tw);
180 int checkEvery = 1000;
182 for (
int tw = 1; tw <= twc; ++tw) {
183 for (
int ts = 1;
ts <= tsc; ++
ts) {
185 if (
ts % checkEvery == 0) {
186 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
187 BOOST_TEST_INFO_SCOPE(
"time-step " <<
ts <<
"/" << tsc);
188 BOOST_TEST(th.
time() == (tw - 1) * tws +
ts * tss);
192 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
194 BOOST_TEST(th.
time() == tws * tw);
196 BOOST_TEST_INFO_SCOPE(
"time-window " << tw <<
"/" << twc);
197 BOOST_TEST(th.
time() == tws * tw);
213 BOOST_TEST(th.
time() == 1.0);
234 BOOST_TEST(th.
time() == 1.0);
252 BOOST_TEST(th.
time() == 1.0);
270 double tsc = 1'000'000;
272 for (
int ts = 1;
ts <= tsc; ++
ts) {
276 BOOST_TEST(th.
time() == 1.0);
294 double twc = 1'000'000;
296 for (
int tw = 1; tw <= twc; ++tw) {
317 for (
int tw = 1; tw <= twc; ++tw) {
318 for (
int ts = 1;
ts <= tsc; ++
ts) {
336 double tsc = 1'000'000;
338 for (
int ts = 1;
ts <= tsc; ++
ts) {
342 BOOST_TEST(th.
time() == 1.0);
360 double twc = 1'000'000;
363 for (
int tw = 1; tw <= twc; ++tw) {
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
BOOST_AUTO_TEST_CASE(ManyTinyTimesteps)
bool reachedEndOfWindow(double timeWindowSize) const
double time() const
Returns the current time as a double.
double untilWindowEnd(double timeWindowSize) const
Returns the time distance to the possibly truncated end of the current time window.
void completeTimeWindow(double timeWindowSize)
double windowProgress() const
Returns the window progress as a double.
void progressBy(double dt)
Progress the time window by the given amount.