Skip to content

Commit e396b0c

Browse files
author
Matthew Emmett
committed
controller: Change various ints to size_ts.
1 parent 2765254 commit e396b0c

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

include/pfasst/controller.hpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace pfasst
2626
deque<shared_ptr<ISweeper<time>>> levels;
2727
deque<shared_ptr<ITransfer<time>>> transfer;
2828

29-
int step, iteration, max_iterations;
29+
size_t step, iteration, max_iterations;
3030
time t, dt, tend;
3131

3232
public:
@@ -39,8 +39,7 @@ namespace pfasst
3939
}
4040
}
4141

42-
// XXX
43-
void set_duration(time t0, time tend, time dt, int niters)
42+
void set_duration(time t0, time tend, time dt, size_t niters)
4443
{
4544
this->t = t0;
4645
this->tend = tend;
@@ -183,7 +182,7 @@ namespace pfasst
183182
/**
184183
* Get current time step number.
185184
*/
186-
int get_step()
185+
size_t get_step()
187186
{
188187
return step;
189188
}
@@ -198,7 +197,7 @@ namespace pfasst
198197
return t;
199198
}
200199

201-
void advance_time(int nsteps=1)
200+
void advance_time(size_t nsteps=1)
202201
{
203202
step += nsteps;
204203
t += nsteps*dt;
@@ -209,12 +208,12 @@ namespace pfasst
209208
return tend;
210209
}
211210

212-
int get_iteration()
211+
size_t get_iteration()
213212
{
214213
return iteration;
215214
}
216215

217-
void set_iteration(int iter)
216+
void set_iteration(size_t iter)
218217
{
219218
this->iteration = iter;
220219
}
@@ -224,7 +223,7 @@ namespace pfasst
224223
iteration++;
225224
}
226225

227-
int get_max_iteration()
226+
size_t get_max_iterations()
228227
{
229228
return max_iterations;
230229
}

include/pfasst/mlsdc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace pfasst
6363
initial = this->get_step() == 0; // only evaluate node 0 functions on first step
6464

6565
// iterate by performing v-cycles
66-
for (this->set_iteration(0); this->get_iteration() < this->get_max_iteration(); this->advance_iteration()) {
66+
for (this->set_iteration(0); this->get_iteration() < this->get_max_iterations(); this->advance_iteration()) {
6767
cycle_v(this->finest());
6868
}
6969

include/pfasst/sdc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace pfasst
2525

2626
for (; this->get_time() < this->get_end_time(); this->advance_time()) {
2727
bool initial = this->get_step() == 0;
28-
for (this->set_iteration(0); this->get_iteration() < this->get_max_iteration(); this->advance_iteration()) {
28+
for (this->set_iteration(0); this->get_iteration() < this->get_max_iterations(); this->advance_iteration()) {
2929
bool predict = this->get_iteration() == 0;
3030
if (predict) {
3131
sweeper->predict(initial);

0 commit comments

Comments
 (0)