chombo-discharge
Loading...
Searching...
No Matches
CD_NonCommParticleImplem.H
Go to the documentation of this file.
1/* chombo-discharge
2 * Copyright © 2022 SINTEF Energy Research.
3 * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4 */
5
12#ifndef CD_NonCommParticleImplem_H
13#define CD_NonCommParticleImplem_H
14
15// Our includes
16#include <CD_NonCommParticle.H>
17#include <CD_NamespaceHeader.H>
18
19template <size_t M, size_t N>
21{
22 for (auto& s : m_scalars) {
23 s = 0.0;
24 }
25
26 for (auto& v : m_vectors) {
28 }
29}
30
31template <size_t M, size_t N>
33{
34 this->m_scalars = a_other.m_scalars;
35 this->m_vectors = a_other.m_vectors;
36}
37
38template <size_t M, size_t N>
41
42template <size_t M, size_t N>
43template <size_t K>
44inline Real&
46{
47 return std::get<K>(m_scalars);
48}
49
50template <size_t M, size_t N>
51template <size_t K>
52inline const Real&
54{
55 return std::get<K>(m_scalars);
56}
57
58template <size_t M, size_t N>
59template <size_t K>
60inline RealVect&
62{
63 return std::get<K>(m_vectors);
64}
65
66template <size_t M, size_t N>
67template <size_t K>
68inline const RealVect&
70{
71 return std::get<K>(m_vectors);
72}
73
74template <size_t M, size_t N>
75inline bool
77{
78 return (m_scalars = a_other.m_scalars) && (m_vectors == a_other.m_vectors);
79}
80
81template <size_t M, size_t N>
82inline bool
84{
85 return !(*this == a_other);
86}
87
88#include <CD_NamespaceFooter.H>
89
90#endif
Declaration of a generic particle class.
bool operator!=(const NonCommParticle< M, N > &a_other) const
Comparison operator with other particle.
Definition CD_NonCommParticleImplem.H:83
RealVect & vect()
Get one of the RealVects.
Definition CD_NonCommParticleImplem.H:61
NonCommParticle()
Default constructor – initializes everything to zero.
Definition CD_NonCommParticleImplem.H:20
bool operator==(const NonCommParticle< M, N > &a_other) const
Comparison operator with other particle.
Definition CD_NonCommParticleImplem.H:76
virtual ~NonCommParticle()
Destructor (deallocates runtime memory storage)
Definition CD_NonCommParticleImplem.H:39
Real & real()
Get one of the scalars.
Definition CD_NonCommParticleImplem.H:45
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:37
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:25