surfaceFieldValueI.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2017-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "Time.H"
30 #include "sampledSurface.H"
31 
32 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
33 
36 {
37  return
38  (
40  || stPatch == regionType_
41  || (sampledPtr_ && sampledPtr_->withSurfaceFields())
42  );
43 }
44 
45 
48 {
49  return (stFaceZone == regionType_ || stPatch == regionType_);
50 }
51 
52 
53 inline const Foam::labelList&
55 {
56  return faceId_;
57 }
58 
59 
60 inline const Foam::labelList&
62 {
63  return facePatchId_;
64 }
65 
66 
67 inline const Foam::boolList&
69 {
70  return faceFlip_;
71 }
72 
73 
74 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75 
76 inline bool
78 {
79  // Operation specifically tagged to use mag
80  return (operation_ & typeAbsolute);
81 }
82 
83 
84 inline bool
86 {
87  // Operation specifically tagged to require a weight field
88  return (operation_ & typeWeighted);
89 }
90 
91 
94 {
95  return regionType_;
96 }
97 
98 
99 inline Foam::fileName
101 {
102  return baseFileDir()/name()/"surface"/time_.timeName();
103 }
104 
105 
106 // ************************************************************************* //
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::functionObjects::fieldValues::surfaceFieldValue::faceFlip
const boolList & faceFlip() const
Return the local true/false list representing the face flip map.
Definition: surfaceFieldValueI.H:68
Foam::functionObjects::fieldValues::surfaceFieldValue::withTopologicalMerge
bool withTopologicalMerge() const
Can use mesh topological merge?
Definition: surfaceFieldValueI.H:47
Foam::functionObjects::fieldValues::surfaceFieldValue::stFaceZone
Calculate with faceZone(s)
Definition: surfaceFieldValue.H:464
Foam::functionObjects::fieldValues::surfaceFieldValue::regionType_
regionTypes regionType_
Region type.
Definition: surfaceFieldValue.H:599
Foam::functionObjects::fieldValues::surfaceFieldValue::withSurfaceFields
bool withSurfaceFields() const
Can the surface definition sample surface-fields?
Definition: surfaceFieldValueI.H:35
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
sampledSurface.H
Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes
regionTypes
Region type enumeration.
Definition: surfaceFieldValue.H:462
Foam::functionObjects::fieldValues::surfaceFieldValue::regionType
regionTypes regionType() const
Return the region type.
Definition: surfaceFieldValueI.H:93
Foam::functionObjects::fieldValues::surfaceFieldValue::usesWeight
bool usesWeight() const
True if the operation variant uses a weight-field.
Definition: surfaceFieldValueI.H:85
Time.H
Foam::List< label >
Foam::functionObjects::fieldValues::surfaceFieldValue::sampledPtr_
autoPtr< sampledSurface > sampledPtr_
The sampledSurface (when operating on sampledSurface)
Definition: surfaceFieldValue.H:642
Foam::functionObjects::fieldValues::surfaceFieldValue::facePatch
const labelList & facePatch() const
Return the local list of patch ID per face.
Definition: surfaceFieldValueI.H:61
Foam::functionObjects::fieldValues::surfaceFieldValue::stPatch
Calculate with patch(es)
Definition: surfaceFieldValue.H:465
Foam::functionObjects::fieldValues::surfaceFieldValue::usesMag
bool usesMag() const
True if the operation variant uses mag.
Definition: surfaceFieldValueI.H:77
Foam::functionObjects::fieldValues::surfaceFieldValue::outputDir
fileName outputDir() const
Return the output directory.
Definition: surfaceFieldValueI.H:100
Foam::functionObjects::fieldValues::surfaceFieldValue::faceId
const labelList & faceId() const
Return the local list of face IDs.
Definition: surfaceFieldValueI.H:54