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 \*---------------------------------------------------------------------------*/
27 void Foam::explicitSetValue::setFieldValue
35 DimensionedField<Type, volMesh> rhs
40 Eqn.psi().mesh().time().timeName(),
55 List<Type> values(this->cells().size());
62 Eqn.setValues(this->cells(), values);
67 void Foam::explicitSetValue::addField
69 HashTable<Type>& fields,
70 const wordList& fieldTypes,
71 const wordList& fieldNames,
72 const dictionary& fieldDataDict
75 typedef GeometricField<Type, fvPatchField, volMesh> geometricField;
77 forAll (fieldTypes, fieldI)
79 word fieldName = fieldNames[fieldI];
80 word fieldType = fieldTypes[fieldI];
86 == GeometricField<Type, fvPatchField, volMesh>::typeName
89 this->mesh().foundObject<geometricField>(fieldName)
93 Type fieldValue = fieldDataDict.lookupOrDefault<Type>
99 fields.insert(fieldName, fieldValue);
105 // ************************************************************************* //