Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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 "hexCell.H"
30#include "emptyPolyPatch.H"
33// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
35namespace Foam
36{
37namespace simplifiedMeshes
38{
40
42 (
45 time
46 );
47}
48}
49
50
51// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52
54(
55 const Time& runTime,
56 const scalar d
57)
58:
60 (
62 (
63 polyMesh::defaultRegion,
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,
81 (
82 "boundary",
83 6,
84 0,
85 0,
87 emptyPolyPatch::typeName
88 )
89 );
90
92
93 // Note: no sets or zones created
94}
95
96
97// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A bounding box defined in terms of min/max extrema points.
Definition boundBox.H:71
Empty front and back plane patch. Used for 2-D geometries.
void addFvPatches(polyPatchList &plist, const bool validBoundary=true)
Add boundary patches. Constructor helper.
Definition fvMesh.C:628
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Definition polyMesh.H:609
static word defaultRegion
Return the default region name.
Definition polyMesh.H:406
Functions to generate simplified finite volume meshes.
simplifiedFvMesh(const IOobject &io, pointField &&points, faceList &&faces, labelList &&allOwner, labelList &&allNeighbour)
Constructor.
Generates a single hex cell representation of a mesh.
hexCellFvMesh(const Time &runTime, const scalar d=1)
Constructor.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
const polyBoundaryMesh & patches
engineTime & runTime
word timeName
Definition getTimeIndex.H:3
Namespace for OpenFOAM.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
Definition polyPatch.H:61
List< label > labelList
A List of labels.
Definition List.H:62
List< face > faceList
List of faces.
Definition faceListFwd.H:41
vector point
Point is a vector.
Definition point.H:37
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
vectorField pointField
pointField is a vectorField.