27 #ifndef SPECIESHANDLER_H
28 #define SPECIESHANDLER_H
65 unsigned int getMixedId(
const unsigned int id1,
const unsigned int id2)
const;
67 template<
typename U>
typename U::MixedSpeciesType*
getMixedObject(
const U* S,
const U* T);
83 virtual void write(std::ostream& os)
const;
Container to store all ParticleSpecies.
BaseSpecies is the class from which all other species are derived.
unsigned int getMixedId(const unsigned int id1, const unsigned int id2) const
Gets the Id of the behaviour between two given species.
const std::vector< BaseSpecies * > & getMixedObjects() const
Returns a pointer to the vector of all mixed objects.
SpeciesHandler()
Default constructor, it creates an empty SpeciesHandler.
SpeciesHandler operator=(const SpeciesHandler &rhs)
Assignment operator that copies all species and the pointer to the DPMBase from the given SpeciesHand...
virtual void write(std::ostream &os) const
Write all the species and mixed species to an output stream.
~SpeciesHandler()
Destructor, it destructs the SpeciesHandler and all ParticleSpecies it contains.
virtual void addObject(ParticleSpecies *const S)
Adds a new ParticleSpecies to the SpeciesHandler.
void removeObject(unsigned const int id)
Remove the ParticleSpecies with given id.
ParticleSpecies * readOldObject(std::istream &is)
Reads ParticleSpecies into the SpeciesHandler from old-style restart data.
void readObject(std::istream &is)
Reads Species data into the SpeciesHandler from restart file.
std::vector< BaseSpecies * > mixedObjects_
The list of pointers to the mixed species.
Container to store the pointers to all objects that one creates in a simulation.
U::MixedSpeciesType * getMixedObject(const U *S, const U *T)
std::string getName() const
Returns the name of the handler, namely the string "SpeciesHandler".
bool useAngularDOFs()
Check if angular DOF have to be used.