Loading...
Searching...
No Matches
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-2025 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/>.
26\*---------------------------------------------------------------------------*/
27
28#include "regionFaModel.H"
29
30// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31
33{
34 if (!regionMeshPtr_)
35 {
37 << "No finite-area mesh (" << areaName_ << ") available"
39 }
40
41 return *regionMeshPtr_;
42}
43
44
46{
47 if (!regionMeshPtr_)
48 {
50 << "No finite-area mesh (" << areaName_ << ") available"
51 << abort(FatalError);
52 }
53
54 return *regionMeshPtr_;
55}
56
57
58inline const Foam::IOdictionary&
60{
61 if (!outputPropertiesPtr_)
62 {
64 << "outputProperties dictionary not available"
65 << abort(FatalError);
66 }
67
68 return *outputPropertiesPtr_;
69}
70
71
74{
75 if (!outputPropertiesPtr_)
76 {
78 << "outputProperties dictionary not available"
79 << abort(FatalError);
80 }
81
82 return *outputPropertiesPtr_;
83}
84
85
86inline const Foam::dictionary&
88{
89 return regionMesh().solutionDict();
90}
91
92
93inline const Foam::labelList&
95{
96 return regionMesh().whichPolyPatches();
97}
98
99
101(
102 const label patchi
103) const
104{
105 return primaryPatchIDs().contains(patchi);
106}
107
108
109inline Foam::word
111{
112 return word(base + suffixHint_);
113}
114
115
116inline Foam::word
117Foam::regionModels::regionFaModel::suffixed(const std::string& base) const
118{
119 return word(base + suffixHint_);
120}
121
122
123// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
autoPtr< IOdictionary > outputPropertiesPtr_
Dictionary of output properties.
word areaName_
The finite-area mesh name (default: region0).
word suffixHint_
Suffix hint for automatic model variable names (default: "").
const dictionary & solution() const
Return the solution dictionary.
word suffixed(const char *base) const
Return the concatenation of base and the suffix hint.
bool isRegionPatch(const label patchi) const
True if patchi on the primary region is coupled to this region.
autoPtr< faMesh > regionMeshPtr_
Pointer to the region mesh database.
const faMesh & regionMesh() const
Return the region mesh database.
const IOdictionary & outputProperties() const
Return const access to the output properties dictionary.
const labelList & primaryPatchIDs() const
List of patch IDs on the primary region coupled to this region.
A class for handling words, derived from Foam::string.
Definition word.H:66
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition error.H:600
List< label > labelList
A List of labels.
Definition List.H:62
errorManip< error > abort(error &err)
Definition errorManip.H:139
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...