|
#include <ThermalParticle.h>
Public Member Functions | |
Thermal () | |
Basic Particle constructor, creates a particle at (0,0,0) with radius, mass and inertia equal to 1. More... | |
Thermal (const Thermal &p) | |
Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorphism. More... | |
~Thermal () override=default | |
Particle destructor, needs to be implemented and checked if it removes tangential spring information. More... | |
Thermal * | copy () const override |
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism. More... | |
void | write (std::ostream &os) const override |
std::string | getName () const override |
void | read (std::istream &is) override |
Mdouble | getTemperature () const |
void | setTemperature (Mdouble temperature) |
void | addTemperature (Mdouble temperature) |
void | setTemperatureDependentDensity (const std::function< double(double)> &temperatureDependentDensity) |
const std::function< double(double)> & | getTemperatureDependentDensity () const |
const std::function< double(double)> & | getTimeDependentTemperature () const |
void | setTimeDependentTemperature (const std::function< double(double)> &timeDependentTemperature) |
void | actionsAfterTimeStep () override |
bool | isSphericalParticle () const override |
Protected Attributes | |
Mdouble | temperature_ |
Private Attributes | |
std::function< double(double temperature)> | timeDependentTemperature_ |
Basic Particle constructor, creates a particle at (0,0,0) with radius, mass and inertia equal to 1.
default constructor
References Thermal< Particle >::temperature_.
Referenced by Thermal< Particle >::copy().
Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorphism.
Constructor that copies most of the properties of the given particle. Please note that not everything is copied, for example the position in the HGrid is not determined yet by the end of this constructor. It also does not copy the interactions and the pointer to the handler that handles this particle. Use with care.
[in,out] | p | Reference to the Thermal this one should become a copy of. |
References Thermal< Particle >::temperature_, and Thermal< Particle >::timeDependentTemperature_.
Particle destructor, needs to be implemented and checked if it removes tangential spring information.
Destructor. It asks the ParticleHandler to check if this was the smallest or largest particle and adjust itself accordingly.
References logger, and Thermal< Particle >::temperature_.
Referenced by ThermalInteraction< NormalForceInteraction >::computeNormalForce().
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.
Copy method. Uses copy constructor to create a copy on the heap. Useful for polymorphism.
References Thermal< Particle >::Thermal().
References getName().
const std::function<double(double)>& Thermal< Particle >::getTemperatureDependentDensity | ( | ) | const |
|
inline |
References Thermal< Particle >::timeDependentTemperature_.
Particle read function. Has an std::istream as argument, from which it extracts the radius_, invMass_ and invInertia_, respectively. From these the mass_ and inertia_ are deduced. An additional set of properties is read through the call to the parent's method BaseParticle::read().
[in,out] | is | input stream with particle properties. |
References logger, and Thermal< Particle >::temperature_.
void Thermal< Particle >::setTemperatureDependentDensity | ( | const std::function< double(double)> & | temperatureDependentDensity | ) |
void Thermal< Particle >::setTimeDependentTemperature | ( | const std::function< double(double)> & | timeDependentTemperature | ) |
Thermal print method, which accepts an os std::ostream as input. It prints human readable Thermal information to the std::ostream.
[in,out] | os | stream to which the info is written |
References Thermal< Particle >::temperature_.
|
private |
Change this function to let the temperature be time-dependent.
Referenced by Thermal< Particle >::getTimeDependentTemperature(), and Thermal< Particle >::Thermal().