GeometricFieldNew.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2017 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
30
31template<class Type, template<class> class PatchField, class GeoMesh>
34(
35 const word& name,
36 const Mesh& mesh,
37 const dimensionSet& ds,
38 const word& patchFieldType
39)
40{
42 (
44 (
45 name,
46 mesh.thisDb().time().timeName(),
47 mesh.thisDb(),
48 IOobject::NO_READ,
49 IOobject::NO_WRITE,
50 false
51 ),
52 mesh,
53 ds,
54 patchFieldType
55 );
56}
57
58
59template<class Type, template<class> class PatchField, class GeoMesh>
62(
63 const word& name,
64 const Mesh& mesh,
65 const dimensionSet& ds,
66 const Field<Type>& iField,
67 const word& patchFieldType
68)
69{
71 (
73 (
74 name,
75 mesh.thisDb().time().timeName(),
76 mesh.thisDb(),
77 IOobject::NO_READ,
78 IOobject::NO_WRITE,
79 false
80 ),
81 mesh,
82 ds,
83 iField,
84 patchFieldType
85 );
86}
87
88
89template<class Type, template<class> class PatchField, class GeoMesh>
92(
93 const word& name,
94 const Mesh& mesh,
95 const dimensionSet& ds,
96 Field<Type>&& iField,
97 const word& patchFieldType
98)
99{
101 (
103 (
104 name,
105 mesh.thisDb().time().timeName(),
106 mesh.thisDb(),
107 IOobject::NO_READ,
108 IOobject::NO_WRITE,
109 false
110 ),
111 mesh,
112 ds,
113 std::move(iField),
114 patchFieldType
115 );
116}
117
118
119template<class Type, template<class> class PatchField, class GeoMesh>
122(
123 const word& name,
124 const Mesh& mesh,
125 const dimensioned<Type>& dt,
126 const word& patchFieldType
127)
128{
130 (
132 (
133 name,
134 mesh.thisDb().time().timeName(),
135 mesh.thisDb(),
136 IOobject::NO_READ,
137 IOobject::NO_WRITE,
138 false
139 ),
140 mesh,
141 dt,
142 patchFieldType
143 );
144}
145
146
147template<class Type, template<class> class PatchField, class GeoMesh>
150(
151 const word& name,
152 const Mesh& mesh,
153 const dimensioned<Type>& dt,
154 const wordList& patchFieldTypes,
155 const wordList& actualPatchTypes
156)
157{
159 (
161 (
162 name,
163 mesh.thisDb().time().timeName(),
164 mesh.thisDb(),
165 IOobject::NO_READ,
166 IOobject::NO_WRITE,
167 false
168 ),
169 mesh,
170 dt,
171 patchFieldTypes,
172 actualPatchTypes
173 );
174}
175
176
177template<class Type, template<class> class PatchField, class GeoMesh>
180(
181 const word& newName,
183)
184{
186 (
188 (
189 newName,
190 tgf().instance(),
191 tgf().local(),
192 tgf().db(),
193 IOobject::NO_READ,
194 IOobject::NO_WRITE,
195 false
196 ),
197 tgf
198 );
199}
200
201
202template<class Type, template<class> class PatchField, class GeoMesh>
205(
206 const word& newName,
208 const wordList& patchFieldTypes,
209 const wordList& actualPatchTypes
210)
211{
213 (
215 (
216 newName,
217 tgf().instance(),
218 tgf().local(),
219 tgf().db(),
220 IOobject::NO_READ,
221 IOobject::NO_WRITE,
222 false
223 ),
224 tgf,
225 patchFieldTypes,
226 actualPatchTypes
227 );
228}
229
230
231// ************************************************************************* //
Generic templated field type.
Definition: Field.H:82
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:49
Generic GeometricField class.
GeoMesh::Mesh Mesh
The mesh type for the GeometricField.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:109
Generic dimensioned Type class.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59