Skip to content

Commit

Permalink
Implement clang-tidy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
n01r committed Sep 18, 2024
1 parent d6c3bdf commit ef84fa5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/Diagnostics/Diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Diagnostics::ComputeAndPack ()

if (m_diag_type == DiagTypes::TimeAveraged) {

amrex::Real real_a = 1.0;
const amrex::Real real_a = 1.0;
// call amrex sax operation to do the following
amrex::MultiFab::Saxpy(
m_sum_mf_output[i_buffer][lev], real_a, m_mf_output[i_buffer][lev],
Expand Down
2 changes: 1 addition & 1 deletion Source/Diagnostics/FullDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ FullDiagnostics::Flush ( int i_buffer, bool /* force_flush */ )
if (m_time_average_type == TimeAverageType::Static || m_time_average_type == TimeAverageType::Dynamic) {
// Loop over the output levels and divide by the number of steps in the averaging period
for (int lev = 0; lev < nlev_output; ++lev) {
m_sum_mf_output.at(i_buffer).at(lev).mult(1./m_average_period_steps);
m_sum_mf_output.at(i_buffer).at(lev).mult(1._rt/static_cast<amrex::Real>(m_average_period_steps));
}

m_flush_format->WriteToFile(
Expand Down
4 changes: 1 addition & 3 deletions Source/Diagnostics/MultiDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ MultiDiagnostics::MultiDiagnostics ()
*/
alldiags.resize( ndiags );
for (int i=0; i<ndiags; i++){
if ( diags_types[i] == DiagTypes::Full ){
alldiags[i] = std::make_unique<FullDiagnostics>(i, diags_names[i], diags_types[i]);
} else if ( diags_types[i] == DiagTypes::TimeAveraged ){
if ( diags_types[i] == DiagTypes::Full || diags_types[i] == DiagTypes::TimeAveraged ){
alldiags[i] = std::make_unique<FullDiagnostics>(i, diags_names[i], diags_types[i]);
} else if ( diags_types[i] == DiagTypes::BackTransformed ){
alldiags[i] = std::make_unique<BTDiagnostics>(i, diags_names[i], diags_types[i]);
Expand Down

0 comments on commit ef84fa5

Please sign in to comment.