Peano 4
Loading...
Searching...
No Matches
particles.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
8#include "tarch/la/Vector.h"
9
10
11namespace toolbox {
12 namespace particles {
18 constexpr double SpatialDuplicateTolerance = 1e-6;
19
32 template <typename Iterator>
33 Iterator particleIsDuplicate(const typename Iterator::value_type& particle, Iterator begin, const Iterator& end);
34
42 template <typename Particle>
44 const Particle& particle, const tarch::la::Vector<Dimensions, double>& domainOffset, const tarch::la::Vector<Dimensions, double>& domainWidth
45 );
46
47
57 template <typename Particle, typename ParticleSet>
60 const std::vector<Particle*>& newParticles,
62 int spacetreeId
63 );
64
65
94 template <typename Particle, typename ParticleSet>
96 const peano4::datamanagement::CellMarker& marker, Particle* newParticles, peano4::datamanagement::VertexEnumerator<ParticleSet>& fineGridVertices, int spacetreeId
97 );
98
99
101
115 const tarch::la::Vector<Dimensions,double> domainOffset,
117 const std::bitset<Dimensions> periodicBC
118 );
119 } // namespace particles
120} // namespace toolbox
121
122
123#include "particles.cpph"
std::bitset< Dimensions > periodicBC
Definition main.cpp:19
tarch::la::Vector< Dimensions, double > mirrorParticleAlongPeriodicDomains(const tarch::la::Vector< Dimensions, double > &x, const peano4::datamanagement::VertexMarker &marker, const tarch::la::Vector< Dimensions, double > domainOffset, const tarch::la::Vector< Dimensions, double > domainSize, const std::bitset< Dimensions > periodicBC)
Mirror a particle along the periodic domain boundaries.
Definition particles.cpp:19
constexpr double SpatialDuplicateTolerance
Default tolerance to decide when two particles are the same.
Definition particles.h:18
void insertParticleIntoCell(const peano4::datamanagement::CellMarker &marker, Particle *newParticles, peano4::datamanagement::VertexEnumerator< ParticleSet > &fineGridVertices, int spacetreeId)
Insert particle into cell.
Iterator particleIsDuplicate(const typename Iterator::value_type &particle, Iterator begin, const Iterator &end)
Check if there's already a particle at p's position in the set.
Definition particles.cpph:6
bool particleAssignedToVertexWillBeLocal(const tarch::la::Vector< Dimensions, double > &x, const peano4::datamanagement::VertexMarker &marker)
Definition particles.cpp:6
void insertParticlesIntoCell(const peano4::datamanagement::CellMarker &marker, const std::vector< Particle * > &newParticles, peano4::datamanagement::VertexEnumerator< ParticleSet > &fineGridVertices, int spacetreeId)
Insert particle into a cell.
bool particleWillStayWithinComputationalDomain(const Particle &particle, const tarch::la::Vector< Dimensions, double > &domainOffset, const tarch::la::Vector< Dimensions, double > &domainWidth)
Return true if and only if.
Vertex enumerator within array.
Vertex marker to provide information about selected vertex.
Simple vector class.
Definition Vector.h:134