diff options
author | 2019-10-31 11:22:49 -0700 | |
---|---|---|
committer | 2019-10-31 11:22:49 -0700 | |
commit | 6a6ac6d4604b846959b56cd07fdf7935dc9c48d1 (patch) | |
tree | fd5db73702fb3d93c17fec52049475b018687772 /Source/Utils/WarpXUtil.cpp | |
parent | eb47baaba039722df73a08f15c38c12535179bc4 (diff) | |
parent | 7cf08f6e336457b4a48874985712087faa984b64 (diff) | |
download | WarpX-6a6ac6d4604b846959b56cd07fdf7935dc9c48d1.tar.gz WarpX-6a6ac6d4604b846959b56cd07fdf7935dc9c48d1.tar.zst WarpX-6a6ac6d4604b846959b56cd07fdf7935dc9c48d1.zip |
merging with changes in the dev. Specifically changing boosted to back-transformed
Diffstat (limited to 'Source/Utils/WarpXUtil.cpp')
-rw-r--r-- | Source/Utils/WarpXUtil.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp index 4b11eb69d..8764a09c6 100644 --- a/Source/Utils/WarpXUtil.cpp +++ b/Source/Utils/WarpXUtil.cpp @@ -1,10 +1,11 @@ -#include <cmath> - #include <WarpXUtil.H> #include <WarpXConst.H> #include <AMReX_ParmParse.H> #include <WarpX.H> +#include <cmath> +#include <fstream> + using namespace amrex; void ReadBoostedFrameParameters(Real& gamma_boost, Real& beta_boost, @@ -152,3 +153,14 @@ void NullifyMF(amrex::MultiFab& mf, int lev, amrex::Real zmin, amrex::Real zmax) } } } + +namespace WarpXUtilIO{ + bool WriteBinaryDataOnFile(std::string filename, const amrex::Vector<char>& data) + { + std::ofstream of{filename, std::ios::binary}; + of.write(data.data(), data.size()); + of.close(); + return of.good(); + } +} + |