@@ -83,7 +83,7 @@ class Metropolis : public MoveAlgorithm
8383 : MoveAlgorithm(passes, checkpoint), Alpha_(Alpha), K_(K), Lambda_(Lambda)
8484 {
8585#ifndef NDEBUG
86- std::cout << __PRETTY_FUNCTION__ << " called." << std::endl ;
86+ std::cout << __PRETTY_FUNCTION__ << " called.\n " ;
8787#endif
8888 }
8989
@@ -152,8 +152,8 @@ class Metropolis : public MoveAlgorithm
152152 mpfr_clears (r1, r2, a1, nullptr );
153153
154154#ifndef NDEBUG
155- std::cout << " TotalMoves() = " << total_moves << std::endl ;
156- std::cout << " A1 is " << result << std::endl ;
155+ std::cout << " TotalMoves() = " << total_moves << " \n " ;
156+ std::cout << " A1 is " << result << " \n " ;
157157#endif
158158
159159 return result;
@@ -201,7 +201,7 @@ class Metropolis : public MoveAlgorithm
201201// A (4,4) move changes nothing with respect to the action,
202202// and e^0==1
203203#ifndef NDEBUG
204- std::cout << " A2 is 1" << std::endl ;
204+ std::cout << " A2 is 1\n " ;
205205#endif
206206 return static_cast <double >(1 );
207207 }
@@ -235,7 +235,7 @@ class Metropolis : public MoveAlgorithm
235235 mpfr_clears (r1, a2, nullptr );
236236
237237#ifndef NDEBUG
238- std::cout << " A2 is " << result << std::endl ;
238+ std::cout << " A2 is " << result << " \n " ;
239239#endif
240240
241241 return result;
@@ -263,9 +263,9 @@ class Metropolis : public MoveAlgorithm
263263 const auto trial = static_cast <double >(trial_value);
264264
265265#ifndef NDEBUG
266- std::cout << __PRETTY_FUNCTION__ << " called." << std::endl ;
267- std::cout << " trial_value = " << trial_value << std::endl ;
268- std::cout << " trial = " << trial << std::endl ;
266+ std::cout << __PRETTY_FUNCTION__ << " called.\n " ;
267+ std::cout << " trial_value = " << trial_value << " \n " ;
268+ std::cout << " trial = " << trial << " \n " ;
269269#endif
270270
271271 if (trial <= a1 * a2) {
@@ -280,15 +280,15 @@ class Metropolis : public MoveAlgorithm
280280 }
281281
282282#ifndef NDEBUG
283- std::cout << __PRETTY_FUNCTION__ << " called." << std::endl ;
284- std::cout << " Attempting move." << std::endl ;
285- std::cout << " Move type = " << to_integral (move) << std::endl ;
286- std::cout << " Trial = " << trial << std::endl ;
287- std::cout << " A1 = " << a1 << std::endl ;
288- std::cout << " A2 = " << a2 << std::endl ;
289- std::cout << " A1*A2 = " << a1 * a2 << std::endl ;
283+ std::cout << __PRETTY_FUNCTION__ << " called.\n " ;
284+ std::cout << " Attempting move.\n " ;
285+ std::cout << " Move type = " << to_integral (move) << " \n " ;
286+ std::cout << " Trial = " << trial << " \n " ;
287+ std::cout << " A1 = " << a1 << " \n " ;
288+ std::cout << " A2 = " << a2 << " \n " ;
289+ std::cout << " A1*A2 = " << a1 * a2 << " \n " ;
290290 std::cout << ((trial <= a1 * a2) ? " Move accepted." : " Move rejected." )
291- << std::endl ;
291+ << " \n " ;
292292 print_run ();
293293#endif
294294 } // attempt_move()
@@ -308,7 +308,7 @@ class Metropolis : public MoveAlgorithm
308308 auto operator ()(T&& universe) -> decltype(universe)
309309 {
310310#ifndef NDEBUG
311- std::cout << __PRETTY_FUNCTION__ << " called." << std::endl ;
311+ std::cout << __PRETTY_FUNCTION__ << " called.\n " ;
312312#endif
313313 std::cout << " Starting Metropolis-Hastings algorithm ...\n " ;
314314 // Populate member data
@@ -332,11 +332,11 @@ class Metropolis : public MoveAlgorithm
332332 }
333333 catch (std::logic_error& LogicError)
334334 {
335- std::cerr << LogicError.what () << std::endl ;
336- std::cerr << " Metropolis initialization failed ... Exiting." << std::endl ;
335+ std::cerr << LogicError.what () << " \n " ;
336+ std::cerr << " Metropolis initialization failed ... Exiting.\n " ;
337337 }
338338
339- std::cout << " Making random moves ..." << std::endl ;
339+ std::cout << " Making random moves ...\n " ;
340340 // Loop through passes_
341341 for (std::intmax_t pass_number = 1 ; pass_number <= passes_; ++pass_number) {
342342 auto total_simplices_this_pass = CurrentTotalSimplices ();
@@ -347,7 +347,7 @@ class Metropolis : public MoveAlgorithm
347347 // Pick a move to attempt
348348 auto move_choice = generate_random_signed (0 , 3 );
349349#ifndef NDEBUG
350- std::cout << " Move choice = " << move_choice << std::endl ;
350+ std::cout << " Move choice = " << move_choice << " \n " ;
351351#endif
352352
353353 // Convert std::intmax_t move_choice to move_type enum
@@ -357,15 +357,15 @@ class Metropolis : public MoveAlgorithm
357357
358358 // Do stuff on checkpoint_
359359 if ((pass_number % checkpoint_) == 0 ) {
360- std::cout << " Pass " << pass_number << std::endl ;
360+ std::cout << " Pass " << pass_number << " \n " ;
361361 // write results to a file
362362 write_file (universe_, topology_type::SPHERICAL, 3 ,
363363 universe_.geometry ->number_of_cells (),
364364 universe_.geometry ->max_timevalue ().get ());
365365 }
366366 } // End loop through passes_
367367 // output results
368- std::cout << " Run results: " << std::endl ;
368+ std::cout << " Run results: \n " ;
369369 print_run ();
370370 return universe_;
371371 }
0 commit comments