Skip to content

Commit fe5aba0

Browse files
committed
CHORE: fix typo in OutputQuantity enum
It's not spelled OutputQuantitiy .. duh
1 parent 3e8474b commit fe5aba0

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

flowy/include/asc_file.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class AscFile : public TopographyFile
1212
{
1313
public:
1414
AscFile() = default;
15-
AscFile( const Topography & topography, OutputQuantitiy output )
15+
AscFile( const Topography & topography, OutputQuantity output )
1616
: TopographyFile::TopographyFile( topography, output )
1717
{
1818
}

flowy/include/netcdf_file.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class NetCDFFile : public TopographyFile
2424

2525
StorageDataType data_type = StorageDataType::Short;
2626
NetCDFFile() = default;
27-
NetCDFFile( const Topography & topography, OutputQuantitiy output )
27+
NetCDFFile( const Topography & topography, OutputQuantity output )
2828
: TopographyFile::TopographyFile( topography, output )
2929
{
3030
}

flowy/include/simulation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Simulation
4040
void write_avg_thickness_file();
4141

4242
std::unique_ptr<TopographyFile>
43-
get_file_handle( const Topography & topography, OutputQuantitiy output_quantity ) const;
43+
get_file_handle( const Topography & topography, OutputQuantity output_quantity ) const;
4444

4545
void run();
4646

flowy/include/topography_file.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct TopographyCrop
1919
double y_max;
2020
};
2121

22-
enum class OutputQuantitiy
22+
enum class OutputQuantity
2323
{
2424
Hazard,
2525
Height
@@ -51,14 +51,14 @@ class TopographyFile
5151
TopographyFile() = default;
5252

5353
// Constructor that takes topography
54-
TopographyFile( const Topography & topography, OutputQuantitiy output )
54+
TopographyFile( const Topography & topography, OutputQuantity output )
5555
: x_data( topography.x_data ), y_data( topography.y_data ), no_data_value( topography.no_data_value )
5656
{
57-
if( output == OutputQuantitiy::Height )
57+
if( output == OutputQuantity::Height )
5858
{
5959
data = topography.height_data;
6060
}
61-
else if( output == OutputQuantitiy::Hazard )
61+
else if( output == OutputQuantity::Hazard )
6262
{
6363
data = topography.hazard;
6464
}

src/simulation.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ void Simulation::write_avg_thickness_file()
296296
xt::filter( topography_masked.hazard, topography_thickness.height_data < threshold_thickness ) = 0.0;
297297

298298
// Write the masked thickness and the masked hazard maps
299-
auto file_thick = get_file_handle( topography_masked, OutputQuantitiy::Height );
299+
auto file_thick = get_file_handle( topography_masked, OutputQuantity::Height );
300300
file_thick->save(
301301
input.output_folder / fmt::format( "{}_thickness_masked_{:.2f}", input.run_name, threshold ) );
302302

303303
if( input.save_hazard_data )
304304
{
305-
auto file_hazard = get_file_handle( topography_masked, OutputQuantitiy::Hazard );
305+
auto file_hazard = get_file_handle( topography_masked, OutputQuantity::Hazard );
306306
file_hazard->save(
307307
input.output_folder / fmt::format( "{}_hazard_masked_{:.2f}", input.run_name, threshold ) );
308308
}
@@ -311,7 +311,7 @@ void Simulation::write_avg_thickness_file()
311311
}
312312

313313
std::unique_ptr<TopographyFile>
314-
Simulation::get_file_handle( const Topography & topography, OutputQuantitiy output_quantity ) const
314+
Simulation::get_file_handle( const Topography & topography, OutputQuantity output_quantity ) const
315315
{
316316
std::unique_ptr<TopographyFile> res{};
317317

@@ -501,13 +501,13 @@ void Simulation::run()
501501
fmt::print( "Used RNG seed: {}\n", rng_seed );
502502

503503
// Save initial topography to asc file
504-
auto file_initial = get_file_handle( topography_initial, OutputQuantitiy::Height );
504+
auto file_initial = get_file_handle( topography_initial, OutputQuantity::Height );
505505
file_initial->save( input.output_folder / fmt::format( "{}_DEM", input.run_name ) );
506506

507507
// Save final topography to asc file
508508
if( input.save_final_dem )
509509
{
510-
auto file_final = get_file_handle( topography, OutputQuantitiy::Height );
510+
auto file_final = get_file_handle( topography, OutputQuantity::Height );
511511
file_final->save( input.output_folder / fmt::format( "{}_DEM_final", input.run_name ) );
512512
}
513513

@@ -517,13 +517,13 @@ void Simulation::run()
517517
topography_thickness.height_data -= topography_initial.height_data;
518518
topography_thickness.height_data /= ( 1.0 - input.thickening_parameter );
519519

520-
auto file_thick = get_file_handle( topography_thickness, OutputQuantitiy::Height );
520+
auto file_thick = get_file_handle( topography_thickness, OutputQuantity::Height );
521521
file_thick->save( input.output_folder / fmt::format( "{}_thickness_full", input.run_name ) );
522522

523523
// Save the full hazard map
524524
if( input.save_hazard_data )
525525
{
526-
auto file_hazard = get_file_handle( topography, OutputQuantitiy::Hazard );
526+
auto file_hazard = get_file_handle( topography, OutputQuantity::Hazard );
527527
file_hazard->save( input.output_folder / fmt::format( "{}_hazard_full", input.run_name ) );
528528
}
529529

test/test_file_io.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,41 +58,41 @@ TEST_CASE( "file_io", "[netcdf]" )
5858

5959
auto write_asc_height = [&]( const Flowy::Topography & topography, const fs::path & path )
6060
{
61-
auto file = Flowy::AscFile( topography, Flowy::OutputQuantitiy::Height );
61+
auto file = Flowy::AscFile( topography, Flowy::OutputQuantity::Height );
6262
file.save( path );
6363
};
6464

6565
auto write_asc_hazard = [&]( const Flowy::Topography & topography, const fs::path & path )
6666
{
67-
auto file = Flowy::AscFile( topography, Flowy::OutputQuantitiy::Hazard );
67+
auto file = Flowy::AscFile( topography, Flowy::OutputQuantity::Hazard );
6868
file.save( path );
6969
};
7070

7171
auto read_asc = [&]( const fs::path & path ) { return Flowy::AscFile( path ); };
7272
auto write_netcdf_height = [&]( const Flowy::Topography & topography, const fs::path & path )
7373
{
74-
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantitiy::Height );
74+
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantity::Height );
7575
file.data_type = Flowy::StorageDataType::Double;
7676
file.save( path );
7777
};
7878

7979
auto write_netcdf_height_float = [&]( const Flowy::Topography & topography, const fs::path & path )
8080
{
81-
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantitiy::Height );
81+
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantity::Height );
8282
file.data_type = Flowy::StorageDataType::Float;
8383
file.save( path );
8484
};
8585

8686
auto write_netcdf_height_short = [&]( const Flowy::Topography & topography, const fs::path & path )
8787
{
88-
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantitiy::Height );
88+
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantity::Height );
8989
file.data_type = Flowy::StorageDataType::Short;
9090
file.save( path );
9191
};
9292

9393
auto write_netcdf_hazard = [&]( const Flowy::Topography & topography, const fs::path & path )
9494
{
95-
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantitiy::Hazard );
95+
auto file = Flowy::NetCDFFile( topography, Flowy::OutputQuantity::Hazard );
9696
file.save( path );
9797
};
9898

0 commit comments

Comments
 (0)