processorLagrangianPatchField.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::processorLagrangianPatchField
26 
27 Description
28  A processor boundary condition for Lagrangian. Properties are communicated
29  to and from the neighbour patch.
30 
31 Usage
32  Example specification:
33  \verbatim
34  <LagrangianPatchName>
35  {
36  type processor;
37  }
38  \endverbatim
39 
40 SourceFiles
41  processorLagrangianPatchField.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef processorLagrangianPatchField_H
46 #define processorLagrangianPatchField_H
47 
48 #include "LagrangianPatchField.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class processorLagrangianPatchField Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Type>
62 :
63  public LagrangianPatchField<Type>
64 {
65 private:
66 
67  // Private Data
68 
69  //- Reference to the processor patch
70  const processorLagrangianPatch& processorPatch_;
71 
72 
73  // Private Member Functions
74 
75  //- Evaluate, given the internal field
76  template<template<class> class GeoField>
77  void evaluate(PstreamBuffers&, const GeoField<Type>& internalField);
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("processor");
84 
85 
86  // Constructors
87 
88  //- Construct from patch and internal field
90  (
91  const LagrangianPatch&,
92  const regIOobject&
93  );
94 
95  //- Construct from patch, internal field and dictionary
97  (
98  const LagrangianPatch&,
99  const regIOobject&,
100  const dictionary&
101  );
102 
103  //- Construct as copy
105  (
107  );
108 
109  //- Construct as copy setting the internal field reference
111  (
113  const regIOobject&
114  );
115 
116  //- Construct as copy setting the patch and the internal field reference
118  (
120  const LagrangianPatch&,
121  const regIOobject&
122  );
123 
124  //- Construct and return a clone
126  {
128  (
130  (
131  *this
132  )
133  );
134  }
135 
136  //- Construct and return a clone setting the internal field reference
138  (
139  const regIOobject& iIo
140  ) const
141  {
143  (
145  (
146  *this,
147  iIo
148  )
149  );
150  }
151 
152  //- Construct and return a clone onto a new patch
153  // and setting the internal field reference
155  (
156  const LagrangianPatch& p,
157  const regIOobject& iIo
158  ) const
159  {
161  (
163  (
164  *this,
165  p,
166  iIo
167  )
168  );
169  }
170 
171 
172  // Member Functions
173 
174  //- Initialise evaluation of the patch field
175  virtual void initEvaluate
176  (
179  );
180 
181  //- Evaluate the patch field
182  virtual void evaluate
183  (
186  );
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #ifdef NoRepository
198 #endif
199 
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 
202 #endif
203 
204 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Base class for Lagrangian boundary conditions.
const LagrangianInternalDynamicField< Type > & internalField() const
Return internal field reference.
Base class for Lagrangian patches.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A processor boundary condition for Lagrangian. Properties are communicated to and from the neighbour ...
processorLagrangianPatchField(const LagrangianPatch &, const regIOobject &)
Construct from patch and internal field.
virtual void initEvaluate(PstreamBuffers &, const LagrangianScalarInternalDynamicField &fraction)
Initialise evaluation of the patch field.
virtual autoPtr< LagrangianPatchField< Type > > clone() const
Construct and return a clone.
TypeName("processor")
Runtime type information.
Processor Lagrangian patch. This is used for the patches that interface between processors across fac...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
Namespace for OpenFOAM.
void evaluate(GeometricField< Type, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, GeoMesh > &x)
volScalarField & p