Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems

A type used as a collection of phases. More...

#include <PhaseList.hpp>

Public Types

using value_type = Phase
 The type of the value stored in a PhaseList (for STL compatibility reasons).
 

Public Member Functions

 PhaseList ()
 Construct a default PhaseList object.
 
 PhaseList (std::initializer_list< Phase > phases)
 Construct an PhaseList object with given phases.
 
 PhaseList (const Vec< Phase > &phases)
 Construct an PhaseList object with given phases.
 
auto append (const Phase &phase) -> void
 Append a new phase to the list of phase.
 
auto data () const -> const Vec< Phase > &
 Return the internal collection of Phase objects.
 
auto empty () const -> bool
 Return true if there are no phases in the collection.
 
auto size () const -> Index
 Return the number of phases in the collection.
 
auto species () const -> SpeciesList
 Return the species that compose the phases in the collection.
 
auto operator[] (Index i) const -> const Phase &
 Return the Phase object with given index.
 
auto operator[] (Index i) -> Phase &
 Return the Phase object with given index.
 
auto find (const String &name) const -> Index
 Return the index of the phase with given unique name or the number of phases if not found.
 
auto findWithName (const String &name) const -> Index
 Return the index of the phase with given unique name or the number of phases if not found.
 
auto findWithSpecies (Index index) const -> Index
 Return the index of the phase containing the species with given index or number of phases if not found.
 
auto findWithSpecies (const String &name) const -> Index
 Return the index of the phase with given unique species name or the number of phases if not found.
 
auto findWithAggregateState (AggregateState option) const -> Index
 Return the index of the first phase with given aggregate state of species or the number of phases if not found.
 
auto findWithStateOfMatter (StateOfMatter option) const -> Index
 Return the index of the first phase with given state of matter or the number of phases if not found.
 
auto index (const String &name) const -> Index
 Return the index of the phase with given unique name or throw a runtime error if not found.
 
auto indexWithName (const String &name) const -> Index
 Return the index of the phase with given unique name or throw a runtime error if not found.
 
auto indexWithSpecies (Index index) const -> Index
 Return the index of the phase containing the species with given index or throw a runtime error if not found.
 
auto indexWithSpecies (const String &name) const -> Index
 Return the index of the phase with given unique species name or throw a runtime error if not found.
 
auto indexWithAggregateState (AggregateState option) const -> Index
 Return the index of the first phase with given aggregate state of species or throw a runtime error if not found.
 
auto indexWithStateOfMatter (StateOfMatter option) const -> Index
 Return the index of the first phase with given state of matter or throw a runtime error if not found.
 
auto get (const String &name) const -> const Phase &
 Return the phase with a given name.
 
auto getWithName (const String &name) const -> const Phase &
 Return the phase with a given name.
 
auto withNames (const StringList &names) const -> PhaseList
 Return all phases with given names.
 
auto withStateOfMatter (StateOfMatter option) const -> PhaseList
 Return all phases with given state of matter.
 
auto withAggregateState (AggregateState option) const -> PhaseList
 Return all phases whose species have the given aggregate state.
 
auto numSpeciesUntilPhase (Index iphase) const -> Index
 Return the number of species over all phases up to the one with given index.
 
auto indicesPhasesArePure () const -> Indices
 Return the indices of the phases with a single species.
 
auto indicesPhasesAreSolution () const -> Indices
 Return the indices of the phases with more than one species.
 
auto indicesSpeciesInPurePhases () const -> Indices
 Return the indices of the species in phases with a single species.
 
auto indicesSpeciesInSolutionPhases () const -> Indices
 Return the indices of the species in phases with more than one species.
 
auto indicesSpeciesInPhases (const Indices &iphases) const -> Indices
 Return the indices of the species in the given phases.
 
 operator Vec< Phase > & ()
 Convert this PhaseList object into its Vec<Phase>.
 
 operator Vec< Phase >const & () const
 Convert this PhaseList object into its Vec<Phase>.
 
template<typename InputIterator >
 PhaseList (InputIterator begin, InputIterator end)
 Construct an PhaseList object with given begin and end iterators.
 
auto begin () const
 Return begin const iterator of this PhaseList instance (for STL compatibility reasons).
 
auto begin ()
 Return begin iterator of this PhaseList instance (for STL compatibility reasons).
 
auto end () const
 Return end const iterator of this PhaseList instance (for STL compatibility reasons).
 
auto end ()
 Return end iterator of this PhaseList instance (for STL compatibility reasons).
 
auto push_back (const Phase &species) -> void
 Append a new Phase at the back of the container (for STL compatibility reasons).
 
template<typename Iterator , typename InputIterator >
auto insert (Iterator pos, InputIterator begin, InputIterator end) -> void
 Insert a container of Phase objects into this PhaseList instance (for STL compatibility reasons).
 

Detailed Description

A type used as a collection of phases.


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