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-------------------------------------------------------------------------------
10License
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
34namespace Foam
35{
36namespace simplifiedMeshes
37{
39
41 (
44 time
45 );
46}
47}
48
49
50// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51
53(
54 const Time& runTime,
55 const scalar d
56)
57:
59 (
61 (
62 polyMesh::defaultRegion,
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 ),
82 labelList(6, Zero),
83 labelList()
84 )
85{
87
88 patches[0] = new emptyPolyPatch
89 (
90 "boundary",
91 6,
92 0,
93 0,
96 );
97
98 addFvPatches(patches);
99
100 // Note: no sets or zones created
101}
102
103
104// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:63
reference ref() const
A reference to the entry (Error if not found)
Definition: dictionary.H:225
Empty front and back plane patch. Used for 2-D geometries.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Functions to generate simplified finite volume meshes.
Generates a single hex cell representation of a mesh.
Definition: hexCellFvMesh.H:55
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
const polyBoundaryMesh & patches
engineTime & runTime
word timeName
Definition: getTimeIndex.H:3
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition: List.H:66
vector point
Point is a vector.
Definition: point.H:43
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
List< face > faceList
A List of faces.
Definition: faceListFwd.H:47
static const char *const typeName
The type name used in ensight case files.