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 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 
52 template<class SourcePatch, class TargetPatch>
54 :
55  public faceAreaWeightAMI<SourcePatch, TargetPatch>
56 {
57 
58 private:
59 
60  // Private Member Functions
61 
62  //- No copy construct
64 
65  //- No copy assignment
66  void operator=(const partialFaceAreaWeightAMI&) = delete;
67 
68  // Marching front
69 
70  //- Set the source and target seed faces
71  virtual void setNextFaces
72  (
73  label& startSeedi,
74  label& srcFacei,
75  label& tgtFacei,
76  const boolList& mapFlag,
77  labelList& seedFaces,
78  const DynamicList<label>& visitedFaces,
79  bool errorOnNotFound = true
80  ) const;
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("partialFaceAreaWeightAMI");
87 
88 
89  // Constructors
90 
91  //- Construct from components
93  (
94  const SourcePatch& srcPatch,
95  const TargetPatch& tgtPatch,
97  const bool reverseTarget = false,
98  const bool requireMatch = true
99  );
100 
101 
102  //- Destructor
103  virtual ~partialFaceAreaWeightAMI();
104 
105 
106  // Member Functions
107 
108  // Access
109 
110  //- Flag to indicate that interpolation patches are conformal
111  virtual bool conformal() const;
112 
113 
114  // Manipulation
115 
116  //- Update addressing and weights
117  virtual void calculate
118  (
119  labelListList& srcAddress,
120  scalarListList& srcWeights,
121  labelListList& tgtAddress,
122  scalarListList& tgtWeights,
123  label srcFacei = -1,
124  label tgtFacei = -1
125  );
126 
127  //- Set the face areas for parallel runs
128  virtual void setMagSf
129  (
130  const TargetPatch& tgtPatch,
131  const mapDistribute& map,
134  ) const;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #ifdef NoRepository
145  #include "partialFaceAreaWeightAMI.C"
146 #endif
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
partialFaceAreaWeightAMI.C
Foam::partialFaceAreaWeightAMI::conformal
virtual bool conformal() const
Flag to indicate that interpolation patches are conformal.
Definition: partialFaceAreaWeightAMI.C:92
Foam::partialFaceAreaWeightAMI::~partialFaceAreaWeightAMI
virtual ~partialFaceAreaWeightAMI()
Destructor.
Definition: partialFaceAreaWeightAMI.C:85
Foam::faceAreaIntersect::triangulationMode
triangulationMode
Definition: faceAreaIntersect.H:62
Foam::DynamicList< label >
Foam::AMIMethod::tgtMagSf
const List< scalar > & tgtMagSf() const
Return const access to target patch face areas.
Definition: AMIMethodI.H:46
Foam::partialFaceAreaWeightAMI::calculate
virtual void calculate(labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label srcFacei=-1, label tgtFacei=-1)
Update addressing and weights.
Definition: partialFaceAreaWeightAMI.C:100
Foam::faceAreaWeightAMI
Face area weighted Arbitrary Mesh Interface (AMI) method.
Definition: faceAreaWeightAMI.H:52
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::AMIMethod::srcMagSf
const List< scalar > & srcMagSf() const
Return const access to source patch face areas.
Definition: AMIMethodI.H:30
Foam::mapDistribute
Class containing processor-to-processor mapping information.
Definition: mapDistribute.H:163
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
faceAreaWeightAMI.H
Foam::List< bool >
Foam::partialFaceAreaWeightAMI
Partial face area weighted Arbitrary Mesh Interface (AMI) method.
Definition: partialFaceAreaWeightAMI.H:52
Foam::partialFaceAreaWeightAMI::TypeName
TypeName("partialFaceAreaWeightAMI")
Runtime type information.
Foam::partialFaceAreaWeightAMI::setMagSf
virtual void setMagSf(const TargetPatch &tgtPatch, const mapDistribute &map, scalarList &srcMagSf, scalarList &tgtMagSf) const
Set the face areas for parallel runs.
Definition: partialFaceAreaWeightAMI.C:157