ensightCase.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) 2016-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#include "ensightCase.H"
29#include "ensightGeoFile.H"
30#include "Time.H"
31#include "cloud.H"
32#include "IOmanip.H"
33#include "OSstream.H"
34
35// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36
37const char* Foam::ensightCase::dataDirName = "data";
38const char* Foam::ensightCase::geometryName = "geometry";
39
40
41// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
42
44(
45 OSstream& os,
46 const label ts,
47 const scalar timeValue
48)
49{
50 os
51 << "time set: " << ts << nl
52 << "number of steps: " << 1 << nl;
53
54 // Single value - starts at index 0
55 os << "filename start number: 0" << nl
56 << "filename increment: 1" << nl
57 << "time values:" << nl;
58
59 os << " " << timeValue
60 << nl << nl;
61}
62
63
65(
66 OSstream& os,
67 const label ts,
68 const UList<scalar>& values
69)
70{
71 label pos_(0);
72
73 os
74 << "time set: " << ts << nl
75 << "number of steps: " << values.size() << nl;
76
77 // Assume contiguous numbering - starts at index 0
78 os << "filename start number: 0" << nl
79 << "filename increment: 1" << nl;
80
81
82 os << "time values:" << nl;
83 pos_ = 0;
84 for (const scalar val : values)
85 {
86 if (pos_ == 6)
87 {
88 os << nl;
89 pos_ = 0;
90 }
91 ++pos_;
92
93 os << ' ' << setf(ios_base::right) << setw(12) << val;
94 }
95 os << nl << nl;
96}
97
98
100(
101 OSstream& os,
102 const label ts,
103 const UList<scalar>& values,
104 const bitSet& indices
105)
106{
107 label pos_(0);
108
109 // Check if continuous numbering can be used
110 if
111 (
112 values.empty()
113 || (indices.size() == values.size() && indices.all())
114 )
115 {
116 // Can simply emit as 0-based with increment
117 printTimeset(os, ts, values);
118 return;
119 }
120
121
122 // Generate time set
123 os
124 << "time set: " << ts << nl
125 << "number of steps: " << indices.count() << nl;
126
127
128 os << "filename numbers:" << nl;
129 pos_ = 0;
130 for (const label idx : indices)
131 {
132 if (pos_ == 6)
133 {
134 os << nl;
135 pos_ = 0;
136 }
137 ++pos_;
138
139 os << ' ' << setf(ios_base::right) << setw(8) << idx;
140 }
141 os << nl;
142
143
144 os << "time values:" << nl;
145 pos_ = 0;
146 for (const label idx : indices)
147 {
148 if (pos_ == 6)
149 {
150 os << nl;
151 pos_ = 0;
152 }
153 ++pos_;
154
155 os << ' ' << setf(ios_base::right) << setw(12) << values[idx];
156 }
157 os << nl << nl;
158}
159
160
161// * * * * * * * * * * * * * Private Functions * * * * * * * * * * * * * * //
162
163Foam::fileName Foam::ensightCase::dataDir() const
164{
165 return ensightDir_/dataDirName;
166}
167
168
169void Foam::ensightCase::initialize()
170{
171 if (Pstream::master())
172 {
173 // EnSight and EnSight/data directories must exist
174
175 // We may wish to retain old data
176 // eg, convert new results or a particular time interval
177 // OR remove everything
178
179 if (isDir(ensightDir_))
180 {
181 if (options_->overwrite())
182 {
183 Foam::rmDir(ensightDir_);
184 }
185 else
186 {
188 << "Warning: re-using existing directory" << nl
189 << " " << ensightDir_ << endl;
190 }
191 }
192
193 // Create ensight and data directories
194 mkDir(dataDir());
195
196 // The case file is always ASCII
197 os_.reset(new OFstream(ensightDir_/caseName_, IOstreamOption::ASCII));
198
199 // Format options
200 os_->setf(ios_base::left);
201 os_->setf(ios_base::scientific, ios_base::floatfield);
202 os_->precision(5);
203
204 writeHeader();
205 }
206}
207
208
209Foam::label Foam::ensightCase::checkTimeset(const labelHashSet& lookup) const
210{
211 // assume the worst
212 label ts = -1;
213
214 // work on a copy
215 labelHashSet tsTimes(lookup);
216 tsTimes.erase(-1);
217
218 if (tsTimes.empty())
219 {
220 // no times needed
221 ts = 0;
222 }
223 else if (tsTimes.size() == timesUsed_.size())
224 {
225 forAllConstIters(timesUsed_, iter)
226 {
227 tsTimes.erase(iter.key());
228 }
229
230 // OR
231 // tsTimes.unset(timesUsed_.toc());
232
233 if (tsTimes.empty())
234 {
235 ts = 1; // can use timeset 1
236 }
237 }
238
239 return ts;
240}
241
242
243void Foam::ensightCase::writeHeader() const
244{
245 if (os_) // True on master only
246 {
247 this->rewind();
248 *os_
249 << "FORMAT" << nl
250 << "type: ensight gold" << nl;
251 }
252}
253
254
255Foam::scalar Foam::ensightCase::writeTimeset() const
256{
257 const label ts = 1;
258
259 const labelList indices(timesUsed_.sortedToc());
260 label count = indices.size();
261
262 // correct for negative starting values
263 scalar timeCorrection = timesUsed_[indices[0]];
264 if (timeCorrection < 0)
265 {
266 timeCorrection = -timeCorrection;
267 Info<< "Correcting time values. Adding " << timeCorrection << endl;
268 }
269 else
270 {
271 timeCorrection = 0;
272 }
273
274
275 *os_
276 << "time set: " << ts << nl
277 << "number of steps: " << count << nl;
278
279 if (indices[0] == 0 && indices[count-1] == count-1)
280 {
281 // looks to be contiguous numbering
282 *os_
283 << "filename start number: " << 0 << nl
284 << "filename increment: " << 1 << nl;
285 }
286 else
287 {
288 *os_
289 << "filename numbers:" << nl;
290
291 count = 0;
292 for (const label idx : indices)
293 {
294 *os_ << ' ' << setw(12) << idx;
295
296 if (++count % 6 == 0)
297 {
298 *os_ << nl;
299 }
300 }
301
302 if (count)
303 {
304 *os_ << nl;
305 }
306 }
307
308
309 *os_ << "time values:" << nl;
310
311 count = 0;
312 for (const label idx : indices)
313 {
314 *os_ << ' ' << setw(12) << timesUsed_[idx] + timeCorrection;
315
316 if (++count % 6 == 0)
317 {
318 *os_ << nl;
319 }
320 }
321 if (count)
322 {
323 *os_ << nl;
324 }
325
326 return timeCorrection;
327}
328
329
330void Foam::ensightCase::writeTimeset
331(
332 const label ts,
333 const labelHashSet& lookup,
334 const scalar timeCorrection
335) const
336{
337 // Make a copy
338 labelHashSet hashed(lookup);
339 hashed.erase(-1);
340
341 const labelList indices(hashed.sortedToc());
342 label count = indices.size();
343
344 *os_
345 << "time set: " << ts << nl
346 << "number of steps: " << count << nl
347 << "filename numbers:" << nl;
348
349 count = 0;
350 for (const label idx : indices)
351 {
352 *os_ << ' ' << setw(12) << idx;
353
354 if (++count % 6 == 0)
355 {
356 *os_ << nl;
357 }
358 }
359
360 if (count)
361 {
362 *os_ << nl;
363 }
364
365 *os_ << "time values:" << nl;
366
367 count = 0;
368 for (const label idx : indices)
369 {
370 *os_ << ' ' << setw(12) << timesUsed_[idx] + timeCorrection;
371
372 if (++count % 6 == 0)
373 {
374 *os_ << nl;
375 }
376 }
377 if (count)
378 {
379 *os_ << nl;
380 }
381}
382
383
384void Foam::ensightCase::noteGeometry(const bool moving) const
385{
386 if (moving)
387 {
388 geomTimes_.insert(timeIndex_);
389 }
390 else
391 {
392 geomTimes_.insert(-1);
393 }
394
395 changed_ = true;
396}
397
398
399void Foam::ensightCase::noteCloud(const word& cloudName) const
400{
401 // Force into existence
402 if (!cloudVars_.found(cloudName))
403 {
404 cloudVars_.emplace(cloudName);
405 }
406 cloudTimes_.insert(timeIndex_);
407
408 changed_ = true;
409}
410
411
412void Foam::ensightCase::noteCloud
413(
414 const word& cloudName,
415 const word& varName,
416 const char* ensightType
417) const
418{
419 if (cloudVars_.found(cloudName))
420 {
421 if (cloudVars_[cloudName].insert(varName, ensightType))
422 {
423 changed_ = true;
424 }
425 }
426 else
427 {
429 << "Tried to add a cloud variable for writing"
430 << " - without having added a cloud"
431 << abort(FatalError);
432 }
433}
434
435
436void Foam::ensightCase::noteVariable
437(
438 const word& varName,
439 const char* ensightType
440) const
441{
442 if (variables_.insert(varName, ensightType))
443 {
444 changed_ = true;
445 }
446}
447
448
450Foam::ensightCase::createDataFile
451(
452 const word& name
453) const
454{
455 if (Pstream::master())
456 {
457 // The data/ITER subdirectory must exist
458 // Note that data/ITER is indeed a valid ensight::FileName
459 const fileName outdir = dataDir()/padded(timeIndex_);
460 mkDir(outdir);
461
462 return autoPtr<ensightFile>::New(outdir, name, format());
463 }
464
465 return nullptr;
466}
467
468
470Foam::ensightCase::createCloudFile
471(
472 const word& cloudName,
473 const word& name
474) const
475{
476 if (Pstream::master())
477 {
478 // Write
479 // eg -> "data/********/lagrangian/<cloudName>/positions"
480 // or -> "lagrangian/<cloudName>/********/positions"
481 // TODO? check that cloudName is a valid ensight filename
482 const fileName outdir =
483 (
484 separateCloud()
485 ? (ensightDir_ / cloud::prefix / cloudName / padded(timeIndex_))
486 : (dataDir() / padded(timeIndex_) / cloud::prefix / cloudName)
487 );
488
489 mkDir(outdir); // should be unnecessary after newCloud()
490
491 return autoPtr<ensightFile>::New(outdir, name, format());
492 }
493
494 return nullptr;
495}
496
497
498// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
499
501(
502 const fileName& ensightDir,
503 const word& caseName,
504 const ensightCase::options& opts
505)
506:
507 options_(new options(opts)),
508 os_(nullptr),
509 ensightDir_(ensightDir),
510 caseName_(caseName + ".case"),
511 changed_(false),
512 timeIndex_(0),
513 timeValue_(0),
514 timesUsed_(),
515 geomTimes_(),
516 cloudTimes_(),
517 variables_(),
518 nodeVariables_(),
519 cloudVars_()
520{
521 initialize();
522}
523
524
526(
527 const fileName& ensightDir,
528 const word& caseName,
530)
531:
532 options_(new options(format)),
533 os_(nullptr),
534 ensightDir_(ensightDir),
535 caseName_(caseName + ".case"),
536 changed_(false),
537 timeIndex_(0),
538 timeValue_(0),
539 timesUsed_(),
540 geomTimes_(),
541 cloudTimes_(),
542 variables_(),
543 nodeVariables_(),
544 cloudVars_()
545{
546 initialize();
547}
548
549
550// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
551
552void Foam::ensightCase::nextTime(const scalar value)
553{
554 // use next available index
555 setTime(value, timesUsed_.size());
556}
557
558
560{
561 nextTime(t.value());
562}
563
564
565void Foam::ensightCase::setTime(const scalar value, const label index)
566{
567 timeIndex_ = index;
568 timeValue_ = value;
569
570 if (Pstream::master())
571 {
572 // The data/ITER subdirectory must exist
573 // Note that data/ITER is indeed a valid ensight::FileName
574
575 const fileName outdir = dataDir()/padded(timeIndex_);
576 mkDir(outdir);
577
578 // place a timestamp in the directory for future reference
579 OFstream timeStamp(outdir/"time");
580 timeStamp
581 << "# index time" << nl
582 << outdir.name() << ' ' << timeValue_ << nl;
583 }
584
585 // Record of time index/value used
586 timesUsed_.set(index, value);
587}
588
589
590void Foam::ensightCase::setTime(const instant& t, const label index)
591{
592 setTime(t.value(), index);
593}
594
595
597{
598 if (!os_) return; // master only
599
600 // geometry timeset
601 const bool staticGeom = (geomTimes_.size() == 1 && geomTimes_.found(-1));
602 label tsGeom = staticGeom ? 0 : checkTimeset(geomTimes_);
603
604 // geometry index, when mesh is not moving but stored under data/XXX/
605 label meshIndex = -1;
606
607 // cloud timeset
608 label tsCloud = checkTimeset(cloudTimes_);
609
610 // Increment time-sets to the correct indices
611 if (tsGeom < 0)
612 {
613 tsGeom = 2; // Next available timeset
614
615 // Saved under data/XXX/geometry, but not actually moving
616 if (geomTimes_.size() == 1)
617 {
618 tsGeom = 0;
619 meshIndex = *(geomTimes_.begin());
620 }
621 }
622 if (tsCloud < 0)
623 {
624 tsCloud = 1 + std::max(label(1), tsGeom); // Next available timeset
625 }
626
627 writeHeader();
628
629
630 // data mask: eg "data/******"
631 const fileName dataMask = (dataDirName/mask());
632
633 //
634 // GEOMETRY
635 //
636 if (!geomTimes_.empty() || !cloudTimes_.empty())
637 {
638 // start of variables
639 *os_
640 << nl
641 << "GEOMETRY" << nl;
642 }
643
644 if (staticGeom)
645 {
646 // Static mesh: store under data/constant/geometry
647 *os_
648 << setw(16) << "model:"
649 << (dataDirName/word("constant")/geometryName).c_str()
650 << nl;
651 }
652 else if (meshIndex >= 0)
653 {
654 // Not really moving, but stored under data/XXXX/geometry
655 *os_
656 << setw(16) << "model:"
657 << (dataDirName/padded(meshIndex)/geometryName).c_str()
658 << nl;
659 }
660 else if (!geomTimes_.empty())
661 {
662 // Moving
663 *os_
664 << word::printf("model: %-9d", tsGeom) // width 16 (no quotes)
665 << (dataMask/geometryName).c_str()
666 << nl;
667 }
668
669 // Clouds and cloud variables
670 const wordList cloudNames(cloudVars_.sortedToc());
671
672 for (const word& cloudName : cloudNames)
673 {
674 const fileName masked =
675 (
676 separateCloud()
677 ? (cloud::prefix / cloudName / mask())
678 : (dataMask / cloud::prefix / cloudName)
679 );
680
681 *os_
682 << word::printf("measured: %-6d", tsCloud) // width 16 (no quotes)
683 << (masked/"positions").c_str()
684 << nl;
685 }
686
687
688 //
689 // VARIABLE
690 //
691 if (variables_.size() || cloudVars_.size())
692 {
693 // Start of variables
694 *os_
695 << nl
696 << "VARIABLE" << nl;
697 }
698
699
700 // Field variables (always use timeset 1)
701 const wordList varNames(variables_.sortedToc());
702
703 for (const word& varName : varNames)
704 {
705 const string& ensType = variables_[varName];
706
707 *os_
708 << ensType.c_str()
709 <<
710 (
711 (nodeVariables_.found(varName) || nodeValues())
712 ? " per node: 1 " // time-set 1
713 : " per element: 1 " // time-set 1
714 )
715 << setw(15) << varName << ' '
716 << (dataMask/varName).c_str() << nl;
717 }
718
719
720 // Clouds and cloud variables (using cloud timeset)
721 // Write
722 // as -> "data/********/lagrangian/<cloudName>/positions"
723 // or -> "lagrangian/<cloudName>/********/positions"
724
725 label cloudNo = 0;
726 for (const word& cloudName : cloudNames)
727 {
728 const fileName masked =
729 (
730 separateCloud()
731 ? (cloud::prefix / cloudName / mask())
732 : (dataMask / cloud::prefix / cloudName)
733 );
734
735 const HashTable<string>& vars = cloudVars_[cloudName];
736
737 for (const word& varName : vars.sortedToc())
738 {
739 const string& ensType = vars[varName];
740
741 // prefix variables with 'c' (cloud) and cloud index
742 *os_
743 << ensType.c_str() << " per "
744 << word::printf("measured node: %-5d", tsCloud) // width 20
745 << setw(15)
746 << ("c" + Foam::name(cloudNo) + varName).c_str() << ' '
747 << (masked/varName).c_str()
748 << nl;
749 }
750
751 ++cloudNo;
752 }
753
754
755 //
756 // TIME
757 //
758
759 if (!timesUsed_.empty())
760 {
761 *os_
762 << nl << "TIME" << nl;
763
764 // timeset 1
765 const scalar timeCorrection = writeTimeset();
766
767 // timeset geometry
768 if (tsGeom > 1)
769 {
770 writeTimeset(tsGeom, geomTimes_, timeCorrection);
771 }
772
773 // timeset cloud
774 if (tsCloud > 1)
775 {
776 writeTimeset(tsCloud, cloudTimes_, timeCorrection);
777 }
778
779 *os_
780 << "# end" << nl;
781 }
782
783 *os_ << flush;
784 changed_ = false;
785}
786
787
790(
791 bool moving
792) const
793{
795
796 if (Pstream::master())
797 {
798 // Set the path of the ensight file
800
801 if (moving)
802 {
803 // Moving mesh: write as "data/********/geometry"
804 path = dataDir()/padded(timeIndex_);
805 }
806 else
807 {
808 // Static mesh: write as "data/constant/geometry"
809 path = dataDir()/word("constant");
810 }
811 mkDir(path);
812
813 noteGeometry(moving); // note for later use
814
815 return autoPtr<ensightGeoFile>::New(path, geometryName, format());
816 }
817
818 return nullptr;
819}
820
821
824(
825 const word& cloudName
826) const
827{
829
830 if (Pstream::master())
831 {
832 output = createCloudFile(cloudName, "positions");
833
834 // Tag binary format (just like geometry files)
835 output().writeBinaryHeader();
836
837 // Description
839 output().newline();
840
841 noteCloud(cloudName); // note for later use
842 }
843
844 return output;
845}
846
847
849{
850 if (os_) // master only
851 {
852 os_->stdStream().seekp(0, std::ios_base::beg);
853 }
854}
855
856
858{
859 os << "Ensight case:" << nl
860 << " path: " << ensightDir_ << nl
861 << " name: " << caseName_ << nl
862 << " format: " << format() << nl;
863
864 if (nodeValues())
865 {
866 os << " values per node" << nl;
867 }
868
869 return os;
870}
871
872
873// ************************************************************************* //
Istream and Ostream manipulators taking arguments.
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
Definition: HashTable.C:137
streamFormat
Data format (ascii | binary)
@ ASCII
"ascii" (normal default)
scalar value() const noexcept
The value (const access)
Definition: Instant.H:118
Output to file stream, using an OSstream.
Definition: OFstream.H:57
Generic output stream using a standard (STL) stream.
Definition: OSstream.H:57
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
label size() const noexcept
Number of entries.
Definition: PackedListI.H:377
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
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:94
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:66
unsigned int count(const bool on=true) const
Count number of bits set.
Definition: bitSetI.H:500
bool all() const
True if all bits in this bitset are set or if the set is empty.
Definition: bitSetI.H:461
void printInfo() const
Print general information about the mesh.
Definition: ccmReader.C:522
static const word prefix
The prefix to local: lagrangian.
Definition: cloud.H:87
Configuration options for the ensightCase.
Definition: ensightCase.H:381
Supports writing of ensight cases as well as providing common factory methods to open new files.
Definition: ensightCase.H:69
autoPtr< ensightFile > newCloud(const word &cloudName) const
Open stream for new cloud positions (on master).
Definition: ensightCase.C:824
static const char * dataDirName
The name for data subdirectory: "data".
Definition: ensightCase.H:78
void write() const
Write the case file.
Definition: ensightCase.C:596
autoPtr< ensightGeoFile > newGeometry(bool moving=false) const
Open stream for new geometry file (on master).
Definition: ensightCase.C:790
void setTime(const scalar t, const label index)
Set current index and time for time-set 1.
Definition: ensightCase.C:565
static const char * geometryName
The name for geometry files: "geometry".
Definition: ensightCase.H:81
void rewind() const
Rewind the output stream (master only).
Definition: ensightCase.C:848
void nextTime(const scalar t)
Set time for time-set 1, using next available index.
Definition: ensightCase.C:552
static void printTimeset(OSstream &os, const label ts, const scalar timeValue)
Print time-set for ensight case file with a single time.
Definition: ensightCase.C:44
A class for handling file names.
Definition: fileName.H:76
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
Definition: fileNameI.H:199
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.
Definition: instant.H:56
splitCell * master() const
Definition: splitCell.H:113
A class for handling words, derived from Foam::string.
Definition: word.H:68
static word printf(const char *fmt, const PrimitiveType &val)
Use a printf-style formatter for a primitive.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
#define DetailInfo
Definition: evalEntry.C:37
OBJstream os(runTime.globalPath()/outputName)
runTimeSource setTime(sourceTimes[sourceTimeIndex], sourceTimeIndex)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Definition: BitOps.H:78
Smanip< ios_base::fmtflags > setf(const ios_base::fmtflags flags)
Definition: IOmanip.H:169
List< label > labelList
A List of labels.
Definition: List.H:66
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
Definition: MSwindows.C:515
static void writeHeader(Ostream &os, const word &fieldName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Omanip< int > setw(const int i)
Definition: IOmanip.H:199
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
bool rmDir(const fileName &directory, const bool silent=false)
Remove a directory and its contents (optionally silencing warnings)
Definition: MSwindows.C:1036
errorManip< error > abort(error &err)
Definition: errorManip.H:144
static Ostream & output(Ostream &os, const IntRange< T > &range)
Definition: IntRanges.C:66
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition: HashSet.H:85
error FatalError
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
Definition: MSwindows.C:651
Ostream & flush(Ostream &os)
Flush stream.
Definition: Ostream.H:364
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
word format(conversionProperties.get< word >("format"))
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
Definition: stdFoam.H:278
const word cloudName(propsDict.get< word >("cloud"))