diff options
author | 2020-10-19 10:17:46 +0200 | |
---|---|---|
committer | 2020-10-19 01:17:46 -0700 | |
commit | 1e7de3b536c974327513d17f9aee156d93030825 (patch) | |
tree | fb5885e8fbbbfdd51d5d9efcc53c597a41b2fa1d /Source/FieldSolver/SpectralSolver/SpectralSolverRZ.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/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp index 38851ef50..581538d6a 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp @@ -45,12 +45,12 @@ SpectralSolverRZ::SpectralSolverRZ (amrex::BoxArray const & realspace_ba, // PML is not supported. if (v_galilean[2] == 0) { // v_galilean is 0: use standard PSATD algorithm - algorithm = std::unique_ptr<PsatdAlgorithmRZ>( - new PsatdAlgorithmRZ(k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, dt)); + algorithm = std::make_unique<PsatdAlgorithmRZ>( + k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, dt); } else { // Otherwise: use the Galilean algorithm - algorithm = std::unique_ptr<GalileanPsatdAlgorithmRZ>( - new GalileanPsatdAlgorithmRZ(k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, v_galilean, dt)); + algorithm = std::make_unique<GalileanPsatdAlgorithmRZ>( + k_space, dm, n_rz_azimuthal_modes, norder_z, nodal, v_galilean, dt); } // - Initialize arrays for fields in spectral space + FFT plans |