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-2026 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  //- Set of constraint types
61 
62  //- Bounding box for the background mesh block
63  boundBox bb_;
64 
65  //- Optional settings for patch names and types in the background mesh
67 
68 
69  // Protected Member Functions
70 
71  //- Round a bounding box by the rounding scale
72  void roundBoundingBox(boundBox& bb, const scalar s);
73 
74  //- Parse the patch commandline options
75  Pair<word> readPatchOption(const word& option) const;
76 
77  //- Write a vertex entry in the vertices list
78  void writeVertex
79  (
80  const word& x,
81  const word& y,
82  const word& z
83  );
84 
85 
86 public:
87 
88  // Constructors
89 
90  //- Construct from components
92  (
93  const fileName& name,
94  const fileName& dir,
95  const Time& time,
96  const meshingSurfaceList& surfaces,
97  const HashTable<Pair<word>>& patchOpts
98  );
99 
100  //- Disallow default bitwise copy construction
102 
103 
104  //- Destructor
106 
107 
108  // Member Operators
109 
110  //- Disallow default bitwise assignment
111  void operator=(const blockMeshConfigurationBase&) = delete;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
scalar y
A HashTable with keys but without contents.
Definition: HashSet.H:62
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.
const HashSet< word > constraintTypes_
Set of constraint types.
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:60
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:63
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionSet time
Namespace for OpenFOAM.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.