partialFaceAreaWeightAMI.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) 2013-2016 OpenFOAM Foundation
9  Copyright (C) 2016-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 Class
28  Foam::partialFaceAreaWeightAMI
29 
30 Description
31  Partial face area weighted Arbitrary Mesh Interface (AMI) method
32 
33 SourceFiles
34  partialFaceAreaWeightAMI.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef partialFaceAreaWeightAMI_H
39 #define partialFaceAreaWeightAMI_H
40 
41 #include "faceAreaWeightAMI.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class partialFaceAreaWeightAMI Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public faceAreaWeightAMI
55 {
56 
57 private:
58 
59  // Private Member Functions
60 
61  //- No copy assignment
62  void operator=(const partialFaceAreaWeightAMI&) = delete;
63 
64 
65 protected:
66 
67  // Protected Member Functions
68 
69  //- Set the source and target seed faces
70  virtual bool setNextFaces
71  (
72  label& startSeedi,
73  label& srcFacei,
74  label& tgtFacei,
75  const bitSet& mapFlag,
76  labelList& seedFaces,
77  const DynamicList<label>& visitedFaces,
78  const bool errorOnNotFound = true
79  ) const;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("partialFaceAreaWeightAMI");
86 
87 
88  // Constructors
89 
90  //- Construct from dictionary
92  (
93  const dictionary& dict,
94  const bool reverseTarget = false
95  );
96 
97  //- Construct from components
99  (
100  const bool requireMatch = false,
101  const bool reverseTarget = false,
102  const scalar lowWeightCorrection = -1,
105  const bool restartUncoveredSourceFace = true
106  );
107 
108  //- Construct as copy
110 
111  //- Construct and return a clone
112  virtual autoPtr<AMIInterpolation> clone() const
113  {
114  return
116  }
117 
118 
119  //- Destructor
120  virtual ~partialFaceAreaWeightAMI() = default;
121 
122 
123  // Member Functions
124 
125  //- Flag to indicate that interpolation patches are conformal
126  virtual bool conformal() const;
127 
128  //- Update addressing, weights and (optional) centroids
129  virtual bool calculate
130  (
131  const primitivePatch& srcPatch,
132  const primitivePatch& tgtPatch,
133  const autoPtr<searchableSurface>& surfPtr = nullptr
134  );
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Foam::partialFaceAreaWeightAMI::conformal
virtual bool conformal() const
Flag to indicate that interpolation patches are conformal.
Definition: partialFaceAreaWeightAMI.C:120
Foam::faceAreaWeightAMI::restartUncoveredSourceFace
virtual void restartUncoveredSourceFace(List< DynamicList< label >> &srcAddr, List< DynamicList< scalar >> &srcWght, List< DynamicList< point >> &srcCtr, List< DynamicList< label >> &tgtAddr, List< DynamicList< scalar >> &tgtWght)
Attempt to re-evaluate source faces that have not been included.
Definition: faceAreaWeightAMI.C:506
Foam::bitSet
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:63
Foam::faceAreaIntersect::triangulationMode
triangulationMode
Definition: faceAreaIntersect.H:63
Foam::DynamicList< label >
Foam::partialFaceAreaWeightAMI::clone
virtual autoPtr< AMIInterpolation > clone() const
Construct and return a clone.
Definition: partialFaceAreaWeightAMI.H:111
Foam::partialFaceAreaWeightAMI::setNextFaces
virtual bool setNextFaces(label &startSeedi, label &srcFacei, label &tgtFacei, const bitSet &mapFlag, labelList &seedFaces, const DynamicList< label > &visitedFaces, const bool errorOnNotFound=true) const
Set the source and target seed faces.
Definition: partialFaceAreaWeightAMI.C:54
Foam::faceAreaWeightAMI
Face area weighted Arbitrary Mesh Interface (AMI) method.
Definition: faceAreaWeightAMI.H:51
Foam::AMIInterpolation::requireMatch
bool requireMatch() const
Access to the requireMatch flag.
Definition: AMIInterpolationI.H:74
Foam::partialFaceAreaWeightAMI::~partialFaceAreaWeightAMI
virtual ~partialFaceAreaWeightAMI()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::partialFaceAreaWeightAMI::calculate
virtual bool calculate(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr=nullptr)
Update addressing, weights and (optional) centroids.
Definition: partialFaceAreaWeightAMI.C:127
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::AMIInterpolation::lowWeightCorrection
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
Definition: AMIInterpolationI.H:93
Foam::partialFaceAreaWeightAMI::partialFaceAreaWeightAMI
partialFaceAreaWeightAMI(const dictionary &dict, const bool reverseTarget=false)
Construct from dictionary.
Definition: partialFaceAreaWeightAMI.C:80
faceAreaWeightAMI.H
Foam::List< label >
Foam::AMIInterpolation::reverseTarget
bool reverseTarget() const
Access to the reverseTarget flag.
Definition: AMIInterpolationI.H:87
Foam::advancingFrontAMI::srcPatch
const primitivePatch & srcPatch() const
Return const access to the source patch.
Definition: advancingFrontAMII.H:28
Foam::partialFaceAreaWeightAMI
Partial face area weighted Arbitrary Mesh Interface (AMI) method.
Definition: partialFaceAreaWeightAMI.H:51
Foam::advancingFrontAMI::tgtPatch
const primitivePatch & tgtPatch() const
Return const access to the target patch.
Definition: advancingFrontAMII.H:41
Foam::partialFaceAreaWeightAMI::TypeName
TypeName("partialFaceAreaWeightAMI")
Runtime type information.
Foam::faceAreaIntersect::tmMesh
Definition: faceAreaIntersect.H:66
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:85