16 class ParticleSpecies;
146 inline void setTimeStamp(
double t,
bool reduceInsteadOfOverwrite =
true) {
150 inline void setTimeStamp(
double tMin,
double tMax,
bool reduceInsteadOfOverwrite =
true) {
152 if (reduceInsteadOfOverwrite) {
165 inline void setTimeStepSize(
double dtMin,
double dtMax,
bool reduceInsteadOfOverwrite =
true) {
167 if (reduceInsteadOfOverwrite) {
183 inline void setVelocity(
double vMin,
double vMax,
double rMin,
double rMax) {
189 logDebug(
"setVelocity()", vMin <<
"x" << vMax);
250 int globalRerunPreviousGridSweep = 0;
281 .
allReduce(&localRerunPreviousGridSweep, &globalRerunPreviousGridSweep, 1, MPI_INT, MPI_SUM, [&]() ->
void {
#define logDebug(methodName, logMacroMessageStream)
Represent one type (species) of particles.
void clearRerunPreviousGridSweepFlag()
Set the rerun flag back to false.
ParticleSpecies()
Initialise all data with the data corresponding to a clear, i.e.
double getMaxVelocity() const
bool _rerunPreviousGridSweep
void startTimeStep()
This routine is automatically called for each and every species by the GlobalState object.
void clearTimeStampAndTimeStepSize()
Clear all the time step sizes and time stamps.
void setTimeStepSize(double dtMin, double dtMax, bool reduceInsteadOfOverwrite=true)
static tarch::logging::Log _log
double getMinSearchRadius() const
static tarch::multicore::BooleanSemaphore _semaphore
void setRerunPreviousGridSweep()
Tell Peano to run through mesh with same action sets again.
double getMaxSearchRadius() const
void setTimeStamp(double tMin, double tMax, bool reduceInsteadOfOverwrite=true)
void finishTimeStep()
This routine is automatically called for each and every species by the GlobalState object.
double getMinTimeStepSize() const
double getMinTimeStamp() const
double getMaxTimeStepSize() const
double getMinVelocity() const
void setTimeStamp(double t, bool reduceInsteadOfOverwrite=true)
Set both min and max time stamp.
bool rerunPreviousGridSweep() const
Query species whether the last grid sweep/update sweep has to be repeated.
void setTimeStepSize(double dt, bool reduceInsteadOfOverwrite=true)
double getMaxTimeStamp() const
void setVelocity(double vMin, double vMax, double rMin, double rMax)
Set the maximum velocity that has been observed in a cell.
ParticleSpecies(const ParticleSpecies ©)=delete
static Rank & getInstance()
This operation returns the singleton instance.
void allReduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, std::function< void()> waitor=[]() -> void {})
Create a lock around a boolean semaphore region.
static ServiceRepository & getInstance()
virtual void receiveDanglingMessages() override
Answer to MPI Messages.
This file is part of the ExaParty project.