Peano 4
Loading...
Searching...
No Matches
swift2 Namespace Reference

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

class  CellTask
 A task tied logically to a vertex within the mesh. More...
 
class  ParticleSpecies
 Represent one type (species) of particles. More...
 
class  TaskEnumerator
 Task enumerator for Swift 2. More...
 
struct  TaskNumber
 Task Number. More...
 
class  VertexTask
 A task tied logically to a vertex within the mesh. 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.
 
std::string toString (const std::set< TaskNumber > &numbers)
 
int flatten (const TaskNumber &numbers)
 Alias around method flatten().
 
std::set< intflatten (const std::set< TaskNumber > &numbers)
 
template<typename Vertex >
std::set<::swift2::TaskNumbergetVertexNumbersOfParentVertices (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::TaskNumbergetVertexNumbersOfParentVertices (tarch::la::Vector< Dimensions, int > position, peano4::datamanagement::VertexEnumerator< Vertex > coarseGridVertices, ::swift2::TaskNumber::TaskAssociation taskAssociation, int dimension)
 
std::set<::swift2::TaskNumbergetDependenciesForTask (const ::swift2::TaskNumber &task, PendingDependencies &pendingDependencies)
 Extract set of dependencies for given task.
 
tarch::tests::TestCasegetUnitTests ()
 Please destroy after usage.
 
bool parseCommandLineArguments (int argc, char **argv)
 
void printUsage (char **argv)
 
void setDefaultLogStatements ()
 

Variables

std::vector< peano4::grid::GridControlEventcommittedGridControlEvents
 

Detailed Description

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

Typedef Documentation

◆ PendingDependencies

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.

Definition at line 121 of file TaskNumber.h.

Function Documentation

◆ commitGridControlEvents()

void swift2::commitGridControlEvents ( const std::list< peano4::grid::GridControlEvent > & events)

Commmit a new set of events.

  • Clear the old set.
  • Copy the new data over. For this, we have to convert the list into a vector.
  • Merge the elements within the vector. This last step is important, as we run the risk that we have thousands of refine events. Handling such large quantities is expensive, so we should merge them. At the same time, the underlying action set yields a lot of tiny, disjoint refine events, i.e. we haev to be rather generous when we merge them her.

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().

Here is the call graph for this function:

◆ flatten() [1/2]

std::set< int > swift2::flatten ( const std::set< TaskNumber > & numbers)

Definition at line 107 of file TaskNumber.cpp.

References swift2::TaskNumber::NoDependencies.

◆ flatten() [2/2]

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 104 of file TaskNumber.cpp.

◆ getDependenciesForTask()

std::set<::swift2::TaskNumber > swift2::getDependenciesForTask ( const ::swift2::TaskNumber & task,
PendingDependencies & pendingDependencies )

Extract set of dependencies for given task.

Definition at line 118 of file TaskNumber.cpp.

◆ getUnitTests()

tarch::tests::TestCase * swift2::getUnitTests ( )

Please destroy after usage.

Definition at line 6 of file UnitTests.cpp.

Referenced by runTests().

Here is the caller graph for this function:

◆ getVertexNumbersOfParentVertices() [1/2]

template<typename Vertex >
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVertexNumbersOfParentVertices() [2/2]

template<typename Vertex >
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().

Here is the call graph for this function:

◆ parseCommandLineArguments()

◆ printUsage()

void swift2::printUsage ( char ** argv)

Definition at line 140 of file UserInterface.cpp.

References tarch::multicore::orchestration::getListOfRealisations().

Referenced by parseCommandLineArguments().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDefaultLogStatements()

◆ toString()

std::string swift2::toString ( const std::set< TaskNumber > & numbers)

Definition at line 87 of file TaskNumber.cpp.

Variable Documentation

◆ committedGridControlEvents

std::vector< peano4::grid::GridControlEvent > swift2::committedGridControlEvents
extern
Todo
write some docu

Definition at line 5 of file GridControlEvents.cpp.

Referenced by commitGridControlEvents().