BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / parcels / Templates / ThermoParcel / ThermoParcelTrackingDataI.H
blob34c30dd35667f2d6e4f4d14ce0bdcf292440f7b7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 \*---------------------------------------------------------------------------*/
26 template<class ParcelType>
27 template<class CloudType>
28 inline Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::TrackingData
30     CloudType& cloud,
31     trackPart part
34     ParcelType::template TrackingData<CloudType>(cloud, part),
35     Cp_(cloud.thermo().thermo().Cp()),
36     TInterp_
37     (
38         interpolation<scalar>::New
39         (
40             cloud.solution().interpolationSchemes(),
41             cloud.T()
42         )
43     ),
44     CpInterp_
45     (
46         interpolation<scalar>::New
47         (
48             cloud.solution().interpolationSchemes(),
49             Cp_
50         )
51     ),
52     GInterp_(NULL)
54     if (cloud.radiation())
55     {
56         GInterp_.reset
57         (
58             interpolation<scalar>::New
59             (
60                 cloud.solution().interpolationSchemes(),
61                 cloud.mesh().objectRegistry::template
62                     lookupObject<volScalarField>("G")
63             ).ptr()
64         );
65     }
69 template<class ParcelType>
70 template<class CloudType>
71 inline const Foam::volScalarField&
72 Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::Cp() const
74     return Cp_;
78 template<class ParcelType>
79 template<class CloudType>
80 inline const Foam::interpolation<Foam::scalar>&
81 Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::TInterp() const
83     return TInterp_();
87 template<class ParcelType>
88 template<class CloudType>
89 inline const Foam::interpolation<Foam::scalar>&
90 Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::CpInterp() const
92     return CpInterp_();
96 template<class ParcelType>
97 template<class CloudType>
98 inline const Foam::interpolation<Foam::scalar>&
99 Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::GInterp() const
101     if (!GInterp_.valid())
102     {
103         FatalErrorIn
104         (
105             "inline const Foam::interpolation<Foam::scalar>&"
106             "Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::"
107             "GInterp() const"
108         )   << "Radiation G interpolation object not set"
109             << abort(FatalError);
110     }
112     return GInterp_();
116 // ************************************************************************* //