PairCollisionRecord.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "PairCollisionRecord.H"
30
31// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
33template<class Type>
35:
36 origProcOfOther_(0),
37 origIdOfOther_(-1),
38 data_(Zero)
39{}
40
41
42template<class Type>
44(
45 bool accessed,
46 label origProcOfOther,
47 label origIdOfOther,
48 const Type& data
49)
50:
51 origProcOfOther_(origProcOfOther + 1),
52 origIdOfOther_(origIdOfOther),
53 data_(data)
54{
55 // Default assignment to origProcOfOther_ assumes accessed is true
56
57 if (!accessed)
58 {
60 }
61}
62
63
64template<class Type>
66(
68)
69:
70 origProcOfOther_(pCR.origProcOfOther_),
71 origIdOfOther_(pCR.origIdOfOther_),
72 data_(pCR.data_)
73{}
74
75
76// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
77
78template<class Type>
80{}
81
82
83// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
84
85template<class Type>
87(
89)
90{
91 if (this == &rhs)
92 {
93 return; // Self-assignment is a no-op
94 }
95
96 origProcOfOther_ = rhs.origProcOfOther_;
97 origIdOfOther_ = rhs.origIdOfOther_;
98 data_ = rhs.data_;
99}
100
101
102// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
103
105
106
107// ************************************************************************* //
Record of a collision between the particle holding the record and the particle with the stored id.
PairCollisionRecord()
Construct null.
bool accessed() const
Return the accessed status of the record.
void setUnaccessed()
Set the accessed property of the record to unaccessed.
Database for solution data, solver performance and other reduced data.
Definition: data.H:58