TimePathsI.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) 2018-2021 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// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29
30inline bool Foam::TimePaths::distributed() const noexcept
31{
32 return distributed_;
33}
34
35
37{
38 return processorCase_;
39}
40
41
42inline bool Foam::TimePaths::processorCase(bool isProcessorCase) noexcept
43{
44 bool old(processorCase_);
45 processorCase_ = isProcessorCase;
46 return old;
47}
48
49
51{
52 return rootPath_;
53}
54
55
57{
58 return globalCaseName_;
59}
60
61
63{
64 return case_;
65}
66
67
69{
70 return case_;
71}
72
73
75{
76 return rootPath()/caseName();
77}
78
79
81{
82 return rootPath()/globalCaseName();
83}
84
85
87(
88 const fileName& input,
89 const bool caseTag
90) const
91{
92 return input.relative(globalPath(), caseTag);
93}
94
95
97{
98 return constant_;
99}
100
101
103{
104 return system_;
105}
106
107
109{
110 if (processorCase_)
111 {
112 return ".."/constant();
113 }
114
115 return constant();
116}
117
118
120{
121 if (processorCase_)
122 {
123 return ".."/system();
125
126 return system();
127}
128
129
131{
132 return path()/constant();
134
135
137{
138 return path()/system();
139}
140
141
142// ************************************************************************* //
const fileName & caseName() const
Return case name.
Definition: TimePathsI.H:62
const word & system() const
Return system name.
Definition: TimePathsI.H:102
const fileName & globalCaseName() const
Return global case name.
Definition: TimePathsI.H:56
bool distributed() const noexcept
Definition: TimePathsI.H:30
fileName relativePath(const fileName &input, const bool caseTag=false) const
Definition: TimePathsI.H:87
fileName caseConstant() const
Definition: TimePathsI.H:108
fileName path() const
Return path for the case.
Definition: TimePathsI.H:74
fileName caseSystem() const
Definition: TimePathsI.H:119
const fileName & rootPath() const
Return root path.
Definition: TimePathsI.H:50
const word & constant() const
Return constant name.
Definition: TimePathsI.H:96
bool processorCase() const noexcept
Return true if this is a processor case.
Definition: TimePathsI.H:36
fileName constantPath() const
Return constant path.
Definition: TimePathsI.H:130
fileName systemPath() const
Return system path.
Definition: TimePathsI.H:136
fileName globalPath() const
Return global path for the case.
Definition: TimePathsI.H:80
A class for handling file names.
Definition: fileName.H:76
constant condensation/saturation model.
A class for handling words, derived from Foam::string.
Definition: word.H:68
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
int system(const std::string &command, const bool bg=false)
Execute the specified command via the shell.
Definition: MSwindows.C:1158
static Istream & input(Istream &is, IntRange< T > &range)
Definition: IntRanges.C:55
const direction noexcept
Definition: Scalar.H:223