Peano
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(
34 const typename Iterator::value_type& particle,
35 Iterator begin,
36 const Iterator& end
37 );
38
46 template <typename Particle>
48 const Particle& particle,
49 const tarch::la::Vector<Dimensions, double>& domainOffset,
51 );
52
53
63 template <typename Particle, typename ParticleSet>
66 const std::vector<Particle*>& newParticles,
68 int spacetreeId
69 );
70
71
100 template <typename Particle, typename ParticleSet>
103 Particle* newParticles,
105 int spacetreeId
106 );
107
121 const std::bitset<Dimensions>& assignedVertex,
122 auto& particle
123 );
124
130 auto& particle
131 );
132
158 auto& particle
159 );
160
164 );
165
187 const tarch::la::Vector<Dimensions, double> domainOffset,
189 const std::bitset<Dimensions> periodicBC
190 );
191
204 const tarch::la::Vector<Dimensions, double> domainOffset,
206 const std::bitset<Dimensions> periodicBC
207 );
208 } // namespace particles
209} // namespace toolbox
210
211
212#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:20
constexpr double SpatialDuplicateTolerance
Default tolerance to decide when two particles are the same.
Definition particles.h:18
void updateContainedInAdjacentCellProperty(const peano4::datamanagement::CellMarker &marker, const std::bitset< Dimensions > &assignedVertex, auto &particle)
Update helper flag per particle for cell.
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.
bool particleAssignedToVertexWillBeLocal(const tarch::la::Vector< Dimensions, double > &x, const peano4::datamanagement::VertexMarker &marker)
Definition particles.cpp:7
void insertParticlesIntoCell(const peano4::datamanagement::CellMarker &marker, const std::vector< Particle * > &newParticles, peano4::datamanagement::VertexEnumerator< ParticleSet > &fineGridVertices, int spacetreeId)
Insert particle into a cell.
tarch::la::Vector< Dimensions, double > applyPeriodicBoundaryConditions(const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > domainOffset, const tarch::la::Vector< Dimensions, double > domainSize, const std::bitset< Dimensions > periodicBC)
Applies the periodic boundary condition on particle coordinates x.
Definition particles.cpp:45
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:150