Loading...
Searching...
No Matches
ITstream.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) 2011-2016,2024 OpenFOAM Foundation
9 Copyright (C) 2017-2025 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::ITstream
29
30Description
31 An input stream of tokens.
32
33 Although ITstream is principally meant to be used as a read-only
34 input stream, it also provides additional methods to help when
35 composing its contents (eg, when parsing).
36
37SourceFiles
38 ITstream.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef Foam_ITstream_H
43#define Foam_ITstream_H
44
45#include "Istream.H"
46#include "tokenList.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
53/*---------------------------------------------------------------------------*\
54 Class ITstream Declaration
55\*---------------------------------------------------------------------------*/
56
57class ITstream
58:
59 public Istream,
60 public tokenList
61{
62 // Private Data
63
64 //- Name associated with the stream
65 fileName name_;
66
67 //- Index of token currently being read
68 label tokenIndex_;
69
70
71 // Private Member Functions
72
73 //- An ad hoc combination of reserve and setCapacity somewhat
74 //- similar to DynamicList.
75 //
76 // Increase list size if needed,
77 // but leave any excess capacity (ie, like reserve).
78 void reserveCapacity(const label newCapacity);
79
80 //- Convert input sequence into a list of tokens.
81 // Includes nullptr guard
82 static tokenList parse_chars
83 (
84 const char* s,
85 size_t nbytes,
86 IOstreamOption streamOpt
87 );
88
89 //- Convert input sequence into a list of tokens,
90 //- using the existing stream format. Rewinds the stream
91 // Includes nullptr guard
92 void reset(const char* input, size_t nbytes);
93
94 //- Failsafe read-access to token at specified location
95 //- or undefinedToken
96 inline const token& peekNoFail(const label i) const noexcept
97 {
98 return
99 (
100 (i >= 0 && i < tokenList::size())
101 ? tokenList::cdata()[i]
103 );
104 }
105
106
107public:
108
109 // Constructors
110
111 //- Copy construct
112 ITstream(const ITstream& is);
113
114 //- Move construct
115 ITstream(ITstream&& is);
116
117 //- Default construct. Empty stream, optionally with given name
118 explicit ITstream
119 (
120 IOstreamOption streamOpt = IOstreamOption(),
121 const string& name = "input"
122 );
123
124 //- Construct empty, optionally with given name
125 explicit ITstream
126 (
128 const string& name = "input",
129 IOstreamOption streamOpt = IOstreamOption()
130 );
131
132 //- Copy construct from tokens, optionally with given name
133 explicit ITstream
134 (
135 const UList<token>& tokens,
136 IOstreamOption streamOpt = IOstreamOption(),
137 const string& name = "input"
138 );
139
140 //- Move construct from tokens, optionally with given name
141 explicit ITstream
142 (
143 List<token>&& tokens,
144 IOstreamOption streamOpt = IOstreamOption(),
145 const string& name = "input"
146 );
147
148 //- Construct token list by parsing the input character sequence
149 // Uses static parse function internally.
150 explicit ITstream
151 (
152 const UList<char>& input,
153 IOstreamOption streamOpt = IOstreamOption(),
154 const string& name = "input"
155 );
156
157 //- Construct token list by parsing the input character sequence
158 // Uses static parse function internally.
159 explicit ITstream
160 (
161 const char* input,
162 IOstreamOption streamOpt = IOstreamOption(),
163 const string& name = "input"
164 );
165
166 //- Construct token list by parsing the input character sequence
167 // Uses static parse function internally.
168 explicit ITstream
169 (
170 std::string_view s,
171 IOstreamOption streamOpt = IOstreamOption(),
172 const string& name = "input"
173 )
174 :
175 ITstream(streamOpt, name)
176 {
177 reset(s.data(), s.size());
178 }
179
180
181 // Additional constructors
182
183 //- Copy construct from tokens, with given name
185 (
186 const string& name,
187 const UList<token>& tokens,
188 IOstreamOption streamOpt = IOstreamOption()
189 )
190 :
191 ITstream(tokens, streamOpt, name)
192 {}
193
194 //- Move construct from tokens, with given name
196 (
197 const string& name,
198 List<token>&& tokens,
200 )
201 :
202 ITstream(std::move(tokens), streamOpt, name)
203 {}
204
205
206 //- Destructor
207 virtual ~ITstream() = default;
208
209
210 // Static Functions
211
212 //- Return reference to an empty ITstream, for functions needing to
213 //- return an ITstream reference but which don't have anything valid
214 //- of their own. <b>The stream shall be considered \em read-only.</b>
215 //
216 // The returned stream has no tokens and has a 'bad' state,
217 // to indicate that it is invalid for reading.
218 //
219 // \caution the caller is still able to modify its contents,
220 // but they should not do that!
221 static ITstream& empty_stream();
222
223 //- Create token list by parsing the input character sequence
224 //- until no good tokens remain.
225 static tokenList parse
226 (
227 const UList<char>& input,
228 IOstreamOption streamOpt = IOstreamOption()
229 )
231 return parse_chars(input.cdata(), input.size(), streamOpt);
232 }
233
234 //- Create token list by parsing the input character sequence
235 //- until no good tokens remain.
236 static tokenList parse
237 (
238 const char* input,
239 IOstreamOption streamOpt = IOstreamOption()
240 )
241 {
242 if (input)
243 {
244 return parse_chars(input, strlen(input), streamOpt);
245 }
246 else
247 {
248 return tokenList();
249 }
250 }
251
252 //- Create token list by parsing the input character sequence
253 //- until no good tokens remain.
254 static tokenList parse
255 (
256 std::string_view s,
257 IOstreamOption streamOpt = IOstreamOption()
258 )
259 {
260 return parse_chars(s.data(), s.size(), streamOpt);
261 }
262
263
264 // Member Functions
265
266 // Characteristics
268 //- The name of the input token stream.
269 virtual const fileName& name() const override { return name_; }
270
271 //- The name of the input token stream, for modification.
272 virtual fileName& name() { return name_; }
273
274 //- The line number of the first token in stream
275 label startLineNumber() const
276 {
277 return (tokenList::empty() ? -1 : tokenList::front().lineNumber());
278 }
279
280 //- The line number of the last token in stream
281 label endLineNumber() const
282 {
283 return (tokenList::empty() ? -1 : tokenList::back().lineNumber());
284 }
285
286
287 // Token Access
288
289 //- The token contents (read-only access)
290 const tokenList& tokens() const noexcept { return *this; }
291
292 //- The token contents (read/write access)
293 tokenList& tokens() noexcept { return *this; }
294
295
296 //- True if putback token is in use
297 bool hasPutback() const noexcept { return Istream::hasPutback(); }
298
299 //- Failsafe peek at the token at the \b front of the tokenList
300 // \return \c undefinedToken if the list is empty.
301 const token& front() const noexcept
302 {
303 return peekNoFail(0);
304 }
305
306 //- Failsafe peek at the token at the \b back of the tokenList
307 // \return \c undefinedToken if the list is empty.
308 const token& back() const noexcept
309 {
310 return peekNoFail(tokenList::size()-1);
311 }
312
313 //- Failsafe peek at what the next read would return,
314 //- including handling of any putback
315 // \return \c undefinedToken if list is exhausted
316 const token& peek() const noexcept;
318 //- Read access to the token at the current tokenIndex.
319 //- \returns \c undefinedToken if list is exhausted
320 const token& currentToken() const noexcept
321 {
322 return peekNoFail(tokenIndex_);
323 }
324
325 //- Write access to the token at the current tokenIndex.
326 //- Fatal if not in range
328
329 //- Failsafe read access to token at given position in the tokenList
330 // \return \c undefinedToken for out-of-range
331 const token& peekToken(const label i) const { return peekNoFail(i); };
332
333 //- The current token index when reading, or the insertion point.
334 label tokenIndex() const noexcept { return tokenIndex_; }
336 //- Non-const access to the current token index
337 label& tokenIndex() noexcept { return tokenIndex_; }
338
339 //- Set the token index (no checks). \return the previous value
340 label tokenIndex(label num) noexcept
341 {
342 label old(tokenIndex_);
343 tokenIndex_ = num;
344 return old;
345 }
347 //- Number of tokens remaining
348 label nRemainingTokens() const noexcept
349 {
350 return (tokenList::size() - tokenIndex_);
352
353 //- Move tokenIndex to the specified position
354 //- and adjust the stream status (open/good/eof ...)
355 // Using seek(0) is identical to rewind().
356 // Using seek(-1) moves to the end.
357 void seek(label pos) noexcept;
358
359 //- Move tokenIndex relative to the current position.
360 // Will not overrun the beginning (0) or one-past end positions.
361 //
362 // Use skip(2) to move forward two tokens.
363 // Use skip(-2) to move backward two tokens.
364 // \return True if the indexing completed without underflow/overflow
365 bool skip(label n = 1) noexcept;
366
367
368 // Searching
369
370 //- Regular searching
371 using tokenList::find;
372
373 //- Find range containing matching delimiter pair, starting at the
374 //- specified position. The position -1 indicates to continue
375 //- from the present tokenIndex() position.
377 (
378 const token::punctuationToken delimOpen,
379 const token::punctuationToken delimClose,
380 label pos = 0
381 ) const;
382
383 //- Find compoundToken of specified Type, starting at the
384 //- specified position. The position -1 indicates to continue
385 //- from the present tokenIndex() position.
386 // \return nullptr if not found
387 template<class Type>
388 const Type* findCompound(label pos = 0) const;
389
390
391 // Token list modification
392
393 //- Remove a (start,size) subset from the list and move remaining
394 //- elements down.
395 // If the tokenIndex() is within or to the right of the removed
396 // region, it will be adjusted to remain valid. However, this may
397 // not correspond to the expected parsing point so external bookkeeping
398 // is likely necessary.
399 // \note The range is subsetted with the list size itself to ensure
400 // the result always addresses a valid section of the list.
402
403 //- Remove a (start,size) subset from the list and move remaining
404 //- elements down.
405 // If the tokenIndex() is within or to the right of the removed
406 // region, it will be adjusted to remain valid. However, this may
407 // not correspond to the expected parsing point so external bookkeeping
408 // is likely necessary.
409 // \note The range is subsetted with the list size itself to ensure
410 // the result always addresses a valid section of the list.
411 label remove(const labelRange& range);
413 //- Copy append a token at the current tokenIndex,
414 //- incrementing the index.
415 void add_tokens(const token& tok);
416
417 //- Move append a token at the current tokenIndex,
418 //- incrementing the index.
419 void add_tokens(token&& tok);
420
421 //- Copy append a list of tokens at the current tokenIndex,
422 //- incrementing the index.
423 void add_tokens(const UList<token>& toks);
424
425 //- Move append a list of tokens at the current tokenIndex,
426 //- incrementing the index.
427 void add_tokens(List<token>&& toks);
428
429
430 // Stream State Functions
431
432 //- Return current stream flags.
433 //- Dummy for token stream, returns 0.
434 virtual std::ios_base::fmtflags flags() const override
435 {
436 return std::ios_base::fmtflags(0);
437 }
438
439 //- Set stream flags, return old stream flags.
440 //- Dummy for token stream, returns 0.
441 std::ios_base::fmtflags flags(std::ios_base::fmtflags) override
442 {
443 return std::ios_base::fmtflags(0);
444 }
445
446
447 // Read Functions
448
449 //- Return next token from stream
450 virtual Istream& read(token& tok) override;
451
452 //- Read a character : triggers not implemented error
453 virtual Istream& read(char&) override;
454
455 //- Read a word : triggers not implemented error
456 virtual Istream& read(word&) override;
457
458 //- Read a string (including enclosing double-quotes) :
459 //- triggers not implemented error
460 virtual Istream& read(string&) override;
461
462 //- Read int32_t : triggers not implemented error
463 virtual Istream& read(int32_t&) override;
464
465 //- Read int64_t : triggers not implemented error
466 virtual Istream& read(int64_t&) override;
467
468 //- Read uint32_t : triggers not implemented error
469 virtual Istream& read(uint32_t&) override;
470
471 //- Read uint64_t : triggers not implemented error
472 virtual Istream& read(uint64_t&) override;
473
474 //- Read a float : triggers not implemented error
475 virtual Istream& read(float&) override;
476
477 //- Read a double : triggers not implemented error
478 virtual Istream& read(double&) override;
479
480 //- Read binary block : triggers not implemented error
481 virtual Istream& read(char* data, std::streamsize) override;
482
483 //- Low-level raw binary read : triggers not implemented error
484 virtual Istream& readRaw(char* data, std::streamsize count) override;
485
486 //- Start of low-level raw binary read : no-op
487 virtual bool beginRawRead() override { return false; }
488
489 //- End of low-level raw binary read : no-op
490 virtual bool endRawRead() override { return false; }
491
492 //- Rewind the stream so that it may be read again. Same as seek(0)
493 virtual void rewind() override
494 {
497 }
498
499
500 // Output
501
502 //- Print stream description to Ostream
503 void print(Ostream& os) const override;
504
505 //- Concatenate tokens into a space-separated std::string.
506 //- The resulting string may contain quote characters.
507 std::string toString() const;
508
509
510 // Member Operators
511
512 //- Return a non-const reference to const Istream
513 using Istream::operator();
514
515 //- Copy assignment, with rewind()
516 void operator=(const ITstream& is);
517
518 //- Copy assignment of tokens, with rewind()
519 void operator=(const UList<token>& toks);
520
521 //- Move assignment of tokens, with rewind()
522 void operator=(List<token>&& toks);
523
524
525 // Additional constructors and methods (as per v2012 and earlier)
526 #ifdef Foam_IOstream_extras
527
528 //- Construct from components, copying the tokens
530 (
531 const string& name,
532 const UList<token>& tokens,
534 )
535 :
537 {}
538
539 //- Construct from components, transferring the tokens
541 (
542 const string& name,
543 List<token>&& tokens,
545 )
546 :
548 {}
549
550 #endif /* Foam_IOstream_extras */
551
552
553 // Housekeeping
554
555 //- Same as front()
556 FOAM_DEPRECATED_STRICT(2022-11, "front()")
557 const token& peekFirst() const { return front(); }
558
559 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
560 void append(const token& t, bool) { add_tokens(t); }
561
562 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
563 void append(token&& t, bool) { add_tokens(std::move(t)); }
564
565 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
566 void append(const UList<token>& t, bool) { add_tokens(t); }
567
568 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
569 void append(List<token>&& t, bool) { add_tokens(std::move(t)); }
570
571 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
572 void push_back(const token& t, bool) { add_tokens(t); }
573
574 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
575 void push_back(token&& t, bool) { add_tokens(std::move(t)); }
576
577 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
578 void push_back(const UList<token>& t, bool) { add_tokens(t); }
579
580 FOAM_DEPRECATED_STRICT(2023-10, "add_tokens()")
581 void push_back(List<token>&& t, bool) { add_tokens(std::move(t)); }
582};
583
584
585// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
586
587} // End namespace Foam
588
589// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
590
591#include "ITstreamI.H"
592
593// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
594
595#endif
596
597// ************************************************************************* //
scalar range
label n
A simple container for options an IOstream can normally have.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression.
streamFormat
Data format (ascii | binary | coherent).
label lineNumber() const noexcept
Const access to the current stream line number.
Definition IOstream.H:409
An input stream of tokens.
Definition ITstream.H:56
virtual const fileName & name() const override
The name of the input token stream.
Definition ITstream.H:317
virtual std::ios_base::fmtflags flags() const override
Return current stream flags. Dummy for token stream, returns 0.
Definition ITstream.H:547
virtual fileName & name()
The name of the input token stream, for modification.
Definition ITstream.H:322
std::ios_base::fmtflags flags(std::ios_base::fmtflags) override
Set stream flags, return old stream flags. Dummy for token stream, returns 0.
Definition ITstream.H:556
void append(const token &t, bool)
Definition ITstream.H:723
const Type * findCompound(label pos=0) const
Find compoundToken of specified Type, starting at the specified position. The position -1 indicates t...
Definition ITstreamI.H:22
std::string toString() const
Concatenate tokens into a space-separated std::string. The resulting string may contain quote charact...
Definition ITstream.C:289
label remove(const labelRange &range)
Remove a (start,size) subset from the list and move remaining elements down.
Definition ITstream.C:573
const token & front() const noexcept
Failsafe peek at the token at the front of the tokenList.
Definition ITstream.H:364
label tokenIndex(label num) noexcept
Set the token index (no checks).
Definition ITstream.H:422
virtual bool beginRawRead() override
Start of low-level raw binary read : no-op.
Definition ITstream.H:628
virtual Istream & read(token &tok) override
Return next token from stream.
Definition ITstream.C:432
ITstream(std::string_view s, IOstreamOption streamOpt=IOstreamOption(), const string &name="input")
Construct token list by parsing the input character sequence.
Definition ITstream.H:200
virtual bool endRawRead() override
End of low-level raw binary read : no-op.
Definition ITstream.H:633
static ITstream & empty_stream()
Return reference to an empty ITstream, for functions needing to return an ITstream reference but whic...
Definition ITstream.C:63
static tokenList parse(const UList< char > &input, IOstreamOption streamOpt=IOstreamOption())
Create token list by parsing the input character sequence until no good tokens remain.
Definition ITstream.H:268
ITstream(const string &name, List< token > &&tokens, IOstreamOption streamOpt=IOstreamOption())
Move construct from tokens, with given name.
Definition ITstream.H:231
void print(Ostream &os) const override
Print stream description to Ostream.
Definition ITstream.C:264
void add_tokens(const token &tok)
Copy append a token at the current tokenIndex, incrementing the index.
Definition ITstream.C:709
const token & back() const noexcept
Failsafe peek at the token at the back of the tokenList.
Definition ITstream.H:374
void push_back(const token &t, bool)
Definition ITstream.H:735
label tokenIndex() const noexcept
The current token index when reading, or the insertion point.
Definition ITstream.H:412
void seek(label pos) noexcept
Move tokenIndex to the specified position and adjust the stream status (open/good/eof ....
Definition ITstream.C:353
label endLineNumber() const
The line number of the last token in stream.
Definition ITstream.H:335
label nRemainingTokens() const noexcept
Number of tokens remaining.
Definition ITstream.H:432
bool skip(label n=1) noexcept
Move tokenIndex relative to the current position.
Definition ITstream.C:385
const tokenList & tokens() const noexcept
The token contents (read-only access).
Definition ITstream.H:346
const token & peek() const noexcept
Failsafe peek at what the next read would return, including handling of any putback.
Definition ITstream.C:327
ITstream(const string &name, const UList< token > &tokens, IOstreamOption streamOpt=IOstreamOption())
Copy construct from tokens, with given name.
Definition ITstream.H:218
label & tokenIndex() noexcept
Non-const access to the current token index.
Definition ITstream.H:417
labelRange find(const token::punctuationToken delimOpen, const token::punctuationToken delimClose, label pos=0) const
Find range containing matching delimiter pair, starting at the specified position....
Definition ITstream.C:485
ITstream(const ITstream &is)
Copy construct.
Definition ITstream.C:148
label startLineNumber() const
The line number of the first token in stream.
Definition ITstream.H:327
virtual void rewind() override
Rewind the stream so that it may be read again. Same as seek(0).
Definition ITstream.H:638
ITstream extract(const labelRange &range)
Remove a (start,size) subset from the list and move remaining elements down.
Definition ITstream.C:538
virtual ~ITstream()=default
Destructor.
bool hasPutback() const noexcept
True if putback token is in use.
Definition ITstream.H:357
static tokenList parse(const char *input, IOstreamOption streamOpt=IOstreamOption())
Create token list by parsing the input character sequence until no good tokens remain.
Definition ITstream.H:281
const token & peekToken(const label i) const
Failsafe read access to token at given position in the tokenList.
Definition ITstream.H:407
virtual Istream & readRaw(char *data, std::streamsize count) override
Low-level raw binary read : triggers not implemented error.
Definition ITstream.C:695
static tokenList parse(std::string_view s, IOstreamOption streamOpt=IOstreamOption())
Create token list by parsing the input character sequence until no good tokens remain.
Definition ITstream.H:301
const token & currentToken() const noexcept
Read access to the token at the current tokenIndex.
Definition ITstream.H:391
const token & peekFirst() const
Same as front().
Definition ITstream.H:720
tokenList & tokens() noexcept
The token contents (read/write access).
Definition ITstream.H:351
void operator=(const ITstream &is)
Copy assignment, with rewind().
Definition ITstream.C:750
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
virtual void rewind()=0
Rewind the stream so that it may be read again.
Definition Istream.C:214
bool hasPutback() const noexcept
True if putback token is in use.
Definition Istream.H:81
Istream(const Istream &)=default
Copy construct.
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
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
UList(const UList< T > &) noexcept=default
Copy construct, shallow copy.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
Definition UList.H:701
T & back()
Access last element of the list, position [size()-1].
Definition UListI.H:253
const T * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
Definition UListI.H:267
T * data() noexcept
Return pointer to the underlying array serving as data storage.
Definition UListI.H:274
T & front()
Access first element of the list, position [0].
Definition UListI.H:239
void size(const label n)
Older name for setAddressableSize.
Definition UList.H:118
A class for handling file names.
Definition fileName.H:75
A range or interval of labels defined by a start and a size.
Definition labelRange.H:66
A token holds an item read from Istream.
Definition token.H:70
static const token undefinedToken
An undefined token.
Definition token.H:570
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
OBJstream os(runTime.globalPath()/outputName)
auto & name
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
Namespace for OpenFOAM.
dimensionedScalar pos(const dimensionedScalar &ds)
static List< T > extract(const word &key, const UPtrList< entry > &entries, const T &initValue)
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
List< token > tokenList
List of token, used for dictionary primitive entry (for example).
Definition tokenList.H:32
#define FOAM_DEPRECATED_STRICT(since, replacement)
Definition stdFoam.H:53