Report patch name instead of index in debug
[foam-extend-3.2.git] / src / foam / fields / UniformDimensionedFields / UniformDimensionedField.C
blobd7c0d84cd0c203567c039f4ae431315c0dad5ba7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "UniformDimensionedField.H"
28 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
30 template<class Type>
31 Foam::UniformDimensionedField<Type>::UniformDimensionedField
33     const IOobject& io,
34     const dimensioned<Type>& dt
37     regIOobject(io),
38     dimensioned<Type>(dt)
42 template<class Type>
43 Foam::UniformDimensionedField<Type>::UniformDimensionedField
45     const UniformDimensionedField<Type>& rdt
48     regIOobject(rdt),
49     dimensioned<Type>(rdt)
53 template<class Type>
54 Foam::UniformDimensionedField<Type>::UniformDimensionedField
56     const IOobject& io
59     regIOobject(io),
60     dimensioned<Type>(regIOobject::name(), dimless, pTraits<Type>::zero)
62     dictionary dict(readStream(typeName));
63     this->dimensions().reset(dict.lookup("dimensions"));
64     this->value() = dict.lookup("value");
68 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
70 template<class Type>
71 Foam::UniformDimensionedField<Type>::~UniformDimensionedField()
75 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
77 template<class Type>
78 bool Foam::UniformDimensionedField<Type>::writeData(Ostream& os) const
80     os.writeKeyword("dimensions") << this->dimensions() << token::END_STATEMENT
81         << nl;
82     os.writeKeyword("value") << this->value() << token::END_STATEMENT
83         << nl << nl;
85     return (os.good());
89 // * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * * //
91 template<class Type>
92 void Foam::UniformDimensionedField<Type>::operator=
94     const UniformDimensionedField<Type>& rhs
97     dimensioned<Type>::operator=(rhs);
101 template<class Type>
102 void Foam::UniformDimensionedField<Type>::operator=
104     const dimensioned<Type>& rhs
107     dimensioned<Type>::operator=(rhs);
111 // ************************************************************************* //