fileOperation.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) 2017 OpenFOAM Foundation
9 Copyright (C) 2020-2021 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::fileOperation
29
30Description
31 An encapsulation of filesystem-related operations.
32
33Namespace
34 Foam::fileOperations
35
36Description
37 Namespace for implementations of a fileOperation
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_fileOperation_H
42#define Foam_fileOperation_H
43
44#include "ISstream.H"
45#include "Ostream.H"
46#include "autoPtr.H"
47#include "fileNameList.H"
48#include "instantList.H"
49#include "fileMonitor.H"
50#include "refPtr.H"
51#include "Enum.H"
52#include "Tuple2.H"
53
54// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56namespace Foam
57{
58
59// Forward Declarations
60class IOobject;
61class regIOobject;
62class objectRegistry;
63class Time;
64
65/*---------------------------------------------------------------------------*\
66 Class fileOperation Declaration
67\*---------------------------------------------------------------------------*/
69class fileOperation
70{
71public:
72
73 //- Enumeration for the location of an IOobject
74 enum pathType : int
75 {
80
81 // NOTE: increasing precedence (uncollated, collated, rank-collated)
82
95 };
96 static const Enum<pathType> pathTypeNames_;
97
98 //- Augment fileName with pathType and local offset
101
102 //- For addressing a range of processors,
103 //- identical to UPstream::rangeType
105
106
107protected:
108
109 // Protected Data
110
111 //- Communicator to use
112 const label comm_;
113
114 //- Distributed roots (parallel run)
115 mutable bool distributed_;
116
117 //- Detected processors directories
119
120 //- File-change monitor for all registered files
122
123
124 // Protected Member Functions
125
126 //- Get or create fileMonitor singleton
127 fileMonitor& monitor() const;
128
129 //- Retrieve list of IO ranks from FOAM_IORANKS env variable
130 static labelList ioRanks();
131
132 //- Merge two times
133 static void mergeTimes
134 (
135 const instantList& extraTimes,
136 const word& constantName,
137 instantList& times
138 );
139
140 //- Helper: check for file (isFile) or directory (!isFile)
141 static bool isFileOrDir(const bool isFile, const fileName&);
142
143 //- Lookup name of processorsDDD using cache.
144 // \return empty fileName if not found.
146 (
147 const fileName& objectPath,
148 const bool syncPar
149 ) const;
150
151 //- Lookup name of processorsDDD using cache.
152 // \note To be called on all processors
153 // \return empty fileName if not found.
155 (
156 const fileName& objectPath
157 ) const;
158
159 //- Does IOObject exist.
160 //- Is either a directory (empty name()) or a file
161 bool exists(IOobject& io) const;
162
163
164public:
165
166 // Static Data
167
168 //- Return the processors directory name (usually "processors")
169 static word processorsBaseDir;
170
171 //- Name of the default fileHandler
173
174
175 // Public Data Types
176
177 //- Runtime type information
178 TypeName("fileOperation");
179
180
181 //- Static fileOperation
183
184 //- Static construct the commonly used uncollatedFileOperation
186
187
188 // Constructors
189
190 //- Construct from communicator, optionally with distributed roots
191 explicit fileOperation
192 (
193 const label comm,
194 const bool distributedRoots = false
195 );
196
197
198 // Declare run-time constructor selection table
201 (
202 autoPtr,
204 word,
205 (
206 bool verbose
207 ),
208 (verbose)
209 );
210
211
212 // Selectors
213
214 //- Select fileHandler-type
216 (
217 const word& handlerType,
218 bool verbose = false
219 );
220
221
222 //- Destructor
223 virtual ~fileOperation() = default;
224
225
226 // Static Functions
227
228 //- Sort directory entries according to time value,
229 // with "constant" appearing first (if it exists)
231 (
232 const fileNameList& dirEntries,
233 const word& constantName = "constant"
234 );
235
236
237 // Member Functions
238
239 //- Distributed roots (parallel run)
240 bool distributed() const noexcept
241 {
242 return distributed_;
243 }
244
245 //- Set distributed roots on/off (mutable)
246 // \return old value
247 bool distributed(bool on) const noexcept;
248
249
250 // OSSpecific equivalents
251
252 //- Make directory
253 virtual bool mkDir(const fileName&, mode_t=0777) const = 0;
254
255 //- Set the file mode
256 virtual bool chMod(const fileName&, const mode_t) const = 0;
257
258 //- Return the file mode
259 virtual mode_t mode
260 (
261 const fileName&,
262 const bool followLink = true
263 ) const = 0;
264
265 //- Return the file type: DIRECTORY, FILE or SYMLINK
266 virtual fileName::Type type
267 (
268 const fileName&,
269 const bool followLink = true
270 ) const = 0;
271
272 //- Does the name exist (as DIRECTORY or FILE) in the file system?
273 // Optionally enable/disable check for gzip file.
274 virtual bool exists
275 (
276 const fileName&,
277 const bool checkGzip=true,
278 const bool followLink = true
279 ) const = 0;
280
281 //- Does the name exist as a DIRECTORY in the file system?
282 virtual bool isDir
283 (
284 const fileName&,
285 const bool followLink = true
286 ) const = 0;
287
288 //- Does the name exist as a FILE in the file system?
289 // Optionally enable/disable check for gzip file.
290 virtual bool isFile
291 (
292 const fileName&,
293 const bool checkGzip=true,
294 const bool followLink = true
295 ) const = 0;
296
297 //- Return size of file
298 virtual off_t fileSize
299 (
300 const fileName&,
301 const bool followLink = true
302 ) const = 0;
303
304 //- Return time of last file modification
305 virtual time_t lastModified
306 (
307 const fileName&,
308 const bool followLink = true
309 ) const = 0;
310
311 //- Return time of last file modification
312 virtual double highResLastModified
313 (
314 const fileName&,
315 const bool followLink = true
316 ) const = 0;
317
318 //- Read a directory and return the entries as a string list
319 virtual fileNameList readDir
320 (
321 const fileName&,
323 const bool filtergz=true,
324 const bool followLink = true
325 ) const = 0;
326
327 //- Copy, recursively if necessary, the source to the destination
328 virtual bool cp
329 (
330 const fileName& src,
331 const fileName& dst,
332 const bool followLink = true
333 ) const = 0;
334
335 //- Create a softlink. dst should not exist. Returns true if
336 // successful.
337 virtual bool ln(const fileName& src, const fileName& dst) const = 0;
338
339 //- Rename src to dst
340 virtual bool mv
341 (
342 const fileName& src,
343 const fileName& dst,
344 const bool followLink = false
345 ) const = 0;
346
347 //- Rename to a corresponding backup file
348 // If the backup file already exists, attempt with
349 // "01" .. "99" suffix
350 virtual bool mvBak
351 (
352 const fileName&,
353 const std::string& ext = "bak"
354 ) const = 0;
355
356 //- Remove a file, returning true if successful otherwise false
357 virtual bool rm(const fileName&) const = 0;
358
359 //- Remove a directory and its contents
360 // \param silent do not report missing directory
361 virtual bool rmDir
362 (
363 const fileName& dir,
364 const bool silent = false
365 ) const = 0;
366
367// //- Open a shared library. Return handle to library. Print error
368// // message if library cannot be loaded (check = true)
369// virtual void* dlOpen
370// (
371// const fileName& lib,
372// const bool check = true
373// ) const = 0;
374
375
376 // (reg)IOobject functionality
377
378 //- Generate disk file name for object. Opposite of filePath.
379 // Optional wanted typeName.
380 virtual fileName objectPath
381 (
382 const IOobject& io,
383 const word& typeName
384 ) const;
385
386 //- Search for an object. checkGlobal : also check undecomposed case
387 // Optional wanted typeName.
388 virtual fileName filePath
389 (
390 const bool checkGlobal,
391 const IOobject&,
392 const word& typeName,
393 const bool search = true
394 ) const = 0;
395
396 //- Search for a directory. checkGlobal : also check undecomposed
397 // case
398 virtual fileName dirPath
399 (
400 const bool checkGlobal,
401 const IOobject& io,
402 const bool search = true
403 ) const = 0;
404
405 //- Search directory for objects. Used in IOobjectList.
407 (
408 const objectRegistry& db,
409 const fileName& instance,
410 const fileName& local,
411 word& newInstance
412 ) const;
413
414 //- Read object header from supplied file
415 virtual bool readHeader
416 (
417 IOobject&,
418 const fileName&,
419 const word& typeName
420 ) const = 0;
421
422 //- Reads header for regIOobject and returns an ISstream
423 // to read the contents.
425 (
427 const fileName&,
428 const word& typeName,
429 const bool valid = true
430 ) const = 0;
431
432 //- Top-level read
433 virtual bool read
434 (
436 const bool masterOnly,
438 const word& typeName
439 ) const = 0;
440
441 //- Writes a regIOobject (so header, contents and divider).
442 // Returns success state. Default action is to write to
443 // the objectPath using writeData. If !valid the
444 // file does not need to be written (this is used e.g. to
445 // suppress empty local lagrangian data)
446 virtual bool writeObject
447 (
448 const regIOobject& io,
449 IOstreamOption streamOpt = IOstreamOption(),
450 const bool valid = true
451 ) const;
452
453
454 // Filename (not IOobject) operations
455
456 //- Search for a file or directory. Use IOobject version in
457 // preference
458 virtual fileName filePath(const fileName&) const;
459
460 //- Generate an ISstream that reads a file
461 virtual autoPtr<ISstream> NewIFstream(const fileName&) const = 0;
462
463 //- Generate an OSstream that writes a file
465 (
466 const fileName& pathname,
467 IOstreamOption streamOpt = IOstreamOption(),
468 const bool valid = true
469 ) const = 0;
470
471
472 // File modification checking
473
474 //- Add watching of a file. Returns handle
475 virtual label addWatch(const fileName&) const;
476
477 //- Remove watch on a file (using handle)
478 virtual bool removeWatch(const label) const;
479
480 //- Find index (or -1) of file in list of handles
481 virtual label findWatch
482 (
483 const labelList& watchIndices,
484 const fileName&
485 ) const;
486
487 //- Helper: add watches for list of regIOobjects
488 virtual void addWatches(regIOobject&, const fileNameList&) const;
489
490 //- Get name of file being watched (using handle)
491 virtual fileName getFile(const label) const;
492
493 //- Update state of all files
494 virtual void updateStates
495 (
496 const bool masterOnly,
497 const bool syncPar
498 ) const;
499
500 //- Get current state of file (using handle)
501 virtual fileMonitor::fileState getState(const label) const;
502
503 //- Set current state of file (using handle) to unmodified
504 virtual void setUnmodified(const label) const;
505
506
507 // Other
508
509 //- Actual name of processors dir (for use in mode PROCOBJECT,
510 // PROCINSTANCE)
511 virtual word processorsDir(const IOobject& io) const
512 {
513 return processorsBaseDir;
514 }
515
516 //- Actual name of processors dir (for use in mode PROCOBJECT,
517 // PROCINSTANCE)
518 virtual word processorsDir(const fileName&) const
519 {
520 return processorsBaseDir;
521 }
522
523 //- Set number of processor directories/results. Only used in
524 // decomposePar
525 virtual void setNProcs(const label nProcs);
526
527 //- Get number of processor directories/results. Used for e.g.
528 // reconstructPar, argList checking
529 virtual label nProcs
530 (
531 const fileName& dir,
532 const fileName& local = ""
533 ) const;
534
535 //- Get sorted list of times
536 virtual instantList findTimes(const fileName&, const word&) const;
537
538 //- Find instance where IOobject is.
539 // FatalError if it cannot be found and readOpt is
540 // (MUST_READ or MUST_READ_IF_MODIFIED).
541 // Otherwise it returns the stopInstance.
542 virtual IOobject findInstance
543 (
544 const IOobject& io,
545 const scalar startValue,
546 const word& stopInstance
547 ) const;
548
549 //- Callback for time change
550 virtual void setTime(const Time&) const
551 {}
552
553 //- Forcibly wait until all output done. Flush any cached data
554 virtual void flush() const;
555
556 //- Generate path (like io.path) from root+casename with any
557 // 'processorXXX' replaced by procDir (usually 'processsors')
559 (
560 const IOobject&,
561 const word& procDir
562 ) const;
563
564 //- Generate path (like io.path) with provided instance and any
565 // 'processorXXX' replaced by procDir (usually 'processsors')
567 (
568 const IOobject&,
569 const word& instance,
570 const word& procDir
571 ) const;
572
573 //- Operating on fileName: replace processorXXX with procDir
574 fileName processorsPath(const fileName&, const word& procDir) const;
575
576 //- Split objectPath into part before 'processor' and part after.
577 //
578 // Returns -1 or processor number and optionally number
579 // of processors. Use with care.
580 // - path/"processor"+Foam::name(proci)/local reconstructs input
581 // - path/"processors"+Foam::name(nProcs)/local reconstructs
582 // collated processors equivalence
583 static label splitProcessorPath
584 (
585 const fileName& objectPath,
586 fileName& path,
587 fileName& procDir,
588 fileName& local,
589 procRangeType& group,
590 label& nProcs
591 );
592
593 //- Detect processor number from '/aa/bb/processorDDD/cc'
594 static label detectProcessorPath(const fileName& objPath);
595};
596
597
598// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
599
600// Note: defined in fileOperation.C
601
602//- Get current file handler
603const fileOperation& fileHandler();
604
605//- Replace, reset file handler.
606// \return old handler on change, null otherwise
607autoPtr<fileOperation> fileHandler(autoPtr<fileOperation>&& newHandler);
608
609
610// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
611
612} // End namespace Foam
613
614// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
615
616#endif
617
618// ************************************************************************* //
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat
Data format (ascii | binary)
An interval of (signed) integers defined by a start and a size.
Definition: IntRange.H:64
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Definition: Tuple2.H:58
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Checking for changes to files.
Definition: fileMonitor.H:67
fileState
Enumeration defining the file state.
Definition: fileMonitor.H:74
A class for handling file names.
Definition: fileName.H:76
Type
Enumerations to handle directory entry types.
Definition: fileName.H:81
@ FILE
A regular file.
Definition: fileName.H:83
An encapsulation of filesystem-related operations.
Definition: fileOperation.H:69
virtual void addWatches(regIOobject &, const fileNameList &) const
Helper: add watches for list of regIOobjects.
static bool isFileOrDir(const bool isFile, const fileName &)
Helper: check for file (isFile) or directory (!isFile)
virtual bool chMod(const fileName &, const mode_t) const =0
Set the file mode.
virtual mode_t mode(const fileName &, const bool followLink=true) const =0
Return the file mode.
virtual bool isFile(const fileName &, const bool checkGzip=true, const bool followLink=true) const =0
Does the name exist as a FILE in the file system?
bool distributed() const noexcept
Distributed roots (parallel run)
virtual void setNProcs(const label nProcs)
Set number of processor directories/results. Only used in.
TypeName("fileOperation")
Runtime type information.
virtual bool mvBak(const fileName &, const std::string &ext="bak") const =0
Rename to a corresponding backup file.
virtual label addWatch(const fileName &) const
Add watching of a file. Returns handle.
Tuple2< fileName, Tuple2< pathType, int > > dirIndex
Augment fileName with pathType and local offset.
Definition: fileOperation.H:98
refPtr< dirIndexList > lookupAndCacheProcessorsPath(const fileName &objectPath, const bool syncPar) const
Lookup name of processorsDDD using cache.
static instantList sortTimes(const fileNameList &dirEntries, const word &constantName="constant")
Sort directory entries according to time value,.
virtual autoPtr< ISstream > NewIFstream(const fileName &) const =0
Generate an ISstream that reads a file.
virtual double highResLastModified(const fileName &, const bool followLink=true) const =0
Return time of last file modification.
virtual bool rm(const fileName &) const =0
Remove a file, returning true if successful otherwise false.
virtual void flush() const
Forcibly wait until all output done. Flush any cached data.
virtual bool removeWatch(const label) const
Remove watch on a file (using handle)
bool exists(IOobject &io) const
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
Search directory for objects. Used in IOobjectList.
virtual off_t fileSize(const fileName &, const bool followLink=true) const =0
Return size of file.
static word defaultFileHandler
Name of the default fileHandler.
virtual label findWatch(const labelList &watchIndices, const fileName &) const
Find index (or -1) of file in list of handles.
const label comm_
Communicator to use.
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const =0
Copy, recursively if necessary, the source to the destination.
virtual fileName::Type type(const fileName &, const bool followLink=true) const =0
Return the file type: DIRECTORY, FILE or SYMLINK.
fileName processorsCasePath(const IOobject &, const word &procDir) const
Generate path (like io.path) from root+casename with any.
virtual bool rmDir(const fileName &dir, const bool silent=false) const =0
Remove a directory and its contents.
virtual bool ln(const fileName &src, const fileName &dst) const =0
Create a softlink. dst should not exist. Returns true if.
virtual bool read(regIOobject &, const bool masterOnly, const IOstreamOption::streamFormat format, const word &typeName) const =0
Top-level read.
virtual refPtr< dirIndexList > lookupProcessorsPath(const fileName &objectPath) const
Lookup name of processorsDDD using cache.
virtual IOobject findInstance(const IOobject &io, const scalar startValue, const word &stopInstance) const
Find instance where IOobject is.
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const =0
Read object header from supplied file.
IntRange< int > procRangeType
List< dirIndex > dirIndexList
Definition: fileOperation.H:99
static label splitProcessorPath(const fileName &objectPath, fileName &path, fileName &procDir, fileName &local, procRangeType &group, label &nProcs)
Split objectPath into part before 'processor' and part after.
static autoPtr< fileOperation > NewUncollated()
Static construct the commonly used uncollatedFileOperation.
virtual word processorsDir(const IOobject &io) const
Actual name of processors dir (for use in mode PROCOBJECT,.
HashTable< dirIndexList > procsDirs_
Detected processors directories.
static label detectProcessorPath(const fileName &objPath)
Detect processor number from '/aa/bb/processorDDD/cc'.
virtual void setTime(const Time &) const
Callback for time change.
pathType
Enumeration for the location of an IOobject.
Definition: fileOperation.H:74
@ PROCUNCOLLATEDINSTANCE
as PROCUNCOLLATED but with instance
Definition: fileOperation.H:91
@ WRITEOBJECT
write path exists
Definition: fileOperation.H:78
@ NOTFOUND
Not found.
Definition: fileOperation.H:75
@ OBJECT
io.objectPath() exists
Definition: fileOperation.H:77
@ PROCINSTANCE
as PROCOBJECT but with instance
Definition: fileOperation.H:93
@ FINDINSTANCE
file found in time directory
Definition: fileOperation.H:90
@ PROCUNCOLLATED
objectPath exists in 'processorN'
Definition: fileOperation.H:82
@ ABSOLUTE
instance is absolute directory
Definition: fileOperation.H:76
@ PROCBASEINSTANCE
as PROCBASEOBJECT but with instance
Definition: fileOperation.H:92
@ PARENTOBJECT
parent of object path
Definition: fileOperation.H:89
@ PROCOBJECT
objectPath exists in 'processorsNN_first-last'
Definition: fileOperation.H:86
@ PROCBASEOBJECT
objectPath exists in 'processorsNN'
Definition: fileOperation.H:84
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const =0
Rename src to dst.
static labelList ioRanks()
Retrieve list of IO ranks from FOAM_IORANKS env variable.
virtual fileMonitor::fileState getState(const label) const
Get current state of file (using handle)
autoPtr< fileMonitor > monitorPtr_
File-change monitor for all registered files.
virtual void setUnmodified(const label) const
Set current state of file (using handle) to unmodified.
virtual autoPtr< ISstream > readStream(regIOobject &, const fileName &, const word &typeName, const bool valid=true) const =0
Reads header for regIOobject and returns an ISstream.
virtual label nProcs(const fileName &dir, const fileName &local="") const
Get number of processor directories/results. Used for e.g.
virtual void updateStates(const bool masterOnly, const bool syncPar) const
Update state of all files.
virtual time_t lastModified(const fileName &, const bool followLink=true) const =0
Return time of last file modification.
static const Enum< pathType > pathTypeNames_
Definition: fileOperation.H:95
bool distributed_
Distributed roots (parallel run)
fileMonitor & monitor() const
Get or create fileMonitor singleton.
virtual fileName dirPath(const bool checkGlobal, const IOobject &io, const bool search=true) const =0
Search for a directory. checkGlobal : also check undecomposed.
static autoPtr< fileOperation > fileHandlerPtr_
Static fileOperation.
fileName processorsPath(const IOobject &, const word &instance, const word &procDir) const
Generate path (like io.path) with provided instance and any.
virtual ~fileOperation()=default
Destructor.
virtual bool isDir(const fileName &, const bool followLink=true) const =0
Does the name exist as a DIRECTORY in the file system?
virtual instantList findTimes(const fileName &, const word &) const
Get sorted list of times.
virtual fileName filePath(const bool checkGlobal, const IOobject &, const word &typeName, const bool search=true) const =0
Search for an object. checkGlobal : also check undecomposed case.
virtual autoPtr< OSstream > NewOFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const =0
Generate an OSstream that writes a file.
static word processorsBaseDir
Return the processors directory name (usually "processors")
virtual bool writeObject(const regIOobject &io, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
Writes a regIOobject (so header, contents and divider).
virtual bool mkDir(const fileName &, mode_t=0777) const =0
Make directory.
declareRunTimeSelectionTable(autoPtr, fileOperation, word,(bool verbose),(verbose))
static autoPtr< fileOperation > New(const word &handlerType, bool verbose=false)
Select fileHandler-type.
virtual fileName getFile(const label) const
Get name of file being watched (using handle)
virtual fileNameList readDir(const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true) const =0
Read a directory and return the entries as a string list.
virtual fileName objectPath(const IOobject &io, const word &typeName) const
Generate disk file name for object. Opposite of filePath.
static void mergeTimes(const instantList &extraTimes, const word &constantName, instantList &times)
Merge two times.
Registry of regIOobjects.
A class for managing references or pointers (no reference counting)
Definition: refPtr.H:58
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:76
A class for handling words, derived from Foam::string.
Definition: word.H:68
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Namespace for OpenFOAM.
const fileOperation & fileHandler()
Get current file handler.
List< instant > instantList
List of instants.
Definition: instantList.H:47
const direction noexcept
Definition: Scalar.H:223
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
Definition: fileName.C:624
word format(conversionProperties.get< word >("format"))
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
const volScalarField & cp
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73