helpSolver.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) 2015 OpenFOAM Foundation
9  Copyright (C) 2016 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "helpSolver.H"
31 #include "fvMesh.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37  namespace helpTypes
38  {
39  defineTypeNameAndDebug(helpSolver, 0);
41  (
42  helpType,
43  helpSolver,
44  dictionary,
45  solver
46  );
47  }
48 }
49 
50 
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 
54 {}
55 
56 
57 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
58 
60 {}
61 
62 
63 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
64 
66 {
68 
70  (
71  "read",
72  "Read solver type from the system/controlDict"
73  );
74 }
75 
76 
78 (
79  const argList& args,
80  const fvMesh& mesh
81 )
82 {
83  word solver;
84 
85  if (args.readIfPresent("browse", solver))
86  {
87  displayDoc(solver, ".*solvers/.*Foam/", true, "C");
88  }
89  else if (args.found("read"))
90  {
91  mesh.time().controlDict().readEntry("application", solver);
92  displayDoc(solver, ".*solvers/.*Foam/", true, "C");
93  }
94  else
95  {
96  displayDocOptions(".*solvers/.*Foam/", true, "C");
97  }
98 }
99 
100 
101 // ************************************************************************* //
virtual void execute(const argList &args, const fvMesh &mesh)
Execute the help.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
Definition: argList.C:374
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
virtual ~helpSolver()
Destructor.
dynamicFvMesh & mesh
defineTypeNameAndDebug(combustionModel, 0)
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Definition: argListI.H:316
virtual void init()
Initialise - typically setting static variables,.
Foam::argList args(argc, argv)
virtual void init()
Initialise - typically setting static variables,.
bool found(const word &optName) const
Return true if the named option is found.
Definition: argListI.H:171
Namespace for OpenFOAM.