Peano
Loading...
Searching...
No Matches
ParticleSet_ScatteredOnHeap_IndexedByStdContainer.template.h
Go to the documentation of this file.
1//
2// Peano4 data file
3// Generated by Peano's Python API
4// www.peano-framework.org
5// This is generated. Be careful with adding your own stuff
6//
7#pragma once
8
9
10#include <{{STD_CONTAINER}}>
11#include <list>
12
13#include "tarch/logging/Log.h"
14#include "tarch/la/Vector.h"
15#include "tarch/mpi/mpi.h"
16
20
22
23// Template: python/peano4/toolbox/particles/ParticleSet_ScatteredOnHeap_IndexedByStdContainer.template.h
24
25{% for item in NAMESPACE -%}
26 {% if not loop.last %}
27 namespace {{ item }} {
28 {% endif %}
29{%- endfor %}
30
31 namespace globaldata {
32 class {{PARTICLE_TYPE}};
33 }
34{% for item in NAMESPACE -%}
35 {% if not loop.last %}
36 }
37 {% endif %}
38{%- endfor %}
39
40
41
42{% for item in NAMESPACE -%}
43 namespace {{ item }} {
44{%- endfor %}
45
46
47 class {{CLASSNAME}}: public toolbox::particles::ParticleSet< {% for item in NAMESPACE -%}{% if not loop.last %}{{ item }}::{% endif %}{%- endfor %}globaldata::{{PARTICLE_TYPE}} >
48 {
49 public:
50 using Base = toolbox::particles::ParticleSet< {% for item in NAMESPACE -%}{% if not loop.last %}{{ item }}::{% endif %}{%- endfor %}globaldata::{{PARTICLE_TYPE}} >;
51 using Container = std::{{STD_CONTAINER}}< {% for item in NAMESPACE -%}{% if not loop.last %}{{ item }}::{% endif %}{%- endfor %}globaldata::{{PARTICLE_TYPE}}* >;
52
56 typedef Container::value_type value_type;
57 typedef Container::iterator iterator;
58 typedef Container::const_iterator const_iterator;
59
60 {{CLASSNAME}}() = default;
61
62
63 enum ObjectConstruction {
64 NoData
65 };
66
67 {{CLASSNAME}}( ObjectConstruction ):
68 {{CLASSNAME}}() {}
69
80 {{CLASSNAME}}( const {{CLASSNAME}}& ) = default;
81
93 void merge(::peano4::grid::TraversalObserver::SendReceiveContext context, {{CLASSNAME}}& neighbour, const peano4::datamanagement::VertexMarker& marker, int spacetreeId);
94
95 static bool send(const peano4::datamanagement::VertexMarker& marker);
96 static bool receiveAndMerge(const peano4::datamanagement::VertexMarker& marker);
97 static ::peano4::grid::LoadStoreComputeFlag loadStoreComputeFlag(const peano4::datamanagement::VertexMarker& marker);
98
111 void clone( const {{CLASSNAME}}& otherSet );
112
113 std::string toString() const;
114
124 void particlesCanNotBeLiftedLocally();
125
126 void particlesCanNotBeDroppedLocallySoRollOverForNextMeshSweep(DoFType* particle);
127
141 void clear();
142
149 Container::iterator particleCanNotBeLiftedLocally( const Container::iterator& particle );
150
157 void deleteParticles();
158
169 Container::iterator begin();
170 Container::iterator end();
171 Container::const_iterator begin() const;
172 Container::const_iterator end() const;
173 int size() const;
174
187 void addParticle(DoFType* particle);
188
196 bool isValid() const;
197
203 void grabParticles({{CLASSNAME}}& sourceParticleSet);
204
211 Container::iterator grabParticle(
212 const Container::iterator& particle,
213 {{CLASSNAME}}& sourceParticleSet
214 );
215
228 Container::iterator deleteParticle( const Container::iterator& particle );
229
246 void mergeWithParticle(
247 DoFType* neighbourParticle,
249 int spacetreeId
250 );
251 private:
253
254 Container _container;
255};
256
257{% for item in NAMESPACE -%}
258}
259{%- endfor %}
260
261
std::string toString(exahype2::RefinementCommand value)
SendReceiveContext
There are three different scenarios when we merge data:
Log Device.
Definition Log.h:517
Abstract base class for all flavours of particle sets.
Definition ParticleSet.h:66
bool isValid(Invariant policy, bool workOnParticle, bool particleIsLocal, int numberOfUpdates, int numberOfMaskOuts)
Is current state that's to be updated valid.
void clear(GridStatistics &statistics, bool isGlobalMasterTree)
The term clear() is not 100% correct, as the number of stationary traversals is not reset to a dummy ...
std::vector< GridControlEvent > merge(std::vector< GridControlEvent > events, const double Tolerance=0.1)
Merge set of refinement/coarsening commands.
Vertex marker to provide information about selected vertex.