VTK-m  2.2
Particle.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_Particle_h
11 #define vtk_m_Particle_h
12 
13 #include <ostream>
14 #include <vtkm/Bitset.h>
15 #include <vtkm/VecVariable.h>
16 #include <vtkm/VectorAnalysis.h>
18 
19 namespace vtkm
20 {
21 
22 //Bit field describing the status:
23 class ParticleStatus : public vtkm::Bitset<vtkm::UInt8>
24 {
25 public:
27  {
28  this->SetOk();
29  this->ClearTerminate();
30  }
31 
32  VTKM_EXEC_CONT void SetOk() { this->set(this->SUCCESS_BIT); }
33  VTKM_EXEC_CONT bool CheckOk() const { return this->test(this->SUCCESS_BIT); }
34 
35  VTKM_EXEC_CONT void SetFail() { this->reset(this->SUCCESS_BIT); }
36  VTKM_EXEC_CONT bool CheckFail() const { return !this->test(this->SUCCESS_BIT); }
37 
38  VTKM_EXEC_CONT void SetTerminate() { this->set(this->TERMINATE_BIT); }
40  VTKM_EXEC_CONT bool CheckTerminate() const { return this->test(this->TERMINATE_BIT); }
41 
44  VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(this->SPATIAL_BOUNDS_BIT); }
45 
48  VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(this->TEMPORAL_BOUNDS_BIT); }
49 
52  VTKM_EXEC_CONT bool CheckTookAnySteps() const { return this->test(this->TOOK_ANY_STEPS_BIT); }
53 
56  VTKM_EXEC_CONT bool CheckInGhostCell() const { return this->test(this->IN_GHOST_CELL_BIT); }
57 
60  VTKM_EXEC_CONT bool CheckZeroVelocity() const { return this->test(this->ZERO_VELOCITY); }
61 
63  {
64  return this->CheckOk() && !this->CheckTerminate() && !this->CheckSpatialBounds() &&
65  !this->CheckTemporalBounds() && !this->CheckInGhostCell() && !this->CheckZeroVelocity();
66  }
67 
68 private:
69  static constexpr vtkm::Id SUCCESS_BIT = 0;
70  static constexpr vtkm::Id TERMINATE_BIT = 1;
71  static constexpr vtkm::Id SPATIAL_BOUNDS_BIT = 2;
72  static constexpr vtkm::Id TEMPORAL_BOUNDS_BIT = 3;
73  static constexpr vtkm::Id TOOK_ANY_STEPS_BIT = 4;
74  static constexpr vtkm::Id IN_GHOST_CELL_BIT = 5;
75  static constexpr vtkm::Id ZERO_VELOCITY = 6;
76 };
77 
78 inline VTKM_CONT std::ostream& operator<<(std::ostream& s, const vtkm::ParticleStatus& status)
79 {
80  s << "[ok= " << status.CheckOk();
81  s << " term= " << status.CheckTerminate();
82  s << " spat= " << status.CheckSpatialBounds();
83  s << " temp= " << status.CheckTemporalBounds();
84  s << " ghst= " << status.CheckInGhostCell();
85  s << " zvel= " << status.CheckZeroVelocity();
86  s << "]";
87  return s;
88 }
89 
90 class Particle
91 {
92 public:
94  Particle() {}
95 
98  const vtkm::Id& id,
99  const vtkm::Id& numSteps = 0,
100  const vtkm::ParticleStatus& status = vtkm::ParticleStatus(),
101  const vtkm::FloatDefault& time = 0)
102  : Position(p)
103  , ID(id)
104  , NumSteps(numSteps)
105  , Status(status)
106  , Time(time)
107  {
108  }
109 
112  : Position(p.Position)
113  , ID(p.ID)
114  , NumSteps(p.NumSteps)
115  , Status(p.Status)
116  , Time(p.Time)
117  {
118  }
119 
120  vtkm::Particle& operator=(const vtkm::Particle&) = default;
121 
123  {
124  // This must not be defaulted, since defaulted virtual destructors are
125  // troublesome with CUDA __host__ __device__ markup.
126  }
127 
128  VTKM_EXEC_CONT const vtkm::Vec3f& GetPosition() const { return this->Position; }
129  VTKM_EXEC_CONT void SetPosition(const vtkm::Vec3f& position) { this->Position = position; }
130 
131  VTKM_EXEC_CONT vtkm::Id GetID() const { return this->ID; }
132  VTKM_EXEC_CONT void SetID(vtkm::Id id) { this->ID = id; }
133 
135  VTKM_EXEC_CONT void SetNumberOfSteps(vtkm::Id numSteps) { this->NumSteps = numSteps; }
136 
139  VTKM_EXEC_CONT void SetStatus(vtkm::ParticleStatus status) { this->Status = status; }
140 
141  VTKM_EXEC_CONT vtkm::FloatDefault GetTime() const { return this->Time; }
142  VTKM_EXEC_CONT void SetTime(vtkm::FloatDefault time) { this->Time = time; }
143 
146  const vtkm::FloatDefault& vtkmNotUsed(length)) const
147  {
148  // Velocity is evaluated from the Velocity field
149  // and is not influenced by the particle
150  VTKM_ASSERT(vectors.GetNumberOfComponents() > 0);
151  return vectors[0];
152  }
153 
156  {
157  (void)deltaT; // unused for a general particle advection case
158  return this->Position;
159  }
160 
161  inline VTKM_CONT friend std::ostream& operator<<(std::ostream& out, const vtkm::Particle& p)
162  {
163  out << "v(" << p.Time << ") = " << p.Position << ", ID: " << p.ID
164  << ", NumSteps: " << p.NumSteps << ", Status: " << p.Status;
165  return out;
166  }
167 
168 private:
170  vtkm::Id ID = -1;
174 
175 public:
176  static size_t Sizeof()
177  {
178  constexpr std::size_t sz = sizeof(vtkm::Vec3f) // Pos
179  + sizeof(vtkm::Id) // ID
180  + sizeof(vtkm::Id) // NumSteps
181  + sizeof(vtkm::UInt8) // Status
182  + sizeof(vtkm::FloatDefault); // Time
183 
184  return sz;
185  }
186 };
187 
189 {
190 public:
193 
195  ChargedParticle(const vtkm::Vec3f& position,
196  const vtkm::Id& id,
197  const vtkm::Float64& mass,
198  const vtkm::Float64& charge,
199  const vtkm::Float64& weighting,
200  const vtkm::Vec3f& momentum,
201  const vtkm::Id& numSteps = 0,
202  const vtkm::ParticleStatus& status = vtkm::ParticleStatus(),
203  const vtkm::FloatDefault& time = 0)
204  : Position(position)
205  , ID(id)
206  , NumSteps(numSteps)
207  , Status(status)
208  , Time(time)
209  , Mass(mass)
210  , Charge(charge)
211  , Weighting(weighting)
212  , Momentum(momentum)
213  {
214  }
215 
218  : Position(other.Position)
219  , ID(other.ID)
220  , NumSteps(other.NumSteps)
221  , Status(other.Status)
222  , Time(other.Time)
223  , Mass(other.Mass)
224  , Charge(other.Charge)
225  , Weighting(other.Weighting)
226  , Momentum(other.Momentum)
227  {
228  }
229 
231 
233  ~ChargedParticle() noexcept
234  {
235  // This must not be defaulted, since defaulted virtual destructors are
236  // troublesome with CUDA __host__ __device__ markup.
237  }
238 
239  VTKM_EXEC_CONT const vtkm::Vec3f& GetPosition() const { return this->Position; }
240  VTKM_EXEC_CONT void SetPosition(const vtkm::Vec3f& position) { this->Position = position; }
241 
242  VTKM_EXEC_CONT vtkm::Id GetID() const { return this->ID; }
243  VTKM_EXEC_CONT void SetID(vtkm::Id id) { this->ID = id; }
244 
246  VTKM_EXEC_CONT void SetNumberOfSteps(vtkm::Id numSteps) { this->NumSteps = numSteps; }
247 
250  VTKM_EXEC_CONT void SetStatus(vtkm::ParticleStatus status) { this->Status = status; }
251 
252  VTKM_EXEC_CONT vtkm::FloatDefault GetTime() const { return this->Time; }
253  VTKM_EXEC_CONT void SetTime(vtkm::FloatDefault time) { this->Time = time; }
254 
256  vtkm::Float64 Gamma(const vtkm::Vec3f& momentum, bool reciprocal = false) const
257  {
259  const vtkm::Float64 fMom2 = vtkm::MagnitudeSquared(momentum);
260  const vtkm::Float64 m2 = this->Mass * this->Mass;
261  const vtkm::Float64 m2_c2_reci = 1.0 / (m2 * c2);
262  if (reciprocal)
263  return vtkm::RSqrt(1.0 + fMom2 * m2_c2_reci);
264  else
265  return vtkm::Sqrt(1.0 + fMom2 * m2_c2_reci);
266  }
267 
270  const vtkm::FloatDefault& length) const
271  {
272  VTKM_ASSERT(vectors.GetNumberOfComponents() == 2);
273 
274  // Suppress unused warning
275  (void)this->Weighting;
276 
277  vtkm::Vec3f eField = vectors[0];
278  vtkm::Vec3f bField = vectors[1];
279 
280  const vtkm::Float64 QoM = this->Charge / this->Mass;
281  const vtkm::Vec3f mom_minus = this->Momentum + (0.5 * this->Charge * eField * length);
282 
283  // Get reciprocal of Gamma
284  vtkm::Vec3f gamma_reci = static_cast<vtkm::FloatDefault>(this->Gamma(mom_minus, true));
285  const vtkm::Vec3f t = 0.5 * QoM * length * bField * gamma_reci;
286  const vtkm::Vec3f s = 2.0f * t * (1.0 / (1.0 + vtkm::Magnitude(t)));
287  const vtkm::Vec3f mom_prime = mom_minus + vtkm::Cross(mom_minus, t);
288  const vtkm::Vec3f mom_plus = mom_minus + vtkm::Cross(mom_prime, s);
289 
290  const vtkm::Vec3f mom_new = mom_plus + 0.5 * this->Charge * eField * length;
291  this->Momentum = mom_new;
292 
293  // momentum = velocity * mass * gamma;
294  // --> velocity = momentum / (mass * gamma)
295  // --> velocity = ( momentum / mass ) * gamma_reci
296  vtkm::Vec3f velocity = (mom_new / this->Mass) * this->Gamma(mom_new, true);
297  return velocity;
298  }
299 
302  {
303  // Translation is in -ve Z direction,
304  // this needs to be a parameter.
305  auto translation = this->NumSteps * deltaT * SPEED_OF_LIGHT * vtkm::Vec3f{ 0., 0., -1.0 };
306  return this->Position + translation;
307  }
308 
309  inline VTKM_CONT friend std::ostream& operator<<(std::ostream& out,
310  const vtkm::ChargedParticle& p)
311  {
312  out << "v(" << p.Time << ") = " << p.Position << ", ID: " << p.ID
313  << ", NumSteps: " << p.NumSteps << ", Status: " << p.Status;
314  return out;
315  }
316 
317 private:
319  vtkm::Id ID = -1;
328  static_cast<vtkm::FloatDefault>(2.99792458e8);
329 
330  friend struct mangled_diy_namespace::Serialization<vtkm::ChargedParticle>;
331 
332 public:
333  static size_t Sizeof()
334  {
335  constexpr std::size_t sz = sizeof(vtkm::Vec3f) // Pos
336  + sizeof(vtkm::Id) // ID
337  + sizeof(vtkm::Id) // NumSteps
338  + sizeof(vtkm::UInt8) // Status
339  + sizeof(vtkm::FloatDefault) // Time
340  + sizeof(vtkm::Float64) //Mass
341  + sizeof(vtkm::Float64) //Charge
342  + sizeof(vtkm::Float64) //Weighting
343  + sizeof(vtkm::Vec3f); //Momentum
344 
345  return sz;
346  }
347 };
348 
349 } //namespace vtkm
350 
352 {
353 template <>
354 struct Serialization<vtkm::Particle>
355 {
356 public:
357  static VTKM_CONT void save(BinaryBuffer& bb, const vtkm::Particle& p)
358  {
359  vtkmdiy::save(bb, p.GetPosition());
360  vtkmdiy::save(bb, p.GetID());
361  vtkmdiy::save(bb, p.GetNumberOfSteps());
362  vtkmdiy::save(bb, p.GetStatus());
363  vtkmdiy::save(bb, p.GetTime());
364  }
365 
366  static VTKM_CONT void load(BinaryBuffer& bb, vtkm::Particle& p)
367  {
368  vtkm::Vec3f pos;
369  vtkmdiy::load(bb, pos);
370  p.SetPosition(pos);
371 
372  vtkm::Id id;
373  vtkmdiy::load(bb, id);
374  p.SetID(id);
375 
376  vtkm::Id numSteps;
377  vtkmdiy::load(bb, numSteps);
378  p.SetNumberOfSteps(numSteps);
379 
380  vtkm::ParticleStatus status;
381  vtkmdiy::load(bb, status);
382  p.SetStatus(status);
383 
384  vtkm::FloatDefault time;
385  vtkmdiy::load(bb, time);
386  p.SetTime(time);
387  }
388 };
389 
390 template <>
391 struct Serialization<vtkm::ChargedParticle>
392 {
393 public:
394  static VTKM_CONT void save(BinaryBuffer& bb, const vtkm::ChargedParticle& e)
395  {
396  vtkmdiy::save(bb, e.Position);
397  vtkmdiy::save(bb, e.ID);
398  vtkmdiy::save(bb, e.NumSteps);
399  vtkmdiy::save(bb, e.Status);
400  vtkmdiy::save(bb, e.Time);
401  vtkmdiy::save(bb, e.Mass);
402  vtkmdiy::save(bb, e.Charge);
403  vtkmdiy::save(bb, e.Weighting);
404  vtkmdiy::save(bb, e.Momentum);
405  }
406 
407  static VTKM_CONT void load(BinaryBuffer& bb, vtkm::ChargedParticle& e)
408  {
409  vtkmdiy::load(bb, e.Position);
410  vtkmdiy::load(bb, e.ID);
411  vtkmdiy::load(bb, e.NumSteps);
412  vtkmdiy::load(bb, e.Status);
413  vtkmdiy::load(bb, e.Time);
414  vtkmdiy::load(bb, e.Mass);
415  vtkmdiy::load(bb, e.Charge);
416  vtkmdiy::load(bb, e.Weighting);
417  vtkmdiy::load(bb, e.Momentum);
418  }
419 };
420 }
421 
422 #endif // vtk_m_Particle_h
vtkm::Bitset
A bitmap to serve different needs.
Definition: Bitset.h:28
Bitset.h
vtkm::ChargedParticle::Weighting
vtkm::Float64 Weighting
Definition: Particle.h:325
vtkm::ChargedParticle::operator<<
friend std::ostream & operator<<(std::ostream &out, const vtkm::ChargedParticle &p)
Definition: Particle.h:309
vtkm::ParticleStatus::CheckTerminate
bool CheckTerminate() const
Definition: Particle.h:40
vtkm::exec::arg::load
T load(const U &u, vtkm::Id v)
Definition: FetchTagArrayDirectIn.h:36
vtkm::ParticleStatus::CanContinue
bool CanContinue() const
Definition: Particle.h:62
vtkm::Particle::Status
vtkm::ParticleStatus Status
Definition: Particle.h:172
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::Sqrt
vtkm::Float32 Sqrt(vtkm::Float32 x)
Definition: Math.h:943
vtkm::ChargedParticle::GetPosition
const vtkm::Vec3f & GetPosition() const
Definition: Particle.h:239
vtkm::Particle::SetStatus
void SetStatus(vtkm::ParticleStatus status)
Definition: Particle.h:139
vtkm::ChargedParticle::ID
vtkm::Id ID
Definition: Particle.h:319
vtkm::ChargedParticle::SetPosition
void SetPosition(const vtkm::Vec3f &position)
Definition: Particle.h:240
vtkm::ParticleStatus::ClearTemporalBounds
void ClearTemporalBounds()
Definition: Particle.h:47
VTKM_ASSERT
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
vtkm::Particle::SetTime
void SetTime(vtkm::FloatDefault time)
Definition: Particle.h:142
vtkm::ChargedParticle::ChargedParticle
ChargedParticle(const vtkm::Vec3f &position, const vtkm::Id &id, const vtkm::Float64 &mass, const vtkm::Float64 &charge, const vtkm::Float64 &weighting, const vtkm::Vec3f &momentum, const vtkm::Id &numSteps=0, const vtkm::ParticleStatus &status=vtkm::ParticleStatus(), const vtkm::FloatDefault &time=0)
Definition: Particle.h:195
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::Particle::SetPosition
void SetPosition(const vtkm::Vec3f &position)
Definition: Particle.h:129
vtkm::ParticleStatus::ClearZeroVelocity
void ClearZeroVelocity()
Definition: Particle.h:59
vtkm::Particle
Definition: Particle.h:90
vtkm::Particle::operator=
vtkm::Particle & operator=(const vtkm::Particle &)=default
vtkm::ChargedParticle::Status
vtkm::ParticleStatus Status
Definition: Particle.h:321
vtkm::ParticleStatus::CheckFail
bool CheckFail() const
Definition: Particle.h:36
vtkm::ParticleStatus::SetFail
void SetFail()
Definition: Particle.h:35
vtkm::ParticleStatus::SetZeroVelocity
void SetZeroVelocity()
Definition: Particle.h:58
vtkm::ChargedParticle::GetNumberOfSteps
vtkm::Id GetNumberOfSteps() const
Definition: Particle.h:245
vtkm::operator<<
std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:248
mangled_diy_namespace::Serialization< vtkm::ChargedParticle >::load
static void load(BinaryBuffer &bb, vtkm::ChargedParticle &e)
Definition: Particle.h:407
vtkm::ParticleStatus::SetTerminate
void SetTerminate()
Definition: Particle.h:38
vtkm::ChargedParticle::Momentum
vtkm::Vec3f Momentum
Definition: Particle.h:326
vtkm::ParticleStatus::IN_GHOST_CELL_BIT
static constexpr vtkm::Id IN_GHOST_CELL_BIT
Definition: Particle.h:74
vtkm::Particle::~Particle
~Particle() noexcept
Definition: Particle.h:122
vtkm::ChargedParticle::Position
vtkm::Vec3f Position
Definition: Particle.h:318
vtkm::ParticleStatus::TOOK_ANY_STEPS_BIT
static constexpr vtkm::Id TOOK_ANY_STEPS_BIT
Definition: Particle.h:73
vtkm::Particle::GetStatus
vtkm::ParticleStatus GetStatus() const
Definition: Particle.h:137
vtkm::ParticleStatus::CheckSpatialBounds
bool CheckSpatialBounds() const
Definition: Particle.h:44
vtkm::Particle::GetPosition
const vtkm::Vec3f & GetPosition() const
Definition: Particle.h:128
vtkm::ParticleStatus::CheckOk
bool CheckOk() const
Definition: Particle.h:33
vtkm::ParticleStatus::TEMPORAL_BOUNDS_BIT
static constexpr vtkm::Id TEMPORAL_BOUNDS_BIT
Definition: Particle.h:72
vtkm::Cross
vtkm::Vec< typename detail::FloatingPointReturnType< T >::Type, 3 > Cross(const vtkm::Vec< T, 3 > &x, const vtkm::Vec< T, 3 > &y)
Find the cross product of two vectors.
Definition: VectorAnalysis.h:180
vtkm::Particle::Particle
Particle(const vtkm::Vec3f &p, const vtkm::Id &id, const vtkm::Id &numSteps=0, const vtkm::ParticleStatus &status=vtkm::ParticleStatus(), const vtkm::FloatDefault &time=0)
Definition: Particle.h:97
vtkm::ChargedParticle::Mass
vtkm::Float64 Mass
Definition: Particle.h:323
mangled_diy_namespace
Definition: Particle.h:351
vtkm::VecVariable::GetNumberOfComponents
vtkm::IdComponent GetNumberOfComponents() const
Definition: VecVariable.h:53
vtkm::ChargedParticle::SetTime
void SetTime(vtkm::FloatDefault time)
Definition: Particle.h:253
VectorAnalysis.h
vtkm::ChargedParticle::ChargedParticle
ChargedParticle()
Definition: Particle.h:192
vtkm::ChargedParticle::GetEvaluationPosition
vtkm::Vec3f GetEvaluationPosition(const vtkm::FloatDefault &deltaT) const
Definition: Particle.h:301
vtkm::ChargedParticle::Charge
vtkm::Float64 Charge
Definition: Particle.h:324
vtkm::ParticleStatus::SetTookAnySteps
void SetTookAnySteps()
Definition: Particle.h:50
vtkm::ChargedParticle::Gamma
vtkm::Float64 Gamma(const vtkm::Vec3f &momentum, bool reciprocal=false) const
Definition: Particle.h:256
vtkm::MagnitudeSquared
detail::FloatingPointReturnType< T >::Type MagnitudeSquared(const T &x)
Returns the square of the magnitude of a vector.
Definition: VectorAnalysis.h:64
vtkm::Bitset< vtkm::UInt8 >::test
bool test(vtkm::Id bitIndex) const
Definition: Bitset.h:53
vtkm::ParticleStatus::SetOk
void SetOk()
Definition: Particle.h:32
vtkm::Bitset< vtkm::UInt8 >::reset
void reset(vtkm::Id bitIndex)
Definition: Bitset.h:43
vtkm::ChargedParticle
Definition: Particle.h:188
vtkm::ParticleStatus::ZERO_VELOCITY
static constexpr vtkm::Id ZERO_VELOCITY
Definition: Particle.h:75
vtkm::ChargedParticle::Velocity
vtkm::Vec3f Velocity(const vtkm::VecVariable< vtkm::Vec3f, 2 > &vectors, const vtkm::FloatDefault &length) const
Definition: Particle.h:269
vtkm::ChargedParticle::Sizeof
static size_t Sizeof()
Definition: Particle.h:333
vtkm::ParticleStatus::ClearTookAnySteps
void ClearTookAnySteps()
Definition: Particle.h:51
vtkm::VecVariable
A short variable-length array with maximum length.
Definition: VecVariable.h:30
vtkm::ChargedParticle::SetNumberOfSteps
void SetNumberOfSteps(vtkm::Id numSteps)
Definition: Particle.h:246
vtkm::ChargedParticle::GetTime
vtkm::FloatDefault GetTime() const
Definition: Particle.h:252
mangled_diy_namespace::Serialization< vtkm::Particle >::save
static void save(BinaryBuffer &bb, const vtkm::Particle &p)
Definition: Particle.h:357
vtkm::ParticleStatus::ClearInGhostCell
void ClearInGhostCell()
Definition: Particle.h:55
vtkm::ChargedParticle::operator=
vtkm::ChargedParticle & operator=(const vtkm::ChargedParticle &)=default
Serialization.h
vtkm::ParticleStatus::ClearTerminate
void ClearTerminate()
Definition: Particle.h:39
vtkm::Particle::GetTime
vtkm::FloatDefault GetTime() const
Definition: Particle.h:141
mangled_diy_namespace::Serialization< vtkm::Particle >::load
static void load(BinaryBuffer &bb, vtkm::Particle &p)
Definition: Particle.h:366
vtkm::ChargedParticle::GetStatus
vtkm::ParticleStatus GetStatus() const
Definition: Particle.h:248
vtkm::Particle::Particle
Particle()
Definition: Particle.h:94
vtkm::Particle::Sizeof
static size_t Sizeof()
Definition: Particle.h:176
vtkm::ChargedParticle::SetID
void SetID(vtkm::Id id)
Definition: Particle.h:243
vtkm::ChargedParticle::SPEED_OF_LIGHT
constexpr static vtkm::FloatDefault SPEED_OF_LIGHT
Definition: Particle.h:327
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::ParticleStatus::CheckInGhostCell
bool CheckInGhostCell() const
Definition: Particle.h:56
vtkm::UInt8
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:169
vtkm::ParticleStatus
Definition: Particle.h:23
vtkmNotUsed
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
vtkm::ParticleStatus::CheckTookAnySteps
bool CheckTookAnySteps() const
Definition: Particle.h:52
vtkm::ParticleStatus::SUCCESS_BIT
static constexpr vtkm::Id SUCCESS_BIT
Definition: Particle.h:69
vtkm::Particle::Position
vtkm::Vec3f Position
Definition: Particle.h:169
vtkm::Particle::Time
vtkm::FloatDefault Time
Definition: Particle.h:173
vtkm::ParticleStatus::ParticleStatus
ParticleStatus()
Definition: Particle.h:26
vtkm::ChargedParticle::SetStatus
void SetStatus(vtkm::ParticleStatus status)
Definition: Particle.h:250
vtkm::ChargedParticle::NumSteps
vtkm::Id NumSteps
Definition: Particle.h:320
vtkm::Vec3f
vtkm::Vec< vtkm::FloatDefault, 3 > Vec3f
Vec3f corresponds to a 3-dimensional vector of floating point values.
Definition: Types.h:1055
vtkm::ParticleStatus::CheckZeroVelocity
bool CheckZeroVelocity() const
Definition: Particle.h:60
vtkm::Vec< vtkm::FloatDefault, 3 >
vtkm::Magnitude
detail::FloatingPointReturnType< T >::Type Magnitude(const T &x)
Returns the magnitude of a vector.
Definition: VectorAnalysis.h:100
mangled_diy_namespace::Serialization< vtkm::ChargedParticle >::save
static void save(BinaryBuffer &bb, const vtkm::ChargedParticle &e)
Definition: Particle.h:394
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:236
VecVariable.h
vtkm::Particle::ID
vtkm::Id ID
Definition: Particle.h:170
vtkm::ParticleStatus::ClearSpatialBounds
void ClearSpatialBounds()
Definition: Particle.h:43
vtkm::ParticleStatus::SPATIAL_BOUNDS_BIT
static constexpr vtkm::Id SPATIAL_BOUNDS_BIT
Definition: Particle.h:71
vtkm::ChargedParticle::GetID
vtkm::Id GetID() const
Definition: Particle.h:242
vtkm::ParticleStatus::TERMINATE_BIT
static constexpr vtkm::Id TERMINATE_BIT
Definition: Particle.h:70
vtkm::Particle::Velocity
vtkm::Vec3f Velocity(const vtkm::VecVariable< vtkm::Vec3f, 2 > &vectors, const vtkm::FloatDefault &) const
Definition: Particle.h:145
vtkm::ChargedParticle::ChargedParticle
ChargedParticle(const vtkm::ChargedParticle &other)
Definition: Particle.h:217
vtkm::Particle::GetEvaluationPosition
vtkm::Vec3f GetEvaluationPosition(const vtkm::FloatDefault &deltaT) const
Definition: Particle.h:155
vtkm::ChargedParticle::Time
vtkm::FloatDefault Time
Definition: Particle.h:322
vtkm::ParticleStatus::SetInGhostCell
void SetInGhostCell()
Definition: Particle.h:54
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
vtkm::Particle::GetStatus
vtkm::ParticleStatus & GetStatus()
Definition: Particle.h:138
vtkm::Particle::SetNumberOfSteps
void SetNumberOfSteps(vtkm::Id numSteps)
Definition: Particle.h:135
vtkm::ParticleStatus::SetSpatialBounds
void SetSpatialBounds()
Definition: Particle.h:42
vtkm::Particle::SetID
void SetID(vtkm::Id id)
Definition: Particle.h:132
vtkm::Bitset< vtkm::UInt8 >::set
void set(vtkm::Id bitIndex)
Definition: Bitset.h:30
vtkm::ParticleStatus::CheckTemporalBounds
bool CheckTemporalBounds() const
Definition: Particle.h:48
vtkm::ChargedParticle::~ChargedParticle
~ChargedParticle() noexcept
Definition: Particle.h:233
vtkm::Particle::GetID
vtkm::Id GetID() const
Definition: Particle.h:131
vtkm::ChargedParticle::GetStatus
vtkm::ParticleStatus & GetStatus()
Definition: Particle.h:249
vtkm::Particle::Particle
Particle(const vtkm::Particle &p)
Definition: Particle.h:111
vtkm::Particle::GetNumberOfSteps
vtkm::Id GetNumberOfSteps() const
Definition: Particle.h:134
vtkm::Particle::NumSteps
vtkm::Id NumSteps
Definition: Particle.h:171
vtkm::ParticleStatus::SetTemporalBounds
void SetTemporalBounds()
Definition: Particle.h:46
vtkm::Particle::operator<<
friend std::ostream & operator<<(std::ostream &out, const vtkm::Particle &p)
Definition: Particle.h:161