@@ -80,7 +80,7 @@ class MrLavaLoba
8080 }
8181
8282 // Calculate n_lobes
83- int compute_n_lobes ( int idx_flow )
83+ int compute_n_lobes ( int idx_flow ) const
8484 {
8585 int n_lobes{};
8686 // Number of lobes in the flow is a random number between the min and max values
@@ -115,7 +115,7 @@ class MrLavaLoba
115115 }
116116
117117 // calculates the initial lobe position
118- void compute_initial_lobe_position ( int idx_flow, Lobe & lobe )
118+ void compute_initial_lobe_position ( int idx_flow, Lobe & lobe ) const
119119 {
120120 std::unique_ptr<VentFlag> f{};
121121
@@ -182,15 +182,15 @@ class MrLavaLoba
182182 lobe.semi_axes = { semi_major_axis, semi_minor_axis };
183183 }
184184
185- void compute_descendent_lobe_position ( Lobe & lobe, const Lobe & parent, Vector2 final_budding_point )
185+ void compute_descendent_lobe_position ( Lobe & lobe, const Lobe & parent, const Vector2 & final_budding_point ) const
186186 {
187187 Vector2 direction_to_new_lobe
188188 = ( final_budding_point - parent.center ) / xt::linalg::norm ( final_budding_point - parent.center );
189189 Vector2 new_lobe_center = final_budding_point + input.dist_fact * direction_to_new_lobe * lobe.semi_axes [0 ];
190190 lobe.center = new_lobe_center;
191191 }
192192
193- void perturb_lobe_angle ( Lobe & lobe, double slope )
193+ void perturb_lobe_angle ( Lobe & lobe, double slope ) const
194194 {
195195 const double slope_deg = 180.0 / Math::pi * std::atan ( slope );
196196
@@ -216,7 +216,7 @@ class MrLavaLoba
216216 }
217217
218218 // Select which lobe amongst the existing lobes will be the parent for the new descendent lobe
219- int select_parent_lobe ( int idx_descendant, std::vector<Lobe> & lobes )
219+ int select_parent_lobe ( int idx_descendant, std::vector<Lobe> & lobes ) const
220220 {
221221 Lobe & lobe_descendent = lobes[idx_descendant];
222222
0 commit comments