Skip to content

Commit

Permalink
fixup: allow unused if no particle output enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Aug 29, 2023
1 parent 8ec10b2 commit 3885202
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/CabanaPD_Particles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,9 @@ class Particles<DeviceType, PMB, Dimension>
return slice_y();
}

void output( const int output_step, const double output_time,
const bool use_reference = true )
void output( [[maybe_unused]] const int output_step,
[[maybe_unused]] const double output_time,
[[maybe_unused]] const bool use_reference = true )
{
#ifdef Cabana_ENABLE_HDF5
Cabana::Experimental::HDF5ParticleOutput::writeTimeStep(
Expand All @@ -397,8 +398,7 @@ class Particles<DeviceType, PMB, Dimension>
n_local, getPosition( use_reference ), slice_W(), slice_f(),
slice_u(), slice_v(), slice_phi() );
#else
log( std::cout, "No particle output enabled for step ", output_step,
" (", output_time, ")" );
log( std::cout, "No particle output enabled." );
#endif
#endif
}
Expand Down Expand Up @@ -513,8 +513,9 @@ class Particles<DeviceType, LPS, Dimension>
_aosoa_m.resize( new_local + new_ghost );
}

void output( const int output_step, const double output_time,
const bool use_reference = true )
void output( [[maybe_unused]] const int output_step,
[[maybe_unused]] const double output_time,
[[maybe_unused]] const bool use_reference = true )
{
#ifdef Cabana_ENABLE_HDF5
Cabana::Experimental::HDF5ParticleOutput::writeTimeStep(
Expand All @@ -532,8 +533,7 @@ class Particles<DeviceType, LPS, Dimension>
base_type::slice_v(), base_type::slice_phi(), slice_m(),
slice_theta() );
#else
log( std::cout, "No particle output enabled for ", output_step, "(",
output_time, ")" );
log( std::cout, "No particle output enabled." );
#endif
#endif
}
Expand Down

0 comments on commit 3885202

Please sign in to comment.