Peano
Loading...
Searching...
No Matches
DependencyChecks.h File Reference
#include "swift2/kernels/ParticleUpdatePredicates.h"
#include <string>
#include <type_traits>
#include "../dependencychecks/DependencyChecks.cpph"
Include dependency graph for DependencyChecks.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  swift2
 This file is part of the SWIFT 2 project.
 
namespace  Dependency
 checks
 
namespace  swift2::dependencychecks
 
namespace  swift2::dependencychecks::internal
 

Typedefs

template<typename ParticleContainer >
using swift2::dependencychecks::PCParticle
 
template<typename ParticleContainer >
using swift2::dependencychecks::PCAlgorithmStepEnum
 
template<typename ParticleContainer >
using swift2::dependencychecks::PCInitStepEnum
 
template<typename ParticleContainer >
using swift2::dependencychecks::PCSweepStageEnum
 
template<typename Particle >
using swift2::dependencychecks::PAlgorithmStepEnum
 
template<typename Particle >
using swift2::dependencychecks::PInitStepEnum
 
template<typename Particle >
using swift2::dependencychecks::PSweepStageEnum
 

Enumerations

enum class  swift2::dependencychecks::Invariant {
  swift2::dependencychecks::TouchFirstUsage_MaskOutAfterwards_AllPreviousStepsUpdateAtLeastOnce , swift2::dependencychecks::TouchFirstUsage_MaskOutAfterwards_AllPreviousStepsUpdateAtLeastOnce_SweepMayRerun , swift2::dependencychecks::TouchAtMostOnce_MaskOutOtherwise_AllPreviousStepsUpdateAtLeastOnce , swift2::dependencychecks::TouchAtMostOnce_MaskOutOtherwise_AllPreviousStepsUpdateAtLeastOnce_SweepMayRerun ,
  swift2::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce , swift2::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_FutureStagesMayUpdate , swift2::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_MayOverwritePreviousCellUpdatesFromSameSweep , swift2::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_MayOverwritePreviousCellUpdatesFromSameSweep_FutureStagesMayUpdate
}
 Different invariants that have to hold for the code. More...
 

Functions

std::string swift2::dependencychecks::toString (Invariant policy)
 
bool swift2::dependencychecks::internal::isValid (Invariant policy, bool workOnParticle, bool particleIsLocal, int numberOfUpdates, int numberOfMaskOuts)
 Is current state that's to be updated valid.
 
bool swift2::dependencychecks::internal::previousStepsAllHaveToAccessAtLeastOnce (Invariant policy)
 Do all previous steps have to alter state at least once.
 
int swift2::dependencychecks::internal::firstFutureStepThatHasToBeCleared (Invariant policy, int numberOfSteps)
 Which future steps should be checked.
 
template<typename Particle >
static std::string swift2::dependencychecks::internal::outputParticle (const Particle *particle, PAlgorithmStepEnum< Particle > algorithmStep, PSweepStageEnum< Particle > sweepStageMarkerEnum, const int errors)
 This function is meant to be called on a particle on which dependency issues in the main algorithm steps have been detected.
 
template<typename Particle >
static std::string swift2::dependencychecks::internal::outputParticle (const Particle *particle, PInitStepEnum< Particle > algorithmStep, PSweepStageEnum< Particle > sweepStageMarkerEnum, const int errors)
 
int swift2::dependencychecks::internal::checkPastStages (Invariant policy, bool isLocal, const int currentStep, const int currentStage, const int nsteps, const int nstages, const int *sweepStateProgression)
 Check that all previous steps and stages.
 
int swift2::dependencychecks::internal::checkFutureStages (Invariant policy, const int currentStep, const int currentStage, const int nsteps, const int nstages, const int *sweepStateProgression)
 Check that all steps and stages after the current one have not been done yet.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::markAlgorithmStep (const ParticleContainer &particles, const peano4::datamanagement::VertexMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::swift2::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Mark a localParticle having entered a sweep stage in a main algorithm step.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::markAlgorithmStep (const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::swift2::kernels::UpdateParticlePairWithinCellPredicate< typename std::remove_pointer< typename ParticleContainer::value_type >::type > workOnParticle, int spacetreeId)
 A particle is marked if there is at least one active interaction in this cell.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::markInitStep (const ParticleContainer &localParticles, const peano4::datamanagement::VertexMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::swift2::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Mark a localParticle having entered a sweep stage in a initialisation algorithm step.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::markInitStep (const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::swift2::kernels::UpdateParticlePairWithinCellPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 A particle is marked if there is at least one active interaction in this cell.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::checkAlgorithmStep (Invariant policy, const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::swift2::kernels::UpdateParticlePairWithinCellPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Dependency Check: Verify that particles have completed all the algorithm steps and stages of the main algorithm steps before the current one.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::checkAlgorithmStep (Invariant policy, const ParticleContainer &localParticles, const peano4::datamanagement::VertexMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::swift2::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 
template<typename ParticleContainer >
static void swift2::dependencychecks::checkParticlesAssignedToVertexInTouchLastTimeAlgorithmStep (Invariant policy, const ParticleContainer &assignedParticles, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, int spacetreeId)
 Dependency Check: At the final stage of a sweep, i.e.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::checkInitStep (Invariant policy, const ParticleContainer &localParticles, const peano4::datamanagement::VertexMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::swift2::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Dependency Check: Verify that particles have completed all the algorithm steps and stages of the initialisation algorithm steps before the current one.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::checkInitStep (Invariant policy, const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::swift2::kernels::UpdateParticlePairWithinCellPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 
template<typename ParticleContainer >
static void swift2::dependencychecks::checkParticlesAssignedToVertexInTouchLastTimeInitStep (Invariant policy, const ParticleContainer &activeParticles, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, int spacetreeId)
 Dependency Check: At the final stage of a sweep (TouchVertexLastTime), check that all ActiveParticles have completed all their dependencies, i.e.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::clearDependencyChecksAlgorithmStep (const ParticleContainer &localParticles)
 Clear the dependency check counters of the main algorithm step dependency checks.
 
template<typename ParticleContainer >
static void swift2::dependencychecks::clearDependencyChecksInitStep (const ParticleContainer &localParticles)
 Clear the dependency check counters of the initialisation step dependency checks.