initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / interpolation / volPointInterpolation / pointPatchInterpolation / pointPatchInterpolation.H
blob5f84902662dd5d05b7461c00944e427efdf2a20e
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::pointPatchInterpolation
28 Description
29     Foam::pointPatchInterpolation
31 SourceFiles
32     pointPatchInterpolation.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef pointPatchInterpolation_H
37 #define pointPatchInterpolation_H
39 #include "primitivePatchInterpolation.H"
40 #include "PtrList.H"
41 #include "volFieldsFwd.H"
42 #include "pointFieldsFwd.H"
43 #include "scalarList.H"
44 #include "className.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 // Forward declaration of classes
52 class fvMesh;
53 class pointMesh;
55 /*---------------------------------------------------------------------------*\
56                        Class pointPatchInterpolation Declaration
57 \*---------------------------------------------------------------------------*/
59 class pointPatchInterpolation
61     // Private data
63         const fvMesh& fvMesh_;
64         const pointMesh& pointMesh_;
66         //- Primitive patch interpolators
67         PtrList<primitivePatchInterpolation> patchInterpolators_;
69         //- List of patch-patch edge points that require special treatement
70         labelList patchPatchPoints_;
72         //- Weights for patch-patch boundary points
73         scalarListList patchPatchPointWeights_;
75         labelList patchPatchPointConstraintPoints_;
76         tensorField patchPatchPointConstraintTensors_;
79     // Private member functions
81         //- Construct addressing for patch-patch boundary points
82         void makePatchPatchAddressing();
84         //- Construct weights for patch-patch boundary points
85         void makePatchPatchWeights();
88         //- Disallow default bitwise copy construct
89         pointPatchInterpolation(const pointPatchInterpolation&);
91         //- Disallow default bitwise assignment
92         void operator=(const pointPatchInterpolation&);
95 public:
97     // Declare name of the class and its debug switch
98     ClassName("pointPatchInterpolation");
101     // Constructors
103         //- Constructor given fvMesh and pointMesh.
104         pointPatchInterpolation(const fvMesh&, const pointMesh&);
107     // Destructor
109         ~pointPatchInterpolation();
112     // Member functions
114         // Access
116             const fvMesh& mesh() const
117             {
118                 return fvMesh_;
119             }
121             const pointMesh& pMesh() const
122             {
123                 return pointMesh_;
124             }
127         // Edit
129             //- Update mesh topology using the morph engine
130             void updateMesh();
132             //- Correct weighting factors for moving mesh.
133             bool movePoints();
136     // Interpolation functions
138         template<class Type>
139         void interpolate
140         (
141             const GeometricField<Type, fvPatchField, volMesh>&,
142             GeometricField<Type, pointPatchField, pointMesh>&,
143             bool overrideFixedValue
144         ) const;
146         template<class Type>
147         void applyCornerConstraints
148         (
149             GeometricField<Type, pointPatchField, pointMesh>& pf
150         ) const;
154 template<>
155 void pointPatchInterpolation::applyCornerConstraints<scalar>
157     GeometricField<scalar, pointPatchField, pointMesh>& pf
158 ) const;
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace Foam
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 #ifdef NoRepository
168 #   include "pointPatchInterpolate.C"
169 #endif
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #endif
175 // ************************************************************************* //