WarpX
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
utils::parser::BTDIntervalsParser Class Reference

This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the form i:j:k, as defined in the SliceParser class. This class contains a vector of SliceParsers. The supported function set differs from the IntervalsParser. More...

#include <IntervalsParser.H>

Public Member Functions

 BTDIntervalsParser ()=default
 Default constructor of the BTDIntervalsParser class. More...
 
 BTDIntervalsParser (const std::vector< std::string > &instr_vec)
 Constructor of the BTDIntervalsParser class. More...
 
int NumSnapshots () const
 Return the total number of unique labframe snapshots. More...
 
int GetBTDIteration (int i_buffer) const
 Return the iteration number stored at index i_buffer. More...
 
int GetFinalIteration () const
 Return the final BTD iteration. More...
 
bool isActivated () const
 A method that returns true if any of the slices contained by the IntervalsParser has a strictly positive period. More...
 

Private Attributes

std::vector< intm_btd_iterations
 
std::vector< SliceParserm_slices
 
std::vector< intm_slice_starting_i_buffer
 
bool m_activated = false
 

Static Private Attributes

static constexpr char m_separator = ','
 

Detailed Description

This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the form i:j:k, as defined in the SliceParser class. This class contains a vector of SliceParsers. The supported function set differs from the IntervalsParser.

Constructor & Destructor Documentation

◆ BTDIntervalsParser() [1/2]

utils::parser::BTDIntervalsParser::BTDIntervalsParser ( )
default

Default constructor of the BTDIntervalsParser class.

◆ BTDIntervalsParser() [2/2]

utils::parser::BTDIntervalsParser::BTDIntervalsParser ( const std::vector< std::string > &  instr_vec)

Constructor of the BTDIntervalsParser class.

Parameters
[in]instr_vecan input vector string, which when concatenated is of the form "x,y,z,...". This will call the constructor of SliceParser using x, y and z as input arguments.

Member Function Documentation

◆ GetBTDIteration()

int utils::parser::BTDIntervalsParser::GetBTDIteration ( int  i_buffer) const

Return the iteration number stored at index i_buffer.

Parameters
i_bufferbuffer or iteration index, between 0 and NumSnapshots

◆ GetFinalIteration()

int utils::parser::BTDIntervalsParser::GetFinalIteration ( ) const

Return the final BTD iteration.

◆ isActivated()

bool utils::parser::BTDIntervalsParser::isActivated ( ) const

A method that returns true if any of the slices contained by the IntervalsParser has a strictly positive period.

◆ NumSnapshots()

int utils::parser::BTDIntervalsParser::NumSnapshots ( ) const

Return the total number of unique labframe snapshots.

Member Data Documentation

◆ m_activated

bool utils::parser::BTDIntervalsParser::m_activated = false
private

◆ m_btd_iterations

std::vector<int> utils::parser::BTDIntervalsParser::m_btd_iterations
private

◆ m_separator

constexpr char utils::parser::BTDIntervalsParser::m_separator = ','
staticconstexprprivate

◆ m_slice_starting_i_buffer

std::vector<int> utils::parser::BTDIntervalsParser::m_slice_starting_i_buffer
private

◆ m_slices

std::vector<SliceParser> utils::parser::BTDIntervalsParser::m_slices
private

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