Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Dec 31, 2023
1 parent 49c7765 commit c2726ea
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Source/Diagnostics/BTDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ BTDiagnostics::PrepareFieldDataForOutput ()
// Call all the cell-center functors in m_cell_center_functors.
// Each of them computes cell-centered data for a field and
// stores it in cell-centered MultiFab, m_cell_centered_data[lev].
m_cell_center_functors[lev][icomp]->operator()(*m_cell_centered_data[lev], icomp_dst);
m_cell_center_functors[lev][icomp]->operator()(*m_cell_centered_data[lev], icomp_dst, 0);
icomp_dst += m_cell_center_functors[lev][icomp]->nComp();
}
// Check that the proper number of user-requested components are cell-centered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public:
*/
void PrepareFunctorData ( int i_buffer, bool z_slice_in_domain,
amrex::Real current_z_boost,
amrex::Box buffer_box, int k_index_zlab,
amrex::Box const& buffer_box, int k_index_zlab,
int snapshot_full ) override;
/** Allocate and initialize member variables and arrays required to back-transform
* field-data from boosted-frame to lab-frame.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ BackTransformFunctor::BackTransformFunctor (amrex::MultiFab const * mf_src, int
}

void
BackTransformFunctor::operator ()(amrex::MultiFab& mf_dst, int /*dcomp*/, const int i_buffer) const
BackTransformFunctor::operator ()(amrex::MultiFab& mf_dst, int /*dcomp*/, int i_buffer) const
{
// Perform back-transformation only if z slice is within the domain stored as 0/1
// in m_perform_backtransform[i_buffer]
Expand Down Expand Up @@ -155,8 +155,8 @@ BackTransformFunctor::operator ()(amrex::MultiFab& mf_dst, int /*dcomp*/, const
void
BackTransformFunctor::PrepareFunctorData (int i_buffer,
bool z_slice_in_domain, amrex::Real current_z_boost,
amrex::Box buffer_box, const int k_index_zlab,
const int snapshot_full)
amrex::Box const& buffer_box, int k_index_zlab,
int snapshot_full)
{
m_buffer_box[i_buffer] = buffer_box;
m_current_z_boost[i_buffer] = current_z_boost;
Expand Down
6 changes: 3 additions & 3 deletions Source/Diagnostics/ComputeDiagFunctors/ComputeDiagFunctor.H
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public:
* to the output diagnostic MultiFab, mf_dst.
* \param[in] i_buffer index of a back-transformed snapshot
*/
virtual void operator() (amrex::MultiFab& mf_dst, int dcomp, int i_buffer = 0) const = 0;
virtual void operator() (amrex::MultiFab& mf_dst, int dcomp, int i_buffer) const = 0;
/** Number of component from the input multifab to write to the output
* multifab */
[[nodiscard]] int nComp () const { return m_ncomp; }
Expand All @@ -57,8 +57,8 @@ public:
*/
virtual void PrepareFunctorData ( int i_buffer, bool z_slice_in_domain,
amrex::Real current_z_boost,
amrex::Box buffer_box, const int k_index_zlab,
const int snapshot_full) {
amrex::Box const& buffer_box, int k_index_zlab,
int snapshot_full) {
amrex::ignore_unused(i_buffer,
z_slice_in_domain,
current_z_boost, buffer_box,
Expand Down
12 changes: 6 additions & 6 deletions Source/Diagnostics/ComputeDiagFunctors/RecordingPlaneFunctor.H
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class
RecordingPlaneFunctor final : public ComputeDiagFunctor
{
public:
RecordingPlaneFunctor (const std::array<const amrex::MultiFab* const, 6> arr_mf_src, amrex::Real zlocation,
const int lev, amrex::IntVect crse_ratio, const int ncomp = 1);
virtual void operator () (amrex::MultiFab & mf_dst, const int dcomp, const int i_buffer) const override;
void PrepareFunctorData (int i_station, bool slice_in_domain, amrex::Real zlocation, amrex::Box buffer_box,
int k_index, const int buffer_full) override;
std::unique_ptr<amrex::MultiFab> AllocateSlice(amrex::Vector<int>& slice_to_full_ba_map, int slice_k) const;
RecordingPlaneFunctor (std::array<const amrex::MultiFab* const, 6> const& arr_mf_src, amrex::Real zlocation,
int lev, amrex::IntVect const& crse_ratio, int ncomp = 1);
void operator () (amrex::MultiFab & mf_dst, int dcomp, int i_buffer) const override;
void PrepareFunctorData (int i_station, bool slice_in_domain, amrex::Real zlocation, amrex::Box const& buffer_box,
int k_index, int buffer_full) override;
std::unique_ptr<amrex::MultiFab> AllocateSlice (amrex::Vector<int>& slice_to_full_ba_map, int slice_k) const;

private:
std::array<const amrex::MultiFab * const, 6> m_arr_mf_src;
Expand Down
12 changes: 6 additions & 6 deletions Source/Diagnostics/ComputeDiagFunctors/RecordingPlaneFunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ amrex::Real interp_to_slice (int i, int j,

}

RecordingPlaneFunctor::RecordingPlaneFunctor(const std::array<const amrex::MultiFab* const, 6> arr_mf_src,
amrex::Real zlocation, const int lev,
amrex::IntVect crse_ratio, const int ncomp)
RecordingPlaneFunctor::RecordingPlaneFunctor (std::array<const amrex::MultiFab* const, 6> const& arr_mf_src,
amrex::Real zlocation, int lev,
amrex::IntVect const& crse_ratio, int ncomp)
: ComputeDiagFunctor(ncomp, crse_ratio), m_arr_mf_src(arr_mf_src), m_lev(lev), m_z_location(zlocation)
{
}

void
RecordingPlaneFunctor::operator() (amrex::MultiFab& mf_dst, const int dcomp, const int i_buffer) const
RecordingPlaneFunctor::operator() (amrex::MultiFab& mf_dst, int dcomp, int /*i_buffer*/) const
{
if (! m_slice_in_domain) { return; }

Expand Down Expand Up @@ -125,8 +125,8 @@ RecordingPlaneFunctor::operator() (amrex::MultiFab& mf_dst, const int dcomp, con

void
RecordingPlaneFunctor::PrepareFunctorData (int i_station, bool slice_in_domain, amrex::Real zlocation,
amrex::Box buffer_box, int k_index,
const int buffer_full)
amrex::Box const& buffer_box, int k_index,
int buffer_full)
{
amrex::ignore_unused(i_station, slice_in_domain, zlocation, buffer_full);
m_buffer_box = buffer_box;
Expand Down

0 comments on commit c2726ea

Please sign in to comment.