mergeAndWrite.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25  Tools for checking the mesh
26 
27 SourceFiles
28  mergeAndWrite.C
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef mergeAndWrite_H
33 #define mergeAndWrite_H
34 
35 #include "indirectPrimitivePatch.H"
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41  class polyMesh;
42  class surfaceWriter;
43  class setWriter;
44  class pointSet;
45  class faceSet;
46  class cellSet;
47 
48 namespace meshCheck
49 {
50  //- Output directory for sets and surfaces
52 
53  //- Print mesh statistics
54  void printMeshStats(const polyMesh& mesh, const bool allTopology);
55 
56  //- Generate merged surface on master and write. Needs input patch
57  // to be of mesh faces.
58  void mergeAndWrite
59  (
60  const polyMesh& mesh,
61  const surfaceWriter& setWriter,
62  const word& name,
63  const indirectPrimitivePatch setPatch,
64  const fileName& outputDir
65  );
66 
67  //- Write representation of (assembled) faceSet to surface file in
68  // postProcessing/ directory
69  void mergeAndWrite(const surfaceWriter&, const faceSet&);
70 
71  //- Write representation of (assembled) cellSet to surface file in
72  // postProcessing/ directory
73  void mergeAndWrite(const surfaceWriter&, const cellSet&);
74 
75  //- Write representation of (assembled) pointSet to 'set' file in
76  // postProcessing/ directory
77  void mergeAndWrite(const setWriter&, const pointSet&);
78 }
79 }
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 #endif
84 
85 // ************************************************************************* //
A collection of cell labels.
Definition: cellSet.H:51
A list of face labels.
Definition: faceSet.H:51
A class for handling file names.
Definition: fileName.H:82
A set of point labels.
Definition: pointSet.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Base class for writing coordinate sets with data.
Definition: setWriter.H:64
Base class for surface writers.
Definition: surfaceWriter.H:55
A class for handling words, derived from string.
Definition: word.H:62
void mergeAndWrite(const polyMesh &mesh, const surfaceWriter &setWriter, const word &name, const indirectPrimitivePatch setPatch, const fileName &outputDir)
Generate merged surface on master and write. Needs input patch.
fileName checkMeshOutputDir(const polyMesh &mesh)
Output directory for sets and surfaces.
void printMeshStats(const polyMesh &mesh, const bool allTopology)
Print mesh statistics.
Definition: mergeAndWrite.C:50
Namespace for OpenFOAM.
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39