ARTEMIS
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
RawBFieldReduction Class Reference

#include <RawBFieldReduction.H>

Inheritance diagram for RawBFieldReduction:
ReducedDiags

Public Member Functions

 RawBFieldReduction (std::string rd_name)
 
virtual void ComputeDiags (int step) override final
 
template<typename ReduceOp >
void ComputeRawBFieldReduction ()
 
- 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::Parserm_parser
 
int m_reduction_type
 
int m_integral_type
 
int m_surface_normal [3] ={0,0,0}
 
std::vector< amrex::Real > m_scaling_factor ={1.0,1.0,1.0}
 

Static Private Attributes

static constexpr int m_nvars = 3
 

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...
 

Constructor & Destructor Documentation

◆ RawBFieldReduction()

RawBFieldReduction::RawBFieldReduction ( std::string  rd_name)

constructor

Parameters
[in]rd_namereduced diags names

Member Function Documentation

◆ ComputeDiags()

void RawBFieldReduction::ComputeDiags ( int  step)
finaloverridevirtual

This function is called at every time step, and if necessary calls the templated function ComputeRawBFieldReduction(), which does the actual reduction computation.

Parameters
[in]stepthe timestep

Implements ReducedDiags.

◆ ComputeRawBFieldReduction()

template<typename ReduceOp >
void RawBFieldReduction::ComputeRawBFieldReduction ( )
inline

This function does the actual reduction computation. The reduction operation is performed on the raw fields using amrex::ReduceOps.

Template Parameters
ReduceOpthe type of reduction that is performed. This is typically amrex::ReduceOpMax, amrex::ReduceOpMin or amrex::ReduceOpSum.

Member Data Documentation

◆ m_integral_type

int RawBFieldReduction::m_integral_type
private

◆ m_nvars

constexpr int RawBFieldReduction::m_nvars = 3
staticconstexprprivate

Parser to read expression to be reduced from the input file. 3 elements are x, y, z

◆ m_parser

std::unique_ptr<amrex::Parser> RawBFieldReduction::m_parser
private

◆ m_reduction_type

int RawBFieldReduction::m_reduction_type
private

◆ m_scaling_factor

std::vector<amrex::Real> RawBFieldReduction::m_scaling_factor ={1.0,1.0,1.0}
private

◆ m_surface_normal

int RawBFieldReduction::m_surface_normal[3] ={0,0,0}
private

The documentation for this class was generated from the following files: