aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXUtil.H
blob: 195e309cfdf0264a20f4d458cfa06f382d2da240 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef WARPX_UTILS_H_
#define WARPX_UTILS_H_

#include <AMReX_REAL.H>
#include <AMReX_Vector.H>
#include <AMReX_MultiFab.H>

#include <string>

void ReadBoostedFrameParameters(amrex::Real& gamma_boost, amrex::Real& beta_boost,
                                amrex::Vector<int>& boost_direction);

void ConvertLabParamsToBoost();

void NullifyMF(amrex::MultiFab& mf, int lev, amrex::Real zmin,
               amrex::Real zmax);

namespace WarpXUtilIO{
    /**
     * A helper function to write binary data on disk.
     * @param[in] filename where to write
     * @param[in] data Vector containing binary data to write on disk
     * return true if it succeeds, false otherwise
     */
    bool WriteBinaryDataOnFile(std::string filename, const amrex::Vector<char>& data);
}

#endif //WARPX_UTILS_H_