nonConformalCyclicLagrangianPatch.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) 2025 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::nonConformalCyclicLagrangianPatch
26 
27 Description
28  Non-conformal-cyclic Lagrangian patch
29 
30 SourceFiles
31  nonConformalCyclicLagrangianPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef nonConformalCyclicLagrangianPatch_H
36 #define nonConformalCyclicLagrangianPatch_H
37 
38 #include "LagrangianPatch.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class nonConformalCyclicLagrangianPatch Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public LagrangianPatch
53 {
54 private:
55 
56  // Private Data
57 
58  //- Reference to the nonConformalCyclic poly patch
59  const nonConformalCyclicPolyPatch& nonConformalCyclicPatch_;
60 
61  //- Between crossFaces/evaluate and partition the elements have moved
62  // to the neighbour patch, but the mesh has not been partitioned. So,
63  // the sub-mesh that relates to a cyclic patch's elements is that of
64  // the neighbour patch. This flag identifies when this is the case.
65  mutable bool isNbrPatchMesh_;
66 
67  //- The number of boundary hits that occurred during locate executions
68  mutable label nPositionalErrors_;
69 
70  //- The maximum positional error (squared) following a transfer
71  mutable scalar maxPositionalErrorSqr_;
72 
73  //- The location of the maximum positional error following a transfer
74  mutable point maxPositionalErrorReceivePosition_;
75 
76 
77 public:
78 
79  // Friend classes
80 
81  //- The non-conformal processor cyclic needs to add into the positional
82  // error variables of the non-processor cyclic patch
84 
85 
86  //- Runtime type information
87  TypeName(nonConformalCyclicPolyPatch::typeName_());
88 
89 
90  // Constructors
91 
92  //- Construct from a patch and a boundary mesh
94  (
95  const polyPatch&,
97  );
98 
99 
100  //- Destructor
102 
103 
104  // Member Functions
105 
106  //- Return the nonConformalCyclic patch
108  {
109  return nonConformalCyclicPatch_;
110  }
111 
112  //- Return a reference to the nonConformalCyclic patch's transform
113  const transformer& transform() const
114  {
115  return nonConformalCyclicPatch_.transform();
116  }
117 
118  //- Return the sub-mesh associated with this patch
119  virtual const LagrangianSubMesh& mesh() const;
120 
121  //- Evaluate changes in elements that have tracked to this patch
122  virtual void evaluate
123  (
127  ) const;
128 
129  //- Update following partitioning of the mesh
130  virtual void partition() const;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Boundary part of a Lagrangian mesh. Just a list of Lagrangian patches with some added convenience fun...
Class containing Lagrangian geometry and topology.
Base class for Lagrangian patches.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
nonConformalCyclicLagrangianPatch(const polyPatch &, const LagrangianBoundaryMesh &)
Construct from a patch and a boundary mesh.
TypeName(nonConformalCyclicPolyPatch::typeName_())
Runtime type information.
const nonConformalCyclicPolyPatch & nonConformalCyclicPatch() const
Return the nonConformalCyclic patch.
virtual void partition() const
Update following partitioning of the mesh.
const transformer & transform() const
Return a reference to the nonConformalCyclic patch's transform.
virtual void evaluate(PstreamBuffers &, LagrangianMesh &, const LagrangianScalarInternalDynamicField &fraction) const
Evaluate changes in elements that have tracked to this patch.
virtual const LagrangianSubMesh & mesh() const
Return the sub-mesh associated with this patch.
Non-conformal cyclic poly patch. As nonConformalCoupledPolyPatch, but the neighbouring patch is local...
virtual const transformer & transform() const
Inherit the cyclic transform method.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
Namespace for OpenFOAM.
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