OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

pointPatchInterpolation.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::pointPatchInterpolation
00027 
00028 Description
00029     Foam::pointPatchInterpolation
00030 
00031 SourceFiles
00032     pointPatchInterpolation.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef pointPatchInterpolation_H
00037 #define pointPatchInterpolation_H
00038 
00039 #include "primitivePatchInterpolation.H"
00040 #include "PtrList.H"
00041 #include "volFieldsFwd.H"
00042 #include "pointFieldsFwd.H"
00043 #include "scalarList.H"
00044 #include "className.H"
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace Foam
00049 {
00050 
00051 // Forward declaration of classes
00052 class fvMesh;
00053 class pointMesh;
00054 
00055 /*---------------------------------------------------------------------------*\
00056                        Class pointPatchInterpolation Declaration
00057 \*---------------------------------------------------------------------------*/
00058 
00059 class pointPatchInterpolation
00060 {
00061     // Private data
00062 
00063         const fvMesh& fvMesh_;
00064 
00065         //- Primitive patch interpolators
00066         PtrList<primitivePatchInterpolation> patchInterpolators_;
00067 
00068         //- List of patch-patch edge points that require special treatement
00069         labelList patchPatchPoints_;
00070 
00071         //- Weights for patch-patch boundary points
00072         scalarListList patchPatchPointWeights_;
00073 
00074         labelList patchPatchPointConstraintPoints_;
00075         tensorField patchPatchPointConstraintTensors_;
00076 
00077 
00078     // Private member functions
00079 
00080         //- Construct addressing for patch-patch boundary points
00081         void makePatchPatchAddressing();
00082 
00083         //- Construct weights for patch-patch boundary points
00084         void makePatchPatchWeights();
00085 
00086 
00087         //- Disallow default bitwise copy construct
00088         pointPatchInterpolation(const pointPatchInterpolation&);
00089 
00090         //- Disallow default bitwise assignment
00091         void operator=(const pointPatchInterpolation&);
00092 
00093 
00094 public:
00095 
00096     // Declare name of the class and its debug switch
00097     ClassName("pointPatchInterpolation");
00098 
00099 
00100     // Constructors
00101 
00102         //- Constructor given fvMesh and pointMesh.
00103         pointPatchInterpolation(const fvMesh&);
00104 
00105 
00106     // Destructor
00107 
00108         ~pointPatchInterpolation();
00109 
00110 
00111     // Member functions
00112 
00113         // Access
00114 
00115             const fvMesh& mesh() const
00116             {
00117                 return fvMesh_;
00118             }
00119 
00120 
00121         // Edit
00122 
00123             //- Update mesh topology using the morph engine
00124             void updateMesh();
00125 
00126             //- Correct weighting factors for moving mesh.
00127             bool movePoints();
00128 
00129 
00130     // Interpolation functions
00131 
00132         template<class Type>
00133         void interpolate
00134         (
00135             const GeometricField<Type, fvPatchField, volMesh>&,
00136             GeometricField<Type, pointPatchField, pointMesh>&,
00137             bool overrideFixedValue
00138         ) const;
00139 
00140         template<class Type>
00141         void applyCornerConstraints
00142         (
00143             GeometricField<Type, pointPatchField, pointMesh>& pf
00144         ) const;
00145 };
00146 
00147 
00148 template<>
00149 void pointPatchInterpolation::applyCornerConstraints<scalar>
00150 (
00151     GeometricField<scalar, pointPatchField, pointMesh>& pf
00152 ) const;
00153 
00154 
00155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00156 
00157 } // End namespace Foam
00158 
00159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00160 
00161 #ifdef NoRepository
00162 #   include "pointPatchInterpolate.C"
00163 #endif
00164 
00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00166 
00167 #endif
00168 
00169 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd