diff options
author | 2020-10-19 10:17:46 +0200 | |
---|---|---|
committer | 2020-10-19 01:17:46 -0700 | |
commit | 1e7de3b536c974327513d17f9aee156d93030825 (patch) | |
tree | fb5885e8fbbbfdd51d5d9efcc53c597a41b2fa1d /Source/Diagnostics/BTDiagnostics.cpp | |
parent | 1f8f4f74adf7d460c593752a83e3574cc5cc0589 (diff) | |
download | WarpX-1e7de3b536c974327513d17f9aee156d93030825.tar.gz WarpX-1e7de3b536c974327513d17f9aee156d93030825.tar.zst WarpX-1e7de3b536c974327513d17f9aee156d93030825.zip |
Replace wherever possible '.reset(new' with '= make_unique' (#1429)
* replace wherever possible .reset(new with = make_unique
* fixed bug
* fixed bug
* revert WarpXOpenPMD.cpp to the original version
* removed another .reset(new
Diffstat (limited to 'Source/Diagnostics/BTDiagnostics.cpp')
-rw-r--r-- | Source/Diagnostics/BTDiagnostics.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Diagnostics/BTDiagnostics.cpp b/Source/Diagnostics/BTDiagnostics.cpp index d57af3ec0..b651874e4 100644 --- a/Source/Diagnostics/BTDiagnostics.cpp +++ b/Source/Diagnostics/BTDiagnostics.cpp @@ -6,9 +6,13 @@ #include "ComputeDiagFunctors/BackTransformFunctor.H" #include "ComputeDiagFunctors/RhoFunctor.H" #include "Utils/CoarsenIO.H" + #include <AMReX_ParallelDescriptor.H> #include <AMReX_PlotFileUtil.H> #include <AMReX_VisMF.H> + +#include <memory> + using namespace amrex::literals; BTDiagnostics::BTDiagnostics (int i, std::string name) @@ -303,8 +307,8 @@ BTDiagnostics::DefineCellCenteredMultiFab(int lev) ba.coarsen(m_crse_ratio); amrex::DistributionMapping dmap = warpx.DistributionMap(lev); int ngrow = 1; - m_cell_centered_data[lev].reset( new amrex::MultiFab(ba, dmap, - m_cellcenter_varnames.size(), ngrow) ); + m_cell_centered_data[lev] = std::make_unique<amrex::MultiFab>(ba, dmap, + m_cellcenter_varnames.size(), ngrow); } |