chombo-discharge
|
"Iterator" class for going through solvers in an ItoLayout. More...
#include <CD_ItoIterator.H>
Public Types | |
enum class | SpeciesIteration { All , Charged , Negative , Positive , Neutral } |
Enum which specifies which species to iterate through. | |
Public Member Functions | |
ItoIterator ()=delete | |
Disallowed constructor – use the full constructor. | |
ItoIterator (ItoLayout< T > &a_layout, const SpeciesIteration a_mode=SpeciesIteration::All) | |
Full constructor. Allows iteration through all solvers in the layout and restriction to a specific subset of solvers. More... | |
virtual | ~ItoIterator () |
Destructor (does nothing) | |
virtual int | getNumberOfSolvers () |
Get number of solvers. More... | |
virtual int | index () const |
Get current solver number. More... | |
virtual void | reset () |
Reset iterator to the first solver. | |
virtual bool | ok () |
Ok or not. More... | |
virtual void | operator++ () |
Increment. This is different for different iteration modes. | |
virtual RefCountedPtr< T > & | operator() () |
Get current solver. | |
virtual RefCountedPtr< ItoSpecies > & | getSpecies () |
Get current species. | |
Protected Attributes | |
SpeciesIteration | m_mode |
Which species to iterate over. | |
int | m_isolver |
Current solver pointed to by the iterator. | |
int | m_numSolvers |
Number of solvers. | |
bool | m_isDefined |
Defined or not. | |
Vector< RefCountedPtr< T > > | m_solvers |
Solvers. | |
Vector< RefCountedPtr< ItoSpecies > > | m_species |
Solver species. | |
"Iterator" class for going through solvers in an ItoLayout.
This class does not have any fundamental usefulness – it simply cuts down on typing if one wants to iterate over a full set or a subset of solvers in an ItoLayout.
ItoIterator< T >::ItoIterator | ( | ItoLayout< T > & | a_layout, |
const SpeciesIteration | a_mode = SpeciesIteration::All |
||
) |
Full constructor. Allows iteration through all solvers in the layout and restriction to a specific subset of solvers.
[in,out] | a_layout | The layout to iterate through |
[in] | a_iterationMode | Iteration mode, e.g. all solvers, only charged species etc. |
|
virtual |
Get number of solvers.
|
virtual |
Get current solver number.
|
virtual |
Ok or not.