Loading...
Searching...
No Matches
exprDriver.H
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) 2010-2018 Bernhard Gschaider
9 Copyright (C) 2019-2022 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
27Class
28 Foam::expressions::exprDriver
29
30Description
31 Base driver for parsing (field) values.
32
33 Largely based on code and ideas from swak4foam
34
35 Properties
36 \table
37 Property | Description | Required | Default
38 variables | List of variables for expressions | no | ()
39 functions<scalar> | Dictionary of scalar Function1 | no | {}
40 functions<vector> | Dictionary of vector Function1 | no | {}
41 allowShadowing | Allow variables to shadow field names | no | false
42 \endtable
43
44 Debug Properties
45 \table
46 Property | Description | Required | Default
47 debug.driver | Debug level (int) for base driver | no |
48 debug.scanner | Add debug for scanner | no | false
49 debug.parser | Add debug for parser | no | false
50 \endtable
51
52 The \c functions<scalar> and \c functions<vector> entries are
53 dictionaries of Foam::Function1 definitions that can either be used
54 to establish a time-varying quantity, to remap a field of scalar
55 values, or both.
56
57SourceFiles
58 exprDriverI.H
59 exprDriverContextI.H
60 exprDriver.C
61 exprDriverFields.C
62 exprDriverFunctions.C
63 exprDriverIO.C
64 exprDriverTemplates.C
65
66\*---------------------------------------------------------------------------*/
67
68#ifndef Foam_expressions_exprDriver_H
69#define Foam_expressions_exprDriver_H
70
71#include "exprResult.H"
72#include "exprString.H"
73#include "exprTraits.H"
74#include "pointField.H"
75#include "primitiveFields.H"
76#include "objectRegistry.H"
77#include "HashTable.H"
78#include "HashSet.H"
79#include "Function1.H"
80
81// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82
83namespace Foam
84{
85
86// Forward Declarations
87class TimeState;
88
89namespace expressions
90{
91
92/*---------------------------------------------------------------------------*\
93 Class exprDriver Declaration
94\*---------------------------------------------------------------------------*/
95
96class exprDriver
97{
98public:
99
100 // Data Types
101
102 //- Search/caching controls
103 enum searchControls
104 {
105 NO_SEARCH = 0,
106 SEARCH_REGISTRY = 1,
107 SEARCH_FILES = 2,
110 };
111
112
113 //- Externally defined context fields
114 typedef HashTable<const regIOobject*> contextObjectTableType;
115
116
117private:
118
119 // Private Member Functions
120
121 //- Get search/caching controls from dictionary entries
122 static int getSearchControls(const dictionary& dict);
123
124 //- Read/reset Function1 entries
125 void resetFunctions(const dictionary& dict);
126
127 //- Helper for lookup of Function1 in table
128 template<class Type>
129 static const Function1<Type>* getFunction1Ptr
130 (
131 const word& name,
132 const HashTable<refPtr<Function1<Type>>>& tbl,
133 wordList* listFailure = nullptr
134 );
135
137protected:
138
139 // Protected Data
140
141 // Stored Data
142
143 //- The dictionary with all input data/specification
144 const dictionary& dict_;
146 //- The result
149 //- Variable definitions, as read from a dictionary
152 //- The variables table
154
155 //- Function1 mappings/timelines (scalar),
156 //- evaluated at the simulation time or with arbitrary scalars
159 //- Function1 mappings/timelines (vector),
160 //- evaluated at the simulation time or with arbitrary scalars
162
163 //- Externally defined context fields
165
166 //- Special-purpose scalar reference argument
167 scalar arg1Value_;
168
169 //- Reference to the time-state
170 mutable const TimeState* timeStatePtr_;
171
172 //- Pointer to an object registry (for functions etc).
173 const objectRegistry* obrPtr_;
174
175
176 // Controls, tracing etc.
177
178 //- Internal bookkeeping as "look-behind" parsing context
179 mutable int stashedTokenId_;
180
181 //- Request debugging for scanner
182 bool debugScanner_;
183
184 //- Request debugging for parser
185 bool debugParser_;
186
187 //- Allow variable names to mask field names
188 bool allowShadowing_;
189
190 //- Use value of previous iteration when oldTime is requested
192
193 //- Registry/disk/caching control
195
197 // Protected Member Functions
198
199 inline bool searchRegistry() const noexcept;
200 inline bool searchFiles() const noexcept;
201 inline bool cacheReadFields() const noexcept;
202
203 //- Reset the time-state reference
204 void resetTimeReference(const TimeState* ts);
205
206 //- Reset the time-state reference
207 void resetTimeReference(const TimeState& ts);
208
209 //- Write scalar/vector Function1 entries in dictionary format
210 void writeFunctions(Ostream& os) const;
212
213 // Variables
214
215 //- Non-const access to the named variable (sub-classes only)
216 inline virtual exprResult& variable(const word& name);
218
219 // Fields
220
221 //- Fill a random field
222 //
223 // \param field the field to populate
224 // \param seed the seed value. If zero or negative, use as an offset
225 // to the current timeIndex (if a time-state is available)
226 // \param gaussian generate a Gaussian distribution
227 void fill_random
230 label seed = 0,
231 const bool gaussian = false
232 ) const;
234 //- Return the location of the min value
236 (
237 const scalarField& vals,
238 const pointField& locs
239 );
240
241 //- Return the location of the max value
244 const scalarField& vals,
245 const pointField& locs
246 );
247
248
249 // Updating
250
251 //- Update things
252 virtual bool update();
253
254 //- Examine current variable values and update stored variables
255 virtual void updateSpecialVariables(bool force=false);
257
258 // Results
259
260 //- Get the result from another driver.
261 // Override to allow mapping
262 virtual exprResult getRemoteResult(const exprDriver& other) const;
263
264
265public:
267 //- Runtime type information
268 TypeName("exprDriver");
269
270
271 // Generated Methods
272
273 //- No copy construct
274 exprDriver(const exprDriver&) = delete;
275
276 //- No copy assignment
277 void operator=(const exprDriver&) = delete;
278
279
280 // Constructors
281
282 //- Default construct, and default construct with search preferences
283 explicit exprDriver
284 (
286 const dictionary& dict = dictionary::null
287 );
288
289 //- Copy construct with new dictionary reference
290 exprDriver(const exprDriver& rhs, const dictionary& dict);
291
292 //- Construct from a dictionary
293 explicit exprDriver(const dictionary& dict);
294
295
296 //- Destructor
297 virtual ~exprDriver() = default;
298
299
300 // Public Member Functions
301
302 //- The natural field size for the expression
303 virtual label size() const
304 {
305 return 1;
306 }
307
308 //- The point field size for the expression
309 virtual label pointSize() const
310 {
311 return 1;
312 }
313
314 //- Reference to the current time-state (can be nullptr)
315 const TimeState* timeState() const noexcept;
316
317 //- The current time value
318 virtual scalar timeValue() const;
319
320 //- The current deltaT value
321 virtual scalar deltaT() const;
322
323
324 //- The dictionary with all input data/specification
325 const dictionary& dict() const noexcept
326 {
327 return dict_;
328 }
329
330 //- Const access to expression result
331 const exprResult& result() const noexcept
332 {
333 return result_;
334 }
335
336 //- Non-const access to expression result
337 exprResult& result() noexcept
338 {
339 return result_;
340 }
341
342 //- Clear the result
343 void clearResult();
344
345 //- Return the expression result as a tmp field
346 // This also clears the result and associated memory.
347 template<class Type>
348 tmp<Field<Type>> getResult(bool wantPointData=false);
349
350 //- The result type as word - same as result().valueType()
351 const word& getResultType() const noexcept
352 {
353 return result_.valueType();
354 }
355
356
357 // External References
358
359 //- Reset the objectRegistry (for functions)
360 void resetDb(const objectRegistry* obrPtr = nullptr);
361
362 //- Reset the objectRegistry (for functions)
363 void resetDb(const objectRegistry& db);
364
365
366 // Specials
367
368 //- Get special-purpose scalar reference argument.
369 // Typically available as \c arg() in an expression and
370 // may correspond to table index, time value etc.
371 inline scalar argValue() const noexcept;
372
373
374 // General Controls
375
376 //- Get "look-behind" parsing context (internal bookkeeping)
377 inline int stashedTokenId() const noexcept;
378
379 //- Reset "look-behind" parsing context (mutable operation)
380 // \return the previous value
381 inline int resetStashedTokenId(int tokenId=0) const noexcept;
383
384 //- Set the scanner/parser debug
385 void setDebugging(bool scannerDebug, bool parserDebug);
386
387 //- Set the scanner/parser debug to match the input
388 void setDebugging(const exprDriver& rhs);
389
390 //- Toggle CACHE_READ_FIELDS control
391 bool setCaching(bool on) noexcept;
392
393 //- Set search behaviour,
394 //- with additional CACHE_READ_FIELDS toggle on
396 (
398 const bool caching = false
399 );
400
401 //- Set search behaviour to be identical to rhs
402 void setSearchBehaviour(const exprDriver& rhs);
403
404 //- Read access to scanner debug
405 inline bool debugScanner() const noexcept;
406
407 //- Read access to parser debug
408 inline bool debugParser() const noexcept;
409
410 bool prevIterIsOldTime() const { return prevIterIsOldTime_; }
411
412
413 // Variables
414
415 //- Clear temporary variables, reset from expression strings
416 virtual void clearVariables();
417
418 //- Set special-purpose scalar reference argument.
419 // Typically available as \c arg() in an expression and
420 // may corrspond to table index, time value etc.
421 inline void setArgument(const scalar val) noexcept;
422
423 //- True if named variable exists
424 inline virtual bool hasVariable(const word& name) const;
425
426 //- Return const-access to the named variable
427 inline virtual const exprResult& variable(const word& name) const;
428
429 //- Add/set string expressions for variables
430 // Can include multiple definitions inline
432 (
433 const expressions::exprString& expr,
434 bool clear = true
435 );
436
437 //- Add/set string expressions for variables
438 // Can include multiple definitions inline
439 void addVariables
440 (
442 bool clear = true
443 );
444
445 //- Add a uniform variable from an outside caller
446 template<class T>
447 inline void addUniformVariable
448 (
449 const word& name,
450 const T& val
451 );
452
453
454 // Context fields (similar to objectRegistry)
456 //- True if any context fields are defined
457 inline bool hasContextObjects() const;
458
459 //- Find named context field, if it exists
460 inline const regIOobject* cfindContextIOobject(const word& name) const;
461
462 //- Find context field object of specified type
463 // \return nullptr if not found
464 template<class ObjType>
465 const ObjType* cfindContextObject(const word& name) const;
466
467 //- Add the object to the context
468 inline void addContextObject(const word& name, const regIOobject*);
469
470 //- Add the object to the context
471 inline void addContextObject(const regIOobject*);
472
473 //- Remove the object from the context
474 inline void removeContextObject(const word& name);
475
476 //- Remove the object from the context
477 inline void removeContextObject(const regIOobject*);
478
479 //- Read access to the object context
480 inline const contextObjectTableType& contextObjects() const noexcept;
481
482 //- Write access to the object context
484
485
486 // Scalar mappings (timelines / lookups)
488 //- Named mapping with given type exists
489 template<class Type>
490 bool isFunction(const word& name) const;
491
492 //- Evaluate named mapping for the given time/value.
493 //- Zero for undefined/unknown
494 template<class Type>
495 Type getFunctionValue(const word& name, const scalar x) const;
496
497 //- Fill result with values remapped according to the named Function1
498 template<class Type>
500 (
501 Field<Type>& result,
502 const word& name,
503 const scalarField& input
504 ) const;
505
506
507 // Fields
508
509 //- Test existence of a local variable
510 template<class T>
511 bool isLocalVariable
512 (
513 const word& name,
514 bool wantPointData = false,
515 label expectedSize = -1
516 ) const;
517
518 //- Retrieve local/global variable as a tmp field
519 //
520 // \param name The name of the local/global field
521 // \param expectSize The size check on the variable, -1 to ignore
522 // \param mandatory A missing variable is Fatal, or return
523 // an invalid tmp
524 template<class Type>
526 (
527 const word& name,
528 label expectSize,
529 const bool mandatory = true
530 ) const;
531
532
533 // Evaluation
534
535 //- Execute the parser.
536 // The return value currently has no meaning.
537 virtual unsigned parse
538 (
539 const std::string& expr,
540 size_t pos = 0,
541 size_t len = std::string::npos
542 ) = 0;
543
544 //- Evaluate the expression and return the field.
545 // This also clears the result and associated memory.
546 template<class Type>
547 inline tmp<Field<Type>>
549 (
550 const expressions::exprString& expr,
551 bool wantPointData = false
552 );
553
554 //- Evaluate the expression and return a single value.
555 // Does not clear the result.
556 template<class Type>
557 inline Type evaluateUniform
558 (
559 const expressions::exprString& expr,
560 bool wantPointData = false
561 );
562
563
564 //- Evaluate the expression
565 //- and save as the specified named variable
567 (
568 const word& varName,
569 const expressions::exprString& expr
570 );
571
572 //- Evaluate an expression on a remote
573 //- and save as the specified named variable
574 virtual void evaluateVariableRemote
575 (
576 string remote,
577 const word& varName,
578 const expressions::exprString& expr
579 );
580
581
582 // Fields
583
584 //- Return a new field with the size()
585 template<class Type>
586 tmp<Field<Type>>
587 newField(const Type& val = pTraits<Type>::zero) const;
588
589 //- Return a new field with the pointSize()
590 template<class Type>
591 tmp<Field<Type>>
592 newPointField(const Type& val = pTraits<Type>::zero) const;
593
594
595 // Reading
596
597 //- Read an expression string and do substitutions
599 (
600 const word& name,
601 const dictionary& dict
602 );
603
604 //- Read the list of variable strings
605 // (or initialize with a single string)
607 (
608 const dictionary& dict,
609 const word& name = "variables",
610 bool mandatory = false
611 );
612
613 //- Read an expression string (with the current dictionary)
614 //- and do substitutions
616
617
618 //- Read variables, tables etc.
619 // Also usable for objects not constructed from a dictionary.
620 virtual bool readDict(const dictionary& dict);
621
622 //- Read "variables" and assigns to the list of expression strings
623 // \return the number variable strings read.
625 (
626 const dictionary& dict,
627 bool mandatory = false
628 );
629
630
631 // Writing
632
633 //- Write "variables"
635 (
636 Ostream& os,
637 const word& keyword = ""
638 ) const;
639};
640
641
642// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
643
644} // End namespace expressions
645} // End namespace Foam
646
647// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
648
649#include "exprDriverI.H"
650#include "exprDriverContextI.H"
651
652#ifdef NoRepository
653 #include "exprDriverTemplates.C"
654#endif
655
656// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
657
658#endif
659
660// ************************************************************************* //
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Definition Function1.H:92
A HashTable similar to std::unordered_map.
Definition HashTable.H:124
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
The time value with time-stepping information, user-defined remapping, etc.
Definition TimeState.H:50
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition UList.H:89
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Base driver for parsing (field) values.
Definition exprDriver.H:137
bool isLocalVariable(const word &name, bool wantPointData=false, label expectedSize=-1) const
Test existence of a local variable.
virtual label size() const
The natural field size for the expression.
Definition exprDriver.H:423
bool searchFiles() const noexcept
void fill_random(scalarField &field, label seed=0, const bool gaussian=false) const
Fill a random field.
bool cacheReadFields() const noexcept
bool debugParser() const noexcept
Read access to parser debug.
static point getPositionOfMaximum(const scalarField &vals, const pointField &locs)
Return the location of the max value.
Ostream & writeVariableStrings(Ostream &os, const word &keyword="") const
Write "variables".
exprResult result_
The result.
Definition exprDriver.H:201
void removeContextObject(const word &name)
Remove the object from the context.
virtual exprResult & variable(const word &name)
Non-const access to the named variable (sub-classes only).
Definition exprDriverI.H:57
virtual void updateSpecialVariables(bool force=false)
Examine current variable values and update stored variables.
Definition exprDriver.C:320
void clearResult()
Clear the result.
Definition exprDriver.C:308
void addVariables(const expressions::exprString &expr, bool clear=true)
Add/set string expressions for variables.
Definition exprDriver.C:372
bool hasContextObjects() const
True if any context fields are defined.
static expressions::exprString readExpression(const word &name, const dictionary &dict)
Read an expression string and do substitutions.
void writeFunctions(Ostream &os) const
Write scalar/vector Function1 entries in dictionary format.
exprResult & result() noexcept
Non-const access to expression result.
Definition exprDriver.H:471
const TimeState * timeState() const noexcept
Reference to the current time-state (can be nullptr).
Definition exprDriver.C:247
void addContextObject(const word &name, const regIOobject *)
Add the object to the context.
virtual label pointSize() const
The point field size for the expression.
Definition exprDriver.H:431
void resetDb(const objectRegistry *obrPtr=nullptr)
Reset the objectRegistry (for functions).
Definition exprDriver.C:135
tmp< Field< Type > > newField(const Type &val=pTraits< Type >::zero) const
Return a new field with the size().
bool searchRegistry() const noexcept
exprDriver(const exprDriver &)=delete
No copy construct.
HashTable< refPtr< Function1< scalar > > > scalarFuncs_
Function1 mappings/timelines (scalar), evaluated at the simulation time or with arbitrary scalars.
Definition exprDriver.H:217
label setVariableStrings(const dictionary &dict, bool mandatory=false)
Read "variables" and assigns to the list of expression strings.
tmp< Field< Type > > getLocalVariable(const word &name, label expectSize, const bool mandatory=true) const
Retrieve local/global variable as a tmp field.
bool debugParser_
Request debugging for parser.
Definition exprDriver.H:261
HashTable< refPtr< Function1< vector > > > vectorFuncs_
Function1 mappings/timelines (vector), evaluated at the simulation time or with arbitrary scalars.
Definition exprDriver.H:223
Type getFunctionValue(const word &name, const scalar x) const
Evaluate named mapping for the given time/value. Zero for undefined/unknown.
bool allowShadowing_
Allow variable names to mask field names.
Definition exprDriver.H:266
searchControls
Search/caching controls.
Definition exprDriver.H:146
@ SEARCH_REGISTRY
Search registry before disk.
Definition exprDriver.H:148
@ SEARCH_FILES
Search disk (eg, standalone app).
Definition exprDriver.H:149
@ CACHE_READ_FIELDS
Cache fields read from disk.
Definition exprDriver.H:150
virtual void evaluateVariableRemote(string remote, const word &varName, const expressions::exprString &expr)
Evaluate an expression on a remote and save as the specified named variable.
Definition exprDriver.C:350
tmp< Field< Type > > evaluate(const expressions::exprString &expr, bool wantPointData=false)
Evaluate the expression and return the field.
bool prevIterIsOldTime_
Use value of previous iteration when oldTime is requested.
Definition exprDriver.H:271
bool debugScanner_
Request debugging for scanner.
Definition exprDriver.H:256
bool debugScanner() const noexcept
Read access to scanner debug.
const ObjType * cfindContextObject(const word &name) const
Find context field object of specified type.
virtual bool readDict(const dictionary &dict)
Read variables, tables etc.
Definition exprDriver.C:290
static point getPositionOfMinimum(const scalarField &vals, const pointField &locs)
Return the location of the min value.
Type evaluateUniform(const expressions::exprString &expr, bool wantPointData=false)
Evaluate the expression and return a single value.
Definition exprDriverI.H:94
List< expressions::exprString > variableStrings_
Variable definitions, as read from a dictionary.
Definition exprDriver.H:206
virtual scalar deltaT() const
The current deltaT value.
Definition exprDriver.C:275
const objectRegistry * obrPtr_
Pointer to an object registry (for functions etc).
Definition exprDriver.H:243
const TimeState * timeStatePtr_
Reference to the time-state.
Definition exprDriver.H:238
const dictionary & dict_
The dictionary with all input data/specification.
Definition exprDriver.H:196
HashTable< exprResult > variables_
The variables table.
Definition exprDriver.H:211
searchControls searchCtrl_
Registry/disk/caching control.
Definition exprDriver.H:276
scalar argValue() const noexcept
Get special-purpose scalar reference argument.
Definition exprDriverI.H:30
void setDebugging(bool scannerDebug, bool parserDebug)
Set the scanner/parser debug.
Definition exprDriver.C:485
int resetStashedTokenId(int tokenId=0) const noexcept
Reset "look-behind" parsing context (mutable operation).
void setSearchBehaviour(enum searchControls search, const bool caching=false)
Set search behaviour, with additional CACHE_READ_FIELDS toggle on.
Definition exprDriver.C:534
virtual exprResult getRemoteResult(const exprDriver &other) const
Get the result from another driver.
Definition exprDriver.C:362
virtual bool update()
Update things.
Definition exprDriver.C:314
void setArgument(const scalar val) noexcept
Set special-purpose scalar reference argument.
Definition exprDriverI.H:24
const contextObjectTableType & contextObjects() const noexcept
Read access to the object context.
const exprResult & result() const noexcept
Const access to expression result.
Definition exprDriver.H:463
int stashedTokenId() const noexcept
Get "look-behind" parsing context (internal bookkeeping).
void evaluateVariable(const word &varName, const expressions::exprString &expr)
Evaluate the expression and save as the specified named variable.
Definition exprDriver.C:332
void resetTimeReference(const TimeState *ts)
Reset the time-state reference.
Definition exprDriver.C:123
virtual void clearVariables()
Clear temporary variables, reset from expression strings.
Definition exprDriver.C:324
contextObjectTableType contextObjects_
Externally defined context fields.
Definition exprDriver.H:228
bool isFunction(const word &name) const
Named mapping with given type exists.
const regIOobject * cfindContextIOobject(const word &name) const
Find named context field, if it exists.
virtual bool hasVariable(const word &name) const
True if named variable exists.
Definition exprDriverI.H:37
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)=0
Execute the parser.
static List< expressions::exprString > readVariableStrings(const dictionary &dict, const word &name="variables", bool mandatory=false)
Read the list of variable strings.
const dictionary & dict() const noexcept
The dictionary with all input data/specification.
Definition exprDriver.H:455
void fillFunctionValues(Field< Type > &result, const word &name, const scalarField &input) const
Fill result with values remapped according to the named Function1.
virtual scalar timeValue() const
The current time value.
Definition exprDriver.C:261
const word & getResultType() const noexcept
The result type as word - same as result().valueType().
Definition exprDriver.H:492
HashTable< const regIOobject * > contextObjectTableType
Externally defined context fields.
Definition exprDriver.H:158
bool setCaching(bool on) noexcept
Toggle CACHE_READ_FIELDS control.
Definition exprDriver.C:505
tmp< Field< Type > > getResult(bool wantPointData=false)
Return the expression result as a tmp field.
int stashedTokenId_
Internal bookkeeping as "look-behind" parsing context.
Definition exprDriver.H:251
void addUniformVariable(const word &name, const T &val)
Add a uniform variable from an outside caller.
tmp< Field< Type > > newPointField(const Type &val=pTraits< Type >::zero) const
Return a new field with the pointSize().
scalar arg1Value_
Special-purpose scalar reference argument.
Definition exprDriver.H:233
TypeName("exprDriver")
Runtime type information.
A polymorphic field/result from evaluating an expression.
Definition exprResult.H:122
A variant of Foam::string with expansion of dictionary variables into a comma-separated form.
Definition exprString.H:58
Registry of regIOobjects.
A traits class, which is primarily used for primitives and vector-space.
Definition pTraits.H:64
A class for managing references or pointers (no reference counting).
Definition refPtr.H:54
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition regIOobject.H:71
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
rDeltaTY field()
OBJstream os(runTime.globalPath()/outputName)
auto & name
surface1 clear()
A namespace for expression-related classes/traits etc.
Namespace for OpenFOAM.
dimensionedScalar pos(const dimensionedScalar &ds)
List< word > wordList
List of word.
Definition fileName.H:60
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vector point
Point is a vector.
Definition point.H:37
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
vectorField pointField
pointField is a vectorField.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
Definition fileName.C:642
Specialisations of Field<T> for scalar, vector and tensor.
dictionary dict