blockMeshConfigurationBase.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) 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 Class
25  Foam::blockMeshConfigurationBase
26 
27 Description
28  Functions to configure and write a blockMeshDict configuration file.
29 
30 SourceFiles
31  blockMeshConfigurationBase.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef blockMeshConfigurationBase_H
36 #define blockMeshConfigurationBase_H
37 
38 #include "caseFileConfiguration.H"
39 #include "meshingSurfaceList.H"
40 #include "boundBox.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class blockMeshConfigurationBase Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55 protected:
56 
57  // Protected Data
58 
59  //- Bounding box for the background mesh block
60  boundBox bb_;
61 
62  //- Optional settings for patch names and types in the background mesh
64 
65 
66  // Protected Member Functions
67 
68  //- Round a bounding box by the rounding scale
69  void roundBoundingBox(boundBox& bb, const scalar s);
70 
71  //- Parse the patch commandline options
72  Pair<word> readPatchOption(const word& option) const;
73 
74  //- Write a vertex entry in the vertices list
75  void writeVertex
76  (
77  const word& x,
78  const word& y,
79  const word& z
80  );
81 
82 
83 public:
84 
85  // Constructors
86 
87  //- Construct from components
89  (
90  const fileName& name,
91  const fileName& dir,
92  const Time& time,
93  const meshingSurfaceList& surfaces,
94  const HashTable<Pair<word>>& patchOpts
95  );
96 
97  //- Disallow default bitwise copy construction
99 
100 
101  //- Destructor
103 
104 
105  // Member Operators
106 
107  //- Disallow default bitwise assignment
108  void operator=(const blockMeshConfigurationBase&) = delete;
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
scalar y
An STL-conforming hash table.
Definition: HashTable.H:127
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
Functions to configure and write a blockMeshDict configuration file.
HashTable< Pair< word > > patchOpts_
Optional settings for patch names and types in the background mesh.
void writeVertex(const word &x, const word &y, const word &z)
Write a vertex entry in the vertices list.
void roundBoundingBox(boundBox &bb, const scalar s)
Round a bounding box by the rounding scale.
Pair< word > readPatchOption(const word &option) const
Parse the patch commandline options.
blockMeshConfigurationBase(const fileName &name, const fileName &dir, const Time &time, const meshingSurfaceList &surfaces, const HashTable< Pair< word >> &patchOpts)
Construct from components.
boundBox bb_
Bounding box for the background mesh block.
void operator=(const blockMeshConfigurationBase &)=delete
Disallow default bitwise assignment.
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:59
Base class for writing case files.
A class for handling file names.
Definition: fileName.H:82
List of meshingSurfaces which stores the overall bounding box of all the meshingSurfaces.
A class for handling words, derived from string.
Definition: word.H:62
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Namespace for OpenFOAM.
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39