Skip to content

Commit edb2484

Browse files
ENH: remove superfluous Lobe::rasterize_perimeter
We did not use the old overload anymore, so there is no reason to keep it. Plus, it makes writing the python bindings a tiny bit more awkward. Co-authored-by: Amrita Goswami <amrita16thaug646@gmail.com>
1 parent fa105ee commit edb2484

3 files changed

Lines changed: 0 additions & 23 deletions

File tree

flowy/include/lobe.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,6 @@ class Lobe
187187
return coord + center;
188188
}
189189

190-
inline std::vector<Vector2> rasterize_perimeter( int n_raster_points ) const
191-
{
192-
VectorX phi_list = xt::linspace<double>( 0.0, 2.0 * Math::pi, n_raster_points, false );
193-
auto res = std::vector<Vector2>( n_raster_points );
194-
195-
for( int idx_phi = 0; idx_phi < n_raster_points; idx_phi++ )
196-
{
197-
res[idx_phi] = point_at_angle( phi_list[idx_phi] );
198-
}
199-
200-
return res;
201-
}
202-
203190
inline std::vector<Vector2> rasterize_perimeter( std::span<double> sin_phi, std::span<double> cos_phi ) const
204191
{
205192
const int n_raster_points = sin_phi.size();

src/topography.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,8 @@ Vector2 Topography::find_preliminary_budding_point( const Lobe & lobe, size_t np
516516
// First, we rasterize the perimeter of the ellipse
517517
const auto sin = std::span<double>( sin_phi_lobe_perimeter->begin(), sin_phi_lobe_perimeter->end() );
518518
const auto cos = std::span<double>( cos_phi_lobe_perimeter->begin(), cos_phi_lobe_perimeter->end() );
519-
520519
std::vector<Vector2> perimeter = lobe.rasterize_perimeter( sin, cos );
521520

522-
// std::vector<Vector2> perimeter = lobe.rasterize_perimeter( npoints );
523-
524521
// Then, we find the point of minimal elevation amongst the rasterized points on the perimeter
525522
auto min_elevation_point_it = std::min_element(
526523
perimeter.begin(), perimeter.end(), [&]( const Vector2 & p1, const Vector2 & p2 )

test/test_topography.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,6 @@ TEST_CASE( "find_preliminary_budding_point", "[budding_point]" )
140140
my_lobe.semi_axes = { 0.8, 0.8 };
141141
my_lobe.set_azimuthal_angle( 0.0 );
142142

143-
auto perimeter = my_lobe.rasterize_perimeter( 32 );
144-
for( auto & p : perimeter )
145-
{
146-
INFO( fmt::format( "p = {}\n", fmt::streamed( p ) ) );
147-
INFO( fmt::format( "height = {}\n\n", topography.height_and_slope( p ).first ) );
148-
}
149-
150143
Flowy::Vector2 budding_point = topography.find_preliminary_budding_point( my_lobe, 32 );
151144

152145
INFO( fmt::format( "budding_point = {}", budding_point ) );

0 commit comments

Comments
 (0)