diff options
author | 2019-03-26 08:23:08 -0700 | |
---|---|---|
committer | 2019-03-26 08:23:08 -0700 | |
commit | 10737921e9f07705d5e4cffe0f66ebc18b0bc7f2 (patch) | |
tree | 0a1017d5765a8d26fc8e6cefe243c91893115808 /Source/Diagnostics/FieldIO.cpp | |
parent | 665e1acc117810c79ce522ce6ff709ac06bc8923 (diff) | |
download | WarpX-10737921e9f07705d5e4cffe0f66ebc18b0bc7f2.tar.gz WarpX-10737921e9f07705d5e4cffe0f66ebc18b0bc7f2.tar.zst WarpX-10737921e9f07705d5e4cffe0f66ebc18b0bc7f2.zip |
Use unique_ptr input
Diffstat (limited to 'Source/Diagnostics/FieldIO.cpp')
-rw-r--r-- | Source/Diagnostics/FieldIO.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Diagnostics/FieldIO.cpp b/Source/Diagnostics/FieldIO.cpp index becc4a4e1..607ec248f 100644 --- a/Source/Diagnostics/FieldIO.cpp +++ b/Source/Diagnostics/FieldIO.cpp @@ -347,7 +347,8 @@ WriteZeroRawField( const MultiFab& F, const DistributionMapping& dm, */ void WriteCoarseScalar( const std::string field_name, - const MultiFab& F_cp, const MultiFab& F_fp, + const std::unique_ptr<MultiFab>& F_cp, + const std::unique_ptr<MultiFab>& F_fp, const DistributionMapping& dm, const std::string& filename, const std::string& level_prefix, @@ -355,14 +356,14 @@ WriteCoarseScalar( const std::string field_name, const int r_ratio, const Real* dx ) { int ng = 0; - if (plot_guards) ng = F_fp.nGrow(); + if (plot_guards) ng = F_fp->nGrow(); if (lev == 0) { // No coarse field for level 0: instead write a MultiFab // filled with 0, with the same number of cells as the _fp field - WriteZeroRawField( F_fp, dm, filename, level_prefix, field_name+"_cp", lev, ng ); + WriteZeroRawField( *F_fp, dm, filename, level_prefix, field_name+"_cp", lev, ng ); } else { - auto F = getInterpolatedScalar( F_cp, F_fp, dm, r_ratio, dx, ng ); + auto F = getInterpolatedScalar( *F_cp, *F_fp, dm, r_ratio, dx, ng ); WriteRawField( *F, dm, filename, level_prefix, field_name+"_cp", lev, plot_guards ); } } |