FreeFOAM The Cross-Platform CFD Toolkit
fieldAverageItem.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "fieldAverageItem.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 template<>
32 {
33  "iteration",
34  "time"
35 };
36 
38  Foam::fieldAverageItem::baseTypeNames_;
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
45  fieldName_("unknown"),
46  mean_(0),
47  prime2Mean_(0),
48  base_(ITER)
49 {}
50 
51 
53 :
54  fieldName_(faItem.fieldName_),
55  mean_(faItem.mean_),
56  prime2Mean_(faItem.prime2Mean_),
57  base_(faItem.base_)
58 {}
59 
60 
61 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
62 
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
68 
70 {
71  // Check for assignment to self
72  if (this == &rhs)
73  {
75  (
76  "Foam::fieldAverageItem::operator=(const Foam::fieldAverageItem&)"
77  ) << "Attempted assignment to self" << nl
78  << abort(FatalError);
79  }
80 
81  // Set updated values
82  fieldName_ = rhs.fieldName_;
83  mean_ = rhs.mean_;
84  prime2Mean_ = rhs.prime2Mean_;
85  base_ = rhs.base_;
86 }
87 
88 
89 // ************************ vim: set sw=4 sts=4 et: ************************ //