checkFaMesh.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-2017 Wikki Ltd
9  Copyright (C) 2021 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 Application
28  makeFaMesh
29 
30 Description
31  Check a finiteArea mesh
32 
33 Original Authors
34  Zeljko Tukovic, FAMENA
35  Hrvoje Jasak, Wikki Ltd.
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #include "Time.H"
40 #include "argList.H"
41 #include "faMesh.H"
42 #include "polyMesh.H"
43 #include "areaFaMesh.H"
44 #include "edgeFaMesh.H"
45 #include "areaFields.H"
46 #include "edgeFields.H"
47 #include "processorFaPatch.H"
48 #include "foamVtkUIndPatchWriter.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 using namespace Foam;
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 int main(int argc, char *argv[])
57 {
59  (
60  "Check a finiteArea mesh"
61  );
62 
64  (
65  "write-vtk",
66  "Write mesh as a vtp (vtk) file for display or debugging"
67  );
68 
69  #include "addRegionOption.H"
70  #include "setRootCase.H"
71  #include "createTime.H"
72  #include "createNamedPolyMesh.H"
73 
74 
75  // Create
76  faMesh aMesh(mesh);
77 
78  Info<< "Time = " << runTime.timeName() << nl << endl;
79 
80  #include "printMeshSummary.H"
81 
82  if (args.found("write-vtk"))
83  {
84  #include "faMeshWriteVTK.H"
85  }
86 
87  Info<< "\nEnd\n" << endl;
88 
89  return 0;
90 }
91 
92 
93 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
foamVtkUIndPatchWriter.H
processorFaPatch.H
Foam::Time::timeName
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:780
Foam::argList::addNote
static void addNote(const string &note)
Add extra notes for the usage information.
Definition: argList.C:412
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
faMesh.H
polyMesh.H
createNamedPolyMesh.H
Required Variables.
aMesh
faMesh aMesh(mesh)
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
edgeFields.H
argList.H
addRegionOption.H
edgeFaMesh.H
areaFields.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::argList::addBoolOption
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
Definition: argList.C:324
Time.H
setRootCase.H
areaFaMesh.H
Foam::nl
constexpr char nl
Definition: Ostream.H:404
createTime.H
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:82
args
Foam::argList args(argc, argv)
Foam::argList::found
bool found(const word &optName) const
Return true if the named option is found.
Definition: argListI.H:178