1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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 #include "SubModelBase.H"
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 template<class CloudType>
31 Foam::SubModelBase<CloudType>::SubModelBase(CloudType& owner)
34 dict_(dictionary::null),
35 coeffDict_(dictionary::null)
39 template<class CloudType>
40 Foam::SubModelBase<CloudType>::SubModelBase
43 const dictionary& dict,
50 coeffDict_(dict.subDict(name + dictExt))
54 template<class CloudType>
55 Foam::SubModelBase<CloudType>::SubModelBase(const SubModelBase<CloudType>& smb)
59 coeffDict_(smb.coeffDict_)
63 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
65 template<class CloudType>
66 Foam::SubModelBase<CloudType>::~SubModelBase()
70 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
72 template<class CloudType>
73 const CloudType& Foam::SubModelBase<CloudType>::owner() const
79 template<class CloudType>
80 const Foam::dictionary& Foam::SubModelBase<CloudType>::dict() const
86 template<class CloudType>
87 const Foam::dictionary& Foam::SubModelBase<CloudType>::coeffDict() const
93 template<class CloudType>
94 bool Foam::SubModelBase<CloudType>::defaultCoeffs(const bool printMsg) const
96 bool def = coeffDict_.lookupOrDefault<bool>("defaultCoeffs", false);
100 Info<< indent << "Employing default coefficients" << endl;
108 template<class CloudType>
109 CloudType& Foam::SubModelBase<CloudType>::owner()
115 template<class CloudType>
116 bool Foam::SubModelBase<CloudType>::active() const
122 template<class CloudType>
123 void Foam::SubModelBase<CloudType>::cacheFields(const bool)
129 template<class CloudType>
130 void Foam::SubModelBase<CloudType>::write(Ostream& os) const
132 os.writeKeyword("owner") << owner_.name() << token::END_STATEMENT << nl;
134 // not writing complete cloud dictionary, only coeffs
140 // ************************************************************************* //