OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen 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-2007 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     pointPatchInterpolation
00027 
00028 Description
00029 
00030 SourceFiles
00031     pointPatchInterpolation.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef pointPatchInterpolation_H
00036 #define pointPatchInterpolation_H
00037 
00038 #include "primitivePatchInterpolation.H"
00039 #include "volFieldsFwd.H"
00040 #include "pointFieldsFwd.H"
00041 #include "scalarList.H"
00042 #include "className.H"
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 class fvMesh;
00050 class pointMesh;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                        Class pointPatchInterpolation Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class pointPatchInterpolation
00057 {
00058     // Private data
00059 
00060         const fvMesh& fvMesh_;
00061         const pointMesh& pointMesh_;
00062 
00063         //- Primitive patch interpolators
00064         PtrList<primitivePatchInterpolation> patchInterpolators_;
00065 
00066         //- List of patch-patch edge points that require special treatement
00067         labelList patchPatchPoints_;
00068 
00069         //- Weights for patch-patch boundary points
00070         scalarListList patchPatchPointWeights_;
00071 
00072         labelList patchPatchPointConstraintPoints_;
00073         tensorField patchPatchPointConstraintTensors_;
00074 
00075 
00076     // Private member functions
00077 
00078         //- Construct addressing for patch-patch boundary points
00079         void makePatchPatchAddressing();
00080 
00081         //- Construct weights for patch-patch boundary points
00082         void makePatchPatchWeights();
00083 
00084 
00085         //- Disallow default bitwise copy construct
00086         pointPatchInterpolation(const pointPatchInterpolation&);
00087 
00088         //- Disallow default bitwise assignment
00089         void operator=(const pointPatchInterpolation&);
00090 
00091 
00092 public:
00093 
00094     // Declare name of the class and it's debug switch
00095     ClassName("pointPatchInterpolation");
00096 
00097 
00098     // Constructors
00099 
00100         //- Constructor given fvMesh and pointMesh.
00101         pointPatchInterpolation(const fvMesh&, const pointMesh&);
00102 
00103 
00104     // Destructor
00105 
00106         ~pointPatchInterpolation();
00107 
00108 
00109     // Member functions
00110 
00111         // Access
00112 
00113             const fvMesh& mesh() const
00114             {
00115                 return fvMesh_;
00116             }
00117 
00118             const pointMesh& pMesh() const
00119             {
00120                 return pointMesh_;
00121             }
00122 
00123 
00124         // Edit
00125 
00126             //- Update mesh topology using the morph engine
00127             void updateMesh();
00128 
00129             //- Correct weighting factors for moving mesh.
00130             bool movePoints();
00131 
00132 
00133     // Interpolation functions
00134 
00135         template<class Type>
00136         void interpolate
00137         (
00138             const GeometricField<Type, fvPatchField, volMesh>&,
00139             GeometricField<Type, pointPatchField, pointMesh>&,
00140             bool overrideFixedValue
00141         ) const;
00142 
00143         template<class Type>
00144         void applyCornerConstraints
00145         (
00146             GeometricField<Type, pointPatchField, pointMesh>& pf
00147         ) const;
00148 };
00149 
00150 
00151 template<>
00152 void pointPatchInterpolation::applyCornerConstraints<scalar>
00153 (
00154     GeometricField<scalar, pointPatchField, pointMesh>& pf
00155 ) const;
00156 
00157 
00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00159 
00160 } // End namespace Foam
00161 
00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00163 
00164 #ifdef NoRepository
00165 #   include "pointPatchInterpolate.C"
00166 #endif
00167 
00168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00169 
00170 #endif
00171 
00172 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd