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