FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::pointPatchInterpolation
00026 
00027 Description
00028     Foam::pointPatchInterpolation
00029 
00030 SourceFiles
00031     pointPatchInterpolation.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef pointPatchInterpolation_H
00036 #define pointPatchInterpolation_H
00037 
00038 #include <OpenFOAM/primitivePatchInterpolation.H>
00039 #include <OpenFOAM/PtrList.H>
00040 #include <finiteVolume/volFieldsFwd.H>
00041 #include <OpenFOAM/pointFieldsFwd.H>
00042 #include <OpenFOAM/scalarList.H>
00043 #include <OpenFOAM/className.H>
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 // Forward declaration of classes
00051 class fvMesh;
00052 class pointMesh;
00053 
00054 /*---------------------------------------------------------------------------*\
00055                        Class pointPatchInterpolation Declaration
00056 \*---------------------------------------------------------------------------*/
00057 
00058 class pointPatchInterpolation
00059 {
00060     // Private data
00061 
00062         const fvMesh& fvMesh_;
00063 
00064         //- Primitive patch interpolators
00065         PtrList<primitivePatchInterpolation> patchInterpolators_;
00066 
00067         //- List of patch-patch edge points that require special treatement
00068         labelList patchPatchPoints_;
00069 
00070         //- Weights for patch-patch boundary points
00071         scalarListList patchPatchPointWeights_;
00072 
00073         labelList patchPatchPointConstraintPoints_;
00074         tensorField patchPatchPointConstraintTensors_;
00075 
00076 
00077     // Private member functions
00078 
00079         //- Construct addressing for patch-patch boundary points
00080         void makePatchPatchAddressing();
00081 
00082         //- Construct weights for patch-patch boundary points
00083         void makePatchPatchWeights();
00084 
00085 
00086         //- Disallow default bitwise copy construct
00087         pointPatchInterpolation(const pointPatchInterpolation&);
00088 
00089         //- Disallow default bitwise assignment
00090         void operator=(const pointPatchInterpolation&);
00091 
00092 
00093 public:
00094 
00095     // Declare name of the class and its debug switch
00096     ClassName("pointPatchInterpolation");
00097 
00098 
00099     // Constructors
00100 
00101         //- Constructor given fvMesh and pointMesh.
00102         pointPatchInterpolation(const fvMesh&);
00103 
00104 
00105     // Destructor
00106 
00107         ~pointPatchInterpolation();
00108 
00109 
00110     // Member functions
00111 
00112         // Access
00113 
00114             const fvMesh& mesh() const
00115             {
00116                 return fvMesh_;
00117             }
00118 
00119 
00120         // Edit
00121 
00122             //- Update mesh topology using the morph engine
00123             void updateMesh();
00124 
00125             //- Correct weighting factors for moving mesh.
00126             bool movePoints();
00127 
00128 
00129     // Interpolation functions
00130 
00131         template<class Type>
00132         void interpolate
00133         (
00134             const GeometricField<Type, fvPatchField, volMesh>&,
00135             GeometricField<Type, pointPatchField, pointMesh>&,
00136             bool overrideFixedValue
00137         ) const;
00138 
00139         template<class Type>
00140         void applyCornerConstraints
00141         (
00142             GeometricField<Type, pointPatchField, pointMesh>& pf
00143         ) const;
00144 };
00145 
00146 
00147 template<>
00148 void pointPatchInterpolation::applyCornerConstraints<scalar>
00149 (
00150     GeometricField<scalar, pointPatchField, pointMesh>& pf
00151 ) const;
00152 
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 } // End namespace Foam
00157 
00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00159 
00160 #ifdef NoRepository
00161 #   include <finiteVolume/pointPatchInterpolate.C>
00162 #endif
00163 
00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00165 
00166 #endif
00167 
00168 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines