|
ARTEMIS
|
#include <FieldReduction.H>
Public Member Functions | |
| FieldReduction (std::string rd_name) | |
| virtual void | ComputeDiags (int step) override final |
| template<typename ReduceOp > | |
| void | ComputeFieldReduction () |
Public Member Functions inherited from ReducedDiags | |
| ReducedDiags (std::string rd_name) | |
| virtual | ~ReducedDiags ()=default |
| virtual void | InitData () |
| virtual void | LoadBalance () |
| virtual void | WriteToFile (int step) const |
| void | BackwardCompatibility () |
Private Attributes | |
| std::unique_ptr< amrex::Parser > | m_parser |
| int | m_reduction_type |
Static Private Attributes | |
| static constexpr int | m_nvars = 9 |
Additional Inherited Members | |
Public Attributes inherited from ReducedDiags | |
| 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... | |
| int | m_IsNotRestart = 1 |
| check if it is a restart run More... | |
| std::string | m_sep = " " |
| separator 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 | ( | std::string | rd_name | ) |
constructor
| [in] | rd_name | reduced diags names |
|
finaloverridevirtual |
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. 9 elements are x, y, z, Ex, Ey, Ez, Bx, By, Bz
|
private |
|
private |