DimensionedFieldNew.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) 2022 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
29
30template<class Type, class GeoMesh>
33(
34 const word& name,
35 const Mesh& mesh,
36 const dimensionSet& ds,
37 const Field<Type>& iField
38)
39{
41 (
43 (
44 name,
45 mesh.thisDb().time().timeName(),
46 mesh.thisDb(),
47 IOobject::NO_READ,
48 IOobject::NO_WRITE,
49 false
50 ),
51 mesh,
52 ds,
53 iField
54 );
55}
56
57
58template<class Type, class GeoMesh>
61(
62 const word& name,
63 const Mesh& mesh,
64 const dimensionSet& ds,
65 Field<Type>&& iField
66)
67{
69 (
71 (
72 name,
73 mesh.thisDb().time().timeName(),
74 mesh.thisDb(),
75 IOobject::NO_READ,
76 IOobject::NO_WRITE,
77 false
78 ),
79 mesh,
80 ds,
81 std::move(iField)
82 );
83}
84
85
86template<class Type, class GeoMesh>
89(
90 const word& name,
91 const Mesh& mesh,
92 const dimensionSet& ds
93)
94{
96 (
98 (
99 name,
100 mesh.thisDb().time().timeName(),
101 mesh.thisDb(),
102 IOobject::NO_READ,
103 IOobject::NO_WRITE,
104 false
105 ),
106 mesh,
107 ds,
108 false // checkIOFlags = true
109 );
110}
111
112
113template<class Type, class GeoMesh>
116(
117 const word& name,
118 const Mesh& mesh,
119 const dimensioned<Type>& dt
120)
121{
123 (
125 (
126 name,
127 mesh.thisDb().time().timeName(),
128 mesh.thisDb(),
129 IOobject::NO_READ,
130 IOobject::NO_WRITE,
131 false
132 ),
133 mesh,
134 dt,
135 false // checkIOFlags = true
136 );
137}
138
139
140template<class Type, class GeoMesh>
143(
144 const word& newName,
146)
147{
149 (
151 (
152 newName,
153 tfld().instance(),
154 tfld().local(),
155 tfld().db(),
156 IOobject::NO_READ,
157 IOobject::NO_WRITE,
158 false
159 ),
160 tfld
161 );
162}
163
164
165// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
GeoMesh::Mesh Mesh
Type of mesh on which this DimensionedField is instantiated.
Generic templated field type.
Definition: Field.H:82
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