WarpX
|
#include <FieldReduction.H>
Public Member Functions | |
FieldReduction (const std::string &rd_name) | |
void | ComputeDiags (int step) final |
void | BackwardCompatibility () |
template<typename ReduceOp > | |
void | ComputeFieldReduction () |
![]() | |
ReducedDiags (const std::string &rd_name) | |
virtual | ~ReducedDiags ()=default |
ReducedDiags (const ReducedDiags &)=default | |
ReducedDiags & | operator= (const ReducedDiags &)=default |
ReducedDiags (ReducedDiags &&)=default | |
ReducedDiags & | operator= (ReducedDiags &&)=default |
virtual void | InitData () |
virtual void | LoadBalance () |
virtual void | WriteToFile (int step) const |
void | BackwardCompatibility () const |
Private Attributes | |
std::unique_ptr< amrex::Parser > | m_parser |
int | m_reduction_type |
Static Private Attributes | |
static constexpr int | m_nvars = 12 |
Additional Inherited Members | |
![]() | |
std::string | m_path = "./diags/reducedfiles/" |
output path (default) More... | |
std::string | m_extension = "txt" |
output extension (default) More... | |
std::string | m_rd_name |
diags name More... | |
utils::parser::IntervalsParser | m_intervals |
output intervals More... | |
bool | m_write_header = false |
check if header should be written More... | |
std::string | m_sep = " " |
separator in the output file More... | |
int | m_precision = 14 |
precision for data in the output file More... | |
std::vector< amrex::Real > | m_data |
output data More... | |
This class contains a function that computes an arbitrary reduction of the fields. The function used in the reduction is defined by an input file parser expression and the reduction operation can be either Maximum, Minimum, or Integral (Sum multiplied by cell volume).
FieldReduction::FieldReduction | ( | const std::string & | rd_name | ) |
constructor
[in] | rd_name | reduced diags names |
void FieldReduction::BackwardCompatibility | ( | ) |
This function queries deprecated input parameters and aborts the run if one of them is specified.
|
finalvirtual |
This function is called at every time step, and if necessary calls the templated function ComputeFieldReduction(), which does the actual reduction computation.
[in] | step | the timestep |
Implements ReducedDiags.
|
inline |
This function does the actual reduction computation. The fields are first interpolated on the cell centers and the reduction operation is then performed using amrex::ReduceOps.
ReduceOp | the type of reduction that is performed. This is typically amrex::ReduceOpMax, amrex::ReduceOpMin or amrex::ReduceOpSum. |
|
staticconstexprprivate |
Parser to read expression to be reduced from the input file. 12 elements are x, y, z, Ex, Ey, Ez, Bx, By, Bz, jx, jy, jz
|
private |
|
private |