initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / interpolation / volPointInterpolation / pointPatchInterpolation / pointPatchInterpolation.H
blob5a26e6e46d431665968fcf868a83edeb9ccdef32
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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_;
65         //- Primitive patch interpolators
66         PtrList<primitivePatchInterpolation> patchInterpolators_;
68         //- List of patch-patch edge points that require special treatement
69         labelList patchPatchPoints_;
71         //- Weights for patch-patch boundary points
72         scalarListList patchPatchPointWeights_;
74         labelList patchPatchPointConstraintPoints_;
75         tensorField patchPatchPointConstraintTensors_;
78     // Private member functions
80         //- Construct addressing for patch-patch boundary points
81         void makePatchPatchAddressing();
83         //- Construct weights for patch-patch boundary points
84         void makePatchPatchWeights();
87         //- Disallow default bitwise copy construct
88         pointPatchInterpolation(const pointPatchInterpolation&);
90         //- Disallow default bitwise assignment
91         void operator=(const pointPatchInterpolation&);
94 public:
96     // Declare name of the class and its debug switch
97     ClassName("pointPatchInterpolation");
100     // Constructors
102         //- Constructor given fvMesh and pointMesh.
103         pointPatchInterpolation(const fvMesh&);
106     // Destructor
108         ~pointPatchInterpolation();
111     // Member functions
113         // Access
115             const fvMesh& mesh() const
116             {
117                 return fvMesh_;
118             }
121         // Edit
123             //- Update mesh topology using the morph engine
124             void updateMesh();
126             //- Correct weighting factors for moving mesh.
127             bool movePoints();
130     // Interpolation functions
132         template<class Type>
133         void interpolate
134         (
135             const GeometricField<Type, fvPatchField, volMesh>&,
136             GeometricField<Type, pointPatchField, pointMesh>&,
137             bool overrideFixedValue
138         ) const;
140         template<class Type>
141         void applyCornerConstraints
142         (
143             GeometricField<Type, pointPatchField, pointMesh>& pf
144         ) const;
148 template<>
149 void pointPatchInterpolation::applyCornerConstraints<scalar>
151     GeometricField<scalar, pointPatchField, pointMesh>& pf
152 ) const;
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 } // End namespace Foam
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 #ifdef NoRepository
162 #   include "pointPatchInterpolate.C"
163 #endif
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 #endif
169 // ************************************************************************* //