Commit c17dd182 authored by wenqing's avatar wenqing
Browse files

[IterationNumberBasedTimeStepping] clean

parent 32137548
......@@ -70,7 +70,6 @@ std::tuple<bool, double> IterationNumberBasedTimeStepping::next(
}
else
{
++_n_rejected_steps;
double dt = getNextTimeStepSize();
// In case it is the first time be rejected, re-computed dt again with
// current dt
......
......@@ -102,9 +102,6 @@ public:
bool canReduceTimestepSize() const override;
/// Return the number of the total repeated steps.
int getNumberOfRepeatedSteps() const { return _n_rejected_steps; }
private:
/// Calculate the next time step size.
double getNextTimeStepSize() const;
......@@ -127,8 +124,6 @@ private:
const int _max_iter;
/// The number of nonlinear iterations.
int _iter_times = 0;
/// The number of total rejected steps.
int _n_rejected_steps = 0;
bool _previous_time_step_accepted = true;
/// True, if the current time step is accepted.
......
......@@ -131,7 +131,6 @@ TEST(NumLib, TimeSteppingIterationNumberBased2)
std::vector<double> vec_t = timeStepping(alg, nr_iterations, {});
ASSERT_EQ(expected_vec_t.size(), vec_t.size());
ASSERT_EQ(0u, alg.getNumberOfRepeatedSteps());
ASSERT_ARRAY_NEAR(expected_vec_t, vec_t, expected_vec_t.size(), std::numeric_limits<double>::epsilon());
}
......@@ -152,7 +151,6 @@ TEST(NumLib, TimeSteppingIterationNumberBased2FixedOutputTimes)
timeStepping(alg, nr_iterations, fixed_output_times);
EXPECT_EQ(expected_vec_t.size(), vec_t.size());
ASSERT_EQ(0u, alg.getNumberOfRepeatedSteps());
ASSERT_ARRAY_NEAR(expected_vec_t, vec_t, expected_vec_t.size(),
std::numeric_limits<double>::epsilon());
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment