hexCellFvMesh.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) 2018-2022 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "hexCellFvMesh.H"
29 #include "hexCell.H"
30 #include "emptyPolyPatch.H"
32 
33 // * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace simplifiedMeshes
38 {
39  defineTypeNameAndDebug(hexCellFvMesh, 0);
40 
42  (
43  simplifiedFvMesh,
44  hexCellFvMesh,
45  time
46  );
47 }
48 }
49 
50 
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 
54 (
55  const Time& runTime,
56  const scalar d
57 )
58 :
60  (
61  IOobject
62  (
63  polyMesh::defaultRegion,
64  runTime.timeName(),
65  runTime,
66  IOobject::READ_IF_PRESENT,
67  IOobject::NO_WRITE
68  ),
69  pointField(boundBox(point::zero, point::uniform(d)).hexCorners()),
70  faceList(boundBox::hexFaces()),
71  labelList(6, Zero), // Owner
72  labelList() // Neighbour
73  )
74 {
76 
77  patches.set
78  (
79  0,
80  new emptyPolyPatch
81  (
82  "boundary",
83  6,
84  0,
85  0,
86  boundaryMesh(),
87  emptyPolyPatch::typeName
88  )
89  );
90 
92 
93  // Note: no sets or zones created
94 }
95 
96 
97 // ************************************************************************* //
defineTypeNameAndDebug(simplifiedDynamicFvMeshBase, 0)
hexCellFvMesh(const Time &runTime, const scalar d=1)
Constructor.
Definition: hexCellFvMesh.C:47
engineTime & runTime
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:63
Functions to generate simplified finite volume meshes.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
Macros for easy insertion into run-time selection tables.
addToRunTimeSelectionTable(simplifiedDynamicFvMeshBase, simplifiedstaticFvMesh, time)
word timeName
Definition: getTimeIndex.H:3
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Definition: polyMesh.H:608
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void addFvPatches(polyPatchList &plist, const bool validBoundary=true)
Add boundary patches. Constructor helper.
Definition: fvMesh.C:662
Empty front and back plane patch. Used for 2-D geometries.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
const polyBoundaryMesh & patches
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:57
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127