regionFaModelI.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) 2019-2023 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 "regionFaModel.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
33 {
34  if (!regionMeshPtr_)
35  {
37  << "Region mesh not available"
39  }
40 
41  return *regionMeshPtr_;
42 }
43 
44 
46 {
47  if (!regionMeshPtr_)
48  {
50  << "Region mesh not available"
51  << abort(FatalError);
52  }
53 
54  return *regionMeshPtr_;
55 }
56 
57 
58 inline const Foam::IOdictionary&
60 {
61  if (!outputPropertiesPtr_)
62  {
64  << "outputProperties dictionary not available"
66  }
67  return *outputPropertiesPtr_;
68 }
69 
70 
71 inline Foam::IOdictionary&
73 {
74  if (!outputPropertiesPtr_)
75  {
77  << "outputProperties dictionary not available"
78  << abort(FatalError);
79  }
80 
81  return *outputPropertiesPtr_;
82 }
83 
84 
85 inline const Foam::dictionary&
87 {
88  return regionMesh().solutionDict();
89 }
90 
91 
92 inline const Foam::labelList&
94 {
95  return regionMesh().whichPolyPatches();
96 }
97 
98 
100 (
101  const label patchi
102 ) const
103 {
104  return primaryPatchIDs().found(patchi);
105 }
106 
107 
108 // ************************************************************************* //
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition: faMesh.H:87
const dictionary & solution() const
Return the solution dictionary.
bool isRegionPatch(const label patchi) const
True if patchi on the primary region is coupled to this region.
error FatalError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL ERROR&#39; header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:598
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
autoPtr< faMesh > regionMeshPtr_
Pointer to the region mesh database.
const faMesh & regionMesh() const
Return the region mesh database.
errorManip< error > abort(error &err)
Definition: errorManip.H:139
const labelList & primaryPatchIDs() const
List of patch IDs on the primary region coupled to this region.
const IOdictionary & outputProperties() const
Return const access to the output properties dictionary.