![]() |
Peano
|
This file is part of the SWIFT 2 project. More...
Namespaces | |
namespace | actionsets |
This file is part of the SWIFT 2 project. | |
namespace | api |
This file is part of the SWIFT 2 project. | |
namespace | boundaryconditions |
namespace | commandlinesettings |
namespace | dastgenTest |
namespace | dependencychecks |
namespace | input |
Input utilities. | |
namespace | kernels |
namespace | particle |
This file is part of the SWIFT 2 project. | |
namespace | Project |
namespace | scenario |
Initialisation snippets for various scenarios. | |
namespace | sphtools |
This file is part of the SWIFT 2 project. | |
namespace | statistics |
namespace | timestepping |
Data Structures | |
struct | CellMetaData |
Provide meta data around Swift 2 cell. More... | |
class | ParticleSpecies |
Represent one type (species) of particles. More... | |
class | TaskEnumerator |
Task enumerator for Swift 2. More... | |
struct | TaskNumber |
Task Number. More... | |
Typedefs | |
using | PendingDependencies = std::set<std::pair<::swift2::TaskNumber, ::swift2::TaskNumber>> |
Pending dependencies container. | |
Functions | |
void | commitGridControlEvents (const std::list< peano4::grid::GridControlEvent > &events) |
Commmit a new set of events. | |
void | markAllParticlesAsUpdatedWithinCell (auto &particleContainer, const peano4::datamanagement::CellMarker &marker) |
Set the particle markers of all particles within a cell. | |
std::string | toString (const std::set< TaskNumber > &numbers) |
std::string | toString (const TaskNumber numbers[TwoPowerD]) |
int | flatten (const TaskNumber &numbers) |
Alias around method flatten(). | |
std::set< int > | flatten (const std::set< TaskNumber > &numbers) |
template<typename Vertex > | |
std::set<::swift2::TaskNumber > | getVertexNumbersOfParentVertices (const peano4::datamanagement::VertexMarker &marker, peano4::datamanagement::VertexEnumerator< Vertex > coarseGridVertices, ::swift2::TaskNumber::TaskAssociation taskAssociation) |
Get numbers of parent vertices. | |
template<typename Vertex > | |
std::set<::swift2::TaskNumber > | getVertexNumbersOfParentVertices (tarch::la::Vector< Dimensions, int > position, peano4::datamanagement::VertexEnumerator< Vertex > coarseGridVertices, ::swift2::TaskNumber::TaskAssociation taskAssociation, int dimension) |
std::set<::swift2::TaskNumber > | getDependenciesForTask (const ::swift2::TaskNumber &task, PendingDependencies &pendingDependencies) |
Extract set of dependencies for given task. | |
tarch::tests::TestCase * | getUnitTests () |
Please destroy after usage. | |
bool | parseCommandLineArguments (int argc, char **argv) |
void | printUsage (char **argv) |
void | setDefaultLogStatements () |
Variables | |
std::vector< peano4::grid::GridControlEvent > | committedGridControlEvents |
This file is part of the SWIFT 2 project.
For conditions of distribution and use, please see the copyright notice at www.peano-framework.org
using swift2::PendingDependencies = std::set<std::pair<::swift2::TaskNumber, ::swift2::TaskNumber>> |
Pending dependencies container.
When we run through the tree, we sometimes cannot submit dependencies directly. When we are on a fine level, we might, for example, have dependencies from the fine mesh to a touchLastTime event on the next coarser level. This one is not yet submitted. However, once we will get there, i.e. back to the coarser level, the fine grid info will not be at hand anymore. Therefore, we have to memorise these dependencies on the fine grid, and then use this memorised info later.
Dependencies are stored as from->to.
Definition at line 123 of file TaskNumber.h.
void swift2::commitGridControlEvents | ( | const std::list< peano4::grid::GridControlEvent > & | events | ) |
Commmit a new set of events.
You still have to clear the passed data if you wanna reuse the argument container.
Definition at line 7 of file GridControlEvents.cpp.
References committedGridControlEvents, and peano4::grid::merge().
std::set< int > swift2::flatten | ( | const std::set< TaskNumber > & | numbers | ) |
Definition at line 115 of file TaskNumber.cpp.
References swift2::TaskNumber::NoOutDependencies.
int swift2::flatten | ( | const TaskNumber & | numbers | ) |
Alias around method flatten().
I introduced this one so that both the conversation of a single number and a whole set can be written with the same syntax.
Definition at line 112 of file TaskNumber.cpp.
std::set<::swift2::TaskNumber > swift2::getDependenciesForTask | ( | const ::swift2::TaskNumber & | task, |
PendingDependencies & | pendingDependencies ) |
Extract set of dependencies for given task.
We take the bookmarked dependencies from pendingDependencies that feed into task and return those. Before we do so, we remove them from pendingDependencies.
Definition at line 126 of file TaskNumber.cpp.
tarch::tests::TestCase * swift2::getUnitTests | ( | ) |
Please destroy after usage.
Definition at line 5 of file UnitTests.cpp.
Referenced by runTests().
std::set<::swift2::TaskNumber > swift2::getVertexNumbersOfParentVertices | ( | const peano4::datamanagement::VertexMarker & | marker, |
peano4::datamanagement::VertexEnumerator< Vertex > | coarseGridVertices, | ||
::swift2::TaskNumber::TaskAssociation | taskAssociation ) |
Get numbers of parent vertices.
We assume that each parent vertex has a routine getNumber(). This routine returns the set of numbers of all parent cells. A vertex can have up to \( 2^d \) parent vertices. If the vertex coincides spatially with a vertex on the next coarser grid (cmp. peano4::datamanagement::VertexMarker::coincidesWithCoarseGridVertex()), then the result will only contain one entry. This means that the current vertex is at the corner of a \( 3^d \) patch within the spacetree. If the vertex is placed along the edges of a patch, one or two parents are returned (unknowns are not stored redundantly).
Definition at line 39 of file TaskNumber.cpph.
References getVertexNumbersOfParentVertices().
Referenced by getVertexNumbersOfParentVertices(), and getVertexNumbersOfParentVertices().
std::set<::swift2::TaskNumber > swift2::getVertexNumbersOfParentVertices | ( | tarch::la::Vector< Dimensions, int > | position, |
peano4::datamanagement::VertexEnumerator< Vertex > | coarseGridVertices, | ||
::swift2::TaskNumber::TaskAssociation | taskAssociation, | ||
int | dimension ) |
Definition at line 5 of file TaskNumber.cpph.
References peano4::utils::dLinearised(), and getVertexNumbersOfParentVertices().
void swift2::markAllParticlesAsUpdatedWithinCell | ( | auto & | particleContainer, |
const peano4::datamanagement::CellMarker & | marker ) |
Set the particle markers of all particles within a cell.
Each particle owns a has-updated marker (a boolean). This marker is unset by UpdateParticleMarker. Cell-wise operations such as the force or density calculation should not update a particle, if its marker is already set. We work with a weak ownership model, i.e. particles that sit on the face in-between two cells are updated by the first adjacent cell that becomes active. This is better than a complex rule to make the association unique running risk that we miss out on particles.
An example of a predicate that checks this flag is localParticleCanBeUpdatedInCellKernelFromAnyOtherParticle(). Despite its name, it also looks if the particle has already been updated before. We have two different places in the code where we use this routine:
In the sequential/domain-decomposition code, we use touchCellLastTime() to set all the markers. This happens in swift2.actionsets.UpdateParticleMarker. In the task-based variant, we have to embed the routine into the actual task which updates a particle. This is done by swift2.api.actionsets.TaskGraphKernelWrappers.construct_touch_cell_first_time_call().
Definition at line 32 of file swift2.h.
References tarch::la::NUMERICAL_ZERO_DIFFERENCE, and toolbox::particles::internal::relativeGrabOwnershipSpatialSortingTolerance().
Definition at line 169 of file UserInterface.cpp.
References tarch::accelerator::Device::configure(), tarch::multicore::Core::configure(), tarch::accelerator::Device::getInstance(), tarch::mpi::Rank::getInstance(), tarch::multicore::Core::getInstance(), logError, logInfo, logWarning, tarch::logging::LogFilterFileReader::parsePlainTextFile(), printUsage(), tarch::mpi::Rank::setDeadlockTimeOut(), setDefaultLogStatements(), and tarch::multicore::Core::UseDefaultNumberOfThreads.
Referenced by main().
void swift2::printUsage | ( | char ** | argv | ) |
Definition at line 139 of file UserInterface.cpp.
Referenced by parseCommandLineArguments().
void swift2::setDefaultLogStatements | ( | ) |
Definition at line 25 of file UserInterface.cpp.
References tarch::logging::LogFilter::addFilterListEntry(), tarch::logging::LogFilter::FilterListEntry::AlwaysOn, tarch::logging::LogFilter::FilterListEntry::AnyRank, tarch::logging::LogFilter::FilterListEntry::BlackListEntry, tarch::logging::LogFilter::clearFilterList(), tarch::logging::LogFilter::getInstance(), tarch::logging::LogFilter::FilterListEntry::TargetDebug, tarch::logging::LogFilter::FilterListEntry::TargetInfo, tarch::logging::LogFilter::FilterListEntry::TargetTrace, and tarch::logging::LogFilter::FilterListEntry::WhiteListEntry.
Referenced by parseCommandLineArguments().
std::string swift2::toString | ( | const std::set< TaskNumber > & | numbers | ) |
Definition at line 95 of file TaskNumber.cpp.
Referenced by toString().
std::string swift2::toString | ( | const TaskNumber | numbers[TwoPowerD] | ) |
Definition at line 86 of file TaskNumber.cpp.
References toString(), and TwoPowerD.
|
extern |
Definition at line 5 of file GridControlEvents.cpp.
Referenced by commitGridControlEvents().