columnFvMesh.H
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-2019 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
26Class
27 Foam::simplifiedMeshes::columnFvMesh
28
29Description
30 Generates a 1D column representation of a mesh based on an existing mesh
31 and/or fields
32
33SourceFiles
34 columnFvMesh.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef simplifiedMeshes_columnFvMesh_H
39#define simplifiedMeshes_columnFvMesh_H
40
41#include "simplifiedFvMesh.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47namespace simplifiedMeshes
48{
49
50/*---------------------------------------------------------------------------*\
51 Class columnFvMesh Declaration
52\*---------------------------------------------------------------------------*/
55{
56 // Private Member Functions
57
58 //- Set the patch dictionary entries using the mesh or field files
59 bool setPatchEntries(const Time& runTime);
60
61 //- Initialise
62 void initialise(const Time& runTime);
63
64 //- Helper function to initialise empty zones
65 template<class ZoneMeshType>
66 void initialiseZone
67 (
68 const word& zoneTypeName,
69 const fileName& instance,
70 ZoneMeshType& zoneType
71 );
72
73
74protected:
75
76 // Protected Data
77
78 //- Region of existing mesh
79 const word regionName_;
80
81 //- Location of existing mesh (if present)
82 const word localInstance_;
83
84 //- Created from existing mesh (false = from field)
85 bool createFromMesh_;
86
87 // Temporary mesh data used during construction of columnFvMesh
88 // Note: transferred to columnFvMesh
89
90 //- Points
92
93 //- Faces
95
96 //- Owner addressing
98
99 //- Neighbour addressing
101
102
103 // Patch data
104
105 //- Dictionary of patch information
107
108 //- Number of patches with at least 1 local face
109 label nPatchWithFace_;
110
111
112 // Protected Member Functions
113
114 //- Add the patches to the mesh
115 void addLocalPatches(fvMesh& mesh) const;
116
117 //- Initialise zones if constructed from mesh
119
120
121public:
122
123 //- Runtime type information
124 ClassName("columnFvMeshInfo");
125
126 // Constructor
128 (
129 const Time& runTime,
130 const word& regionName
131 );
132};
133
135class columnFvMesh
136:
137 public columnFvMeshInfo,
138 public simplifiedFvMesh
139{
140
141public:
142
143 //- Runtime type information
144 TypeName("columnFvMesh");
145
146 //- Constructor
148 (
149 const Time& runTime,
151 );
152};
153
154
155// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156
157} // End namespace simplifiedMeshes
158} // End namespace Foam
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162#ifdef NoRepository
163 #include "columnFvMeshTemplates.C"
164#endif
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168#endif
169
170// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling file names.
Definition: fileName.H:76
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:321
const word & regionName() const
The mesh region name or word::null if polyMesh::defaultRegion.
Definition: polyMesh.C:854
Functions to generate simplified finite volume meshes.
dictionary patchEntries_
Dictionary of patch information.
Definition: columnFvMesh.H:105
labelList neighbour1D_
Neighbour addressing.
Definition: columnFvMesh.H:99
label nPatchWithFace_
Number of patches with at least 1 local face.
Definition: columnFvMesh.H:108
bool createFromMesh_
Created from existing mesh (false = from field)
Definition: columnFvMesh.H:84
labelList owner1D_
Owner addressing.
Definition: columnFvMesh.H:96
const word regionName_
Region of existing mesh.
Definition: columnFvMesh.H:78
const word localInstance_
Location of existing mesh (if present)
Definition: columnFvMesh.H:81
void addLocalPatches(fvMesh &mesh) const
Add the patches to the mesh.
Definition: columnFvMesh.C:325
void initialiseZones(fvMesh &mesh)
Initialise zones if constructed from mesh.
Definition: columnFvMesh.C:386
ClassName("columnFvMeshInfo")
Runtime type information.
Generates a 1D column representation of a mesh based on an existing mesh and/or fields.
Definition: columnFvMesh.H:138
TypeName("columnFvMesh")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
dynamicFvMesh & mesh
engineTime & runTime
Foam::word regionName(Foam::polyMesh::defaultRegion)
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73