Skip to content

Commit 3a0db72

Browse files
FIX: minor changes to make precommit happy
Co-authored-by: Amrita Goswami <amrita16thaug646@gmail.com>
1 parent 5c35dda commit 3a0db72

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/simulation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ void Simulation::write_avg_thickness_file()
233233

234234
// This lambda performs bisection search to find the threshold thickness at which a
235235
// relative volume proportion of `thresh` is contained within cells with greater thickness than the threshold thickness
236-
auto bisection_search = [&]( double thresh, double tol, int max_iter ) {
236+
auto bisection_search = [&]( double thresh, double tol, int max_iter )
237+
{
237238
int idx_lo = 0;
238239
int idx_hi = n_cells - 1;
239240

@@ -606,7 +607,6 @@ RunStatus Simulation::steps( int n_steps )
606607

607608
if( run_status == RunStatus::Finished )
608609
{
609-
610610
const auto t_cur = std::chrono::high_resolution_clock::now();
611611
const auto total_time
612612
= std::chrono::duration_cast<std::chrono::milliseconds>( ( t_cur - simulation_state->t_run_start ) );

src/topography.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,9 @@ void Topography::add_lobe( const Lobe & lobe, bool volume_correction, std::optio
503503

504504
Vector2 Topography::find_preliminary_budding_point( const Lobe & lobe, size_t npoints )
505505
{
506-
bool compute_cache = cos_phi_lobe_perimeter == std::nullopt || sin_phi_lobe_perimeter == std::nullopt
507-
|| npoints != cos_phi_lobe_perimeter->size() || npoints != sin_phi_lobe_perimeter->size();
506+
const bool compute_cache = cos_phi_lobe_perimeter == std::nullopt || sin_phi_lobe_perimeter == std::nullopt
507+
|| npoints != cos_phi_lobe_perimeter->size()
508+
|| npoints != sin_phi_lobe_perimeter->size();
508509

509510
if( compute_cache )
510511
{
@@ -516,7 +517,7 @@ Vector2 Topography::find_preliminary_budding_point( const Lobe & lobe, size_t np
516517
// First, we rasterize the perimeter of the ellipse
517518
const auto sin = std::span<double>( sin_phi_lobe_perimeter->begin(), sin_phi_lobe_perimeter->end() );
518519
const auto cos = std::span<double>( cos_phi_lobe_perimeter->begin(), cos_phi_lobe_perimeter->end() );
519-
std::vector<Vector2> perimeter = lobe.rasterize_perimeter( sin, cos );
520+
const std::vector<Vector2> perimeter = lobe.rasterize_perimeter( sin, cos );
520521

521522
// Then, we find the point of minimal elevation amongst the rasterized points on the perimeter
522523
auto min_elevation_point_it = std::min_element(

0 commit comments

Comments
 (0)