ENH: patchCloud: return pTraits<Type>::max for unfound points
[OpenFOAM-1.7.x.git] / src / finiteVolume / interpolation / volPointInterpolation / pointPatchInterpolation / pointPatchInterpolation.H
blobb86c1a2d7403ffc58612616effd87fb245c2d59f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::pointPatchInterpolation
27 Description
28     Foam::pointPatchInterpolation
30 SourceFiles
31     pointPatchInterpolation.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef pointPatchInterpolation_H
36 #define pointPatchInterpolation_H
38 #include "primitivePatchInterpolation.H"
39 #include "PtrList.H"
40 #include "volFieldsFwd.H"
41 #include "pointFieldsFwd.H"
42 #include "scalarList.H"
43 #include "className.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 // Forward declaration of classes
51 class fvMesh;
52 class pointMesh;
54 /*---------------------------------------------------------------------------*\
55                        Class pointPatchInterpolation Declaration
56 \*---------------------------------------------------------------------------*/
58 class pointPatchInterpolation
60     // Private data
62         const fvMesh& fvMesh_;
64         //- Primitive patch interpolators
65         PtrList<primitivePatchInterpolation> patchInterpolators_;
67         //- List of patch-patch edge points that require special treatement
68         labelList patchPatchPoints_;
70         //- Weights for patch-patch boundary points
71         scalarListList patchPatchPointWeights_;
73         labelList patchPatchPointConstraintPoints_;
74         tensorField patchPatchPointConstraintTensors_;
77     // Private member functions
79         //- Construct addressing for patch-patch boundary points
80         void makePatchPatchAddressing();
82         //- Construct weights for patch-patch boundary points
83         void makePatchPatchWeights();
86         //- Disallow default bitwise copy construct
87         pointPatchInterpolation(const pointPatchInterpolation&);
89         //- Disallow default bitwise assignment
90         void operator=(const pointPatchInterpolation&);
93 public:
95     // Declare name of the class and its debug switch
96     ClassName("pointPatchInterpolation");
99     // Constructors
101         //- Constructor given fvMesh and pointMesh.
102         pointPatchInterpolation(const fvMesh&);
105     // Destructor
107         ~pointPatchInterpolation();
110     // Member functions
112         // Access
114             const fvMesh& mesh() const
115             {
116                 return fvMesh_;
117             }
120         // Edit
122             //- Update mesh topology using the morph engine
123             void updateMesh();
125             //- Correct weighting factors for moving mesh.
126             bool movePoints();
129     // Interpolation functions
131         template<class Type>
132         void interpolate
133         (
134             const GeometricField<Type, fvPatchField, volMesh>&,
135             GeometricField<Type, pointPatchField, pointMesh>&,
136             bool overrideFixedValue
137         ) const;
139         template<class Type>
140         void applyCornerConstraints
141         (
142             GeometricField<Type, pointPatchField, pointMesh>& pf
143         ) const;
147 template<>
148 void pointPatchInterpolation::applyCornerConstraints<scalar>
150     GeometricField<scalar, pointPatchField, pointMesh>& pf
151 ) const;
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 #ifdef NoRepository
161 #   include "pointPatchInterpolate.C"
162 #endif
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 #endif
168 // ************************************************************************* //