mappedFvPatchBase.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) 2023-2024 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::mappedFvPatchBase
26 
27 Description
28  Base class for fv patches that provide interpolative mapping between two
29  globally conforming fv patches
30 
31 SourceFiles
32  mappedFvPatchBase.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef mappedFvPatchBase_H
37 #define mappedFvPatchBase_H
38 
39 #include "mappedFvPatchBaseBase.H"
40 #include "mappedPatchBase.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class fvMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class mappedFvPatchBase Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
56 {
57  // Private Data
58 
59  //- Poly patch mapper base
60  const mappedPatchBase& mapper_;
61 
62 
63  // Private Member Functions
64 
65  //- Map/interpolate a neighbour patch field to this patch
66  template<class Type>
67  tmp<Field<Type>> fromNeighbour(const Field<Type>& nbrFld) const;
68 
69  //- Map/interpolate a patch field to the neighbour patch
70  template<class Type>
71  tmp<Field<Type>> toNeighbour(const Field<Type>& fld) const;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("mappedFvPatchBase");
78 
79 
80  // Constructors
81 
82  //- Construct from a patch
84 
85 
86  //- Destructor
87  virtual ~mappedFvPatchBase();
88 
89 
90  // Member Functions
91 
92  //- Map/interpolate
94  (
96  );
97 };
98 
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace Foam
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #endif
107 
108 // ************************************************************************* //
Pre-declare SubField and related Field type.
Definition: Field.H:83
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
Base class for fv patches that provide mapping between two fv patches.
const fvPatch & patch() const
Reference to the fvPatch.
Base class for fv patches that provide interpolative mapping between two globally conforming fv patch...
TypeName("mappedFvPatchBase")
Runtime type information.
mappedFvPatchBase(const fvPatch &patch)
Construct from a patch.
FOR_ALL_FIELD_TYPES(DEFINE_MAPPED_FV_PATCH_BASE_FROM_AND_TO_NEIGHBOUR,)
Map/interpolate.
virtual ~mappedFvPatchBase()
Destructor.
Engine and base class for poly patches which provides interpolative mapping between two globally conf...
A class for managing temporary objects.
Definition: tmp.H:55
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define DEFINE_MAPPED_FV_PATCH_BASE_FROM_AND_TO_NEIGHBOUR(Type, Modifier)
Namespace for OpenFOAM.