directAMI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::directAMI
26 
27 Description
28  Direct mapped Arbitrary Mesh Interface (AMI) method
29 
30 SourceFiles
31  directAMI.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef directAMI_H
36 #define directAMI_H
37 
38 #include "AMIMethod.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class directAMI Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class directAMI
50 :
51  public AMIMethod
52 {
53  // Private Member Functions
54 
55  // Marching front
56 
57  //- Append to list of src face seed indices
58  void appendToDirectSeeds
59  (
60  labelList& mapFlag,
61  labelList& srcTgtSeed,
62  DynamicList<label>& srcSeeds,
63  DynamicList<label>& nonOverlapFaces,
64  label& srcFacei,
65  label& tgtFacei
66  ) const;
67 
68  //- Restart the advancing front - typically happens for
69  // disconnected regions
70  void restartAdvancingFront
71  (
72  labelList& mapFlag,
73  DynamicList<label>& nonOverlapFaces,
74  label& srcFacei,
75  label& tgtFacei
76  ) const;
77 
78 
79  // Evaluation
80 
81  //- Area of intersection between source and target faces
82  scalar interArea
83  (
84  const label srcFacei,
85  const label tgtFacei
86  ) const;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("directAMI");
93 
94 
95  // Constructors
96 
97  //- Construct from components
98  directAMI
99  (
100  const primitivePatch& srcPatch,
101  const primitivePatch& tgtPatch,
102  const scalarField& srcMagSf,
103  const scalarField& tgtMagSf,
105  const bool reverseTarget = false,
106  const bool requireMatch = true
107  );
108 
109  //- Disallow default bitwise copy construction
110  directAMI(const directAMI&) = delete;
111 
112 
113  //- Destructor
114  virtual ~directAMI();
115 
116 
117  // Member Functions
118 
119  // Manipulation
120 
121  //- Update addressing and weights
122  virtual void calculate
123  (
124  labelListList& srcAddress,
125  scalarListList& srcWeights,
126  labelListList& tgtAddress,
127  scalarListList& tgtWeights,
128  label srcFacei = -1,
129  label tgtFacei = -1
130  );
131 
132 
133  // Member Operators
134 
135  //- Disallow default bitwise assignment
136  void operator=(const directAMI&) = delete;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
Direct mapped Arbitrary Mesh Interface (AMI) method.
Definition: directAMI.H:48
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:59
TypeName("directAMI")
Runtime type information.
void operator=(const directAMI &)=delete
Disallow default bitwise assignment.
directAMI(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const scalarField &srcMagSf, const scalarField &tgtMagSf, const faceAreaIntersect::triangulationMode &triMode, const bool reverseTarget=false, const bool requireMatch=true)
Construct from components.
Definition: directAMI.C:199
A list of faces which address into the list of points.
virtual void calculate(labelListList &srcAddress, scalarListList &srcWeights, labelListList &tgtAddress, scalarListList &tgtWeights, label srcFacei=-1, label tgtFacei=-1)
Update addressing and weights.
Definition: directAMI.C:231
Base class for Arbitrary Mesh Interface (AMI) methods.
Definition: AMIMethod.H:55
virtual ~directAMI()
Destructor.
Definition: directAMI.C:224
Namespace for OpenFOAM.