Skip to content

Commit

Permalink
Use unsigned ints in semi-analytic solver
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Harries committed Jan 23, 2017
1 parent 82e3787 commit 8753648
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/semi_analytic_solver.cpp
Expand Up @@ -79,7 +79,7 @@ void RGFlow<Semi_analytic>::solve()
{
check_setup();

const unsigned max_iterations = get_max_iterations();
const int max_iterations = get_max_iterations();
if ((inner_sliders.empty() && outer_sliders.empty())
|| max_iterations == 0)
return;
Expand Down Expand Up @@ -236,7 +236,7 @@ void RGFlow<Semi_analytic>::set_running_precision(Two_scale_running_precision* r
* Returns the number of performed iterations
* @return number of performed iterations
*/
unsigned int RGFlow<Semi_analytic>::number_of_iterations_done() const
int RGFlow<Semi_analytic>::number_of_iterations_done() const
{
return iteration;
}
Expand All @@ -245,7 +245,7 @@ unsigned int RGFlow<Semi_analytic>::number_of_iterations_done() const
* Returns the maximum number of iterations set in the outer
* convergence tester.
*/
unsigned int RGFlow<Semi_analytic>::get_max_iterations() const
int RGFlow<Semi_analytic>::get_max_iterations() const
{
return outer_convergence_tester->max_iterations();
}
Expand Down
6 changes: 3 additions & 3 deletions src/semi_analytic_solver.hpp
Expand Up @@ -70,7 +70,7 @@ class RGFlow<Semi_analytic> {
/// get model at current scale
Model* get_model() const;
/// get number of used iterations
unsigned int number_of_iterations_done() const;
int number_of_iterations_done() const;
/// clear all internal data
void reset();
/// run model at given scale to given scale
Expand Down Expand Up @@ -116,7 +116,7 @@ class RGFlow<Semi_analytic> {

std::vector<std::shared_ptr<Slider> > inner_sliders{}; ///< sliders to be used in the inner iteration
std::vector<std::shared_ptr<Slider> > outer_sliders{}; ///< sliders to be used in the outer iteration
unsigned int iteration{0}; ///< iteration number (starting at 0)
int iteration{0}; ///< iteration number (starting at 0)
Convergence_tester* inner_convergence_tester{nullptr}; ///< the convergence tester for the two-scale iteration
Convergence_tester* outer_convergence_tester{nullptr}; ///< the convergence tester for the main iteration
Initial_guesser* initial_guesser{nullptr}; ///< does initial guess
Expand All @@ -128,7 +128,7 @@ class RGFlow<Semi_analytic> {
void check_setup() const; ///< check the setup
void clear_problems(); ///< clear model problems
void prepare_inner_iteration(RGFlow<Two_scale>& solver) const; ///< set-up inner two-scale iteration
unsigned int get_max_iterations() const; ///< returns max. number of iterations
int get_max_iterations() const; ///< returns max. number of iterations
Model* get_model(double) const; ///< returns model at given scale
void initial_guess(); ///< initial guess
double get_precision(); ///< returns running precision
Expand Down

0 comments on commit 8753648

Please sign in to comment.