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 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 "emptyPolyPatch.H"
31 
32 // * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace simplifiedMeshes
37 {
38  defineTypeNameAndDebug(hexCellFvMesh, 0);
39 
41  (
42  simplifiedFvMesh,
43  hexCellFvMesh,
44  time
45  );
46 }
47 }
48 
49 
50 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 
53 (
54  const Time& runTime,
55  const scalar d
56 )
57 :
59  (
60  IOobject
61  (
62  polyMesh::defaultRegion,
63  runTime.timeName(),
64  runTime,
65  IOobject::READ_IF_PRESENT,
66  IOobject::NO_WRITE
67  ),
69  (
70  {
71  point(0, 0, 0),
72  point(d, 0, 0),
73  point(d, d, 0),
74  point(0, d, 0),
75  point(0, 0, d),
76  point(d, 0, d),
77  point(d, d, d),
78  point(0, d, d)
79  }
80  ),
81  faceList(cellModel::ref(cellModel::HEX).modelFaces()),
82  labelList(6, Zero),
83  labelList()
84  )
85 {
87 
88  patches[0] = new emptyPolyPatch
89  (
90  "boundary",
91  6,
92  0,
93  0,
94  boundaryMesh(),
95  emptyPolyPatch::typeName
96  );
97 
98  addFvPatches(patches);
99 
100  // Note: no sets or zones created
101 }
102 
103 
104 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::simplifiedMeshes::hexCellFvMesh::hexCellFvMesh
hexCellFvMesh(const Time &runTime, const scalar d=1)
Constructor.
Definition: hexCellFvMesh.C:53
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::simplifiedMeshes::addToRunTimeSelectionTable
addToRunTimeSelectionTable(simplifiedDynamicFvMeshBase, simplifiedstaticFvMesh, time)
ref
rDeltaT ref()
Foam::Field< vector >
hexCellFvMesh.H
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::simplifiedMeshes::defineTypeNameAndDebug
defineTypeNameAndDebug(simplifiedDynamicFvMeshBase, 0)
emptyPolyPatch.H
Foam::emptyPolyPatch
Empty front and back plane patch. Used for 2-D geometries.
Definition: emptyPolyPatch.H:50
Foam::simplifiedFvMesh
Functions to generate simplified finite volume meshes.
Definition: simplifiedFvMesh.H:52
Foam::faceList
List< face > faceList
A List of faces.
Definition: faceListFwd.H:47
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
patches
const polyBoundaryMesh & patches
Definition: convertProcessorPatches.H:65
Foam::boundaryMesh
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:62
Foam::point
vector point
Point is a vector.
Definition: point.H:43