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

volPointInterpolation.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::volPointInterpolation
00027 
00028 Description
00029     Foam::volPointInterpolation
00030 
00031 SourceFiles
00032     volPointInterpolation.C
00033     volPointInterpolate.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef volPointInterpolation_H
00038 #define volPointInterpolation_H
00039 
00040 #include "MeshObject.H"
00041 #include "pointPatchInterpolation.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 class fvMesh;
00049 class pointMesh;
00050 
00051 /*---------------------------------------------------------------------------*\
00052                        Class volPointInterpolation Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class volPointInterpolation
00056 :
00057     public MeshObject<fvMesh, volPointInterpolation>
00058 {
00059     // Private data
00060 
00061         //- Boundary interpolation engine.
00062         pointPatchInterpolation boundaryInterpolator_;
00063 
00064         //- Interpolation scheme weighting factor array.
00065         scalarListList pointWeights_;
00066 
00067 
00068     // Private member functions
00069 
00070         //- Construct point weighting factors
00071         void makeWeights();
00072 
00073         //- Disallow default bitwise copy construct
00074         volPointInterpolation(const volPointInterpolation&);
00075 
00076         //- Disallow default bitwise assignment
00077         void operator=(const volPointInterpolation&);
00078 
00079 
00080 public:
00081 
00082     // Declare name of the class and its debug switch
00083     ClassName("volPointInterpolation");
00084 
00085 
00086     // Constructors
00087 
00088         //- Constructor given fvMesh and pointMesh.
00089         explicit volPointInterpolation(const fvMesh&);
00090 
00091 
00092     // Destructor
00093 
00094         ~volPointInterpolation();
00095 
00096 
00097     // Member functions
00098 
00099         // Access
00100 
00101             const fvMesh& mesh() const
00102             {
00103                 return boundaryInterpolator_.mesh();
00104             }
00105 
00106 
00107         // Edit
00108 
00109             //- Update mesh topology using the morph engine
00110             void updateMesh();
00111 
00112             //- Correct weighting factors for moving mesh.
00113             bool movePoints();
00114 
00115 
00116     // Interpolation functions
00117 
00118         //- Interpolate internal field from volField to pointField
00119         //  using inverse distance weighting
00120         template<class Type>
00121         void interpolateInternalField
00122         (
00123             const GeometricField<Type, fvPatchField, volMesh>&,
00124             GeometricField<Type, pointPatchField, pointMesh>&
00125         ) const;
00126 
00127         //- Interpolate from volField to pointField
00128         //  using inverse distance weighting
00129         template<class Type>
00130         void interpolate
00131         (
00132             const GeometricField<Type, fvPatchField, volMesh>&,
00133             GeometricField<Type, pointPatchField, pointMesh>&
00134         ) const;
00135 
00136         //- Interpolate volField using inverse distance weighting
00137         //  returning pointField with the same patchField types
00138         template<class Type>
00139         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
00140         (
00141             const GeometricField<Type, fvPatchField, volMesh>&,
00142             const wordList& patchFieldTypes
00143         ) const;
00144 
00145         //- Interpolate tmp<volField> using inverse distance weighting
00146         //  returning pointField with the same patchField types
00147         template<class Type>
00148         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
00149         (
00150             const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
00151             const wordList& patchFieldTypes
00152         ) const;
00153 
00154         //- Interpolate volField using inverse distance weighting 
00155         //  returning pointField
00156         template<class Type>
00157         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
00158         (
00159             const GeometricField<Type, fvPatchField, volMesh>&
00160         ) const;
00161 
00162         //- Interpolate tmp<volField> using inverse distance weighting 
00163         //  returning pointField
00164         template<class Type>
00165         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
00166         (
00167             const tmp<GeometricField<Type, fvPatchField, volMesh> >&
00168         ) const;
00169 };
00170 
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 } // End namespace Foam
00175 
00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00177 
00178 #ifdef NoRepository
00179 #   include "volPointInterpolate.C"
00180 #endif
00181 
00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00183 
00184 #endif
00185 
00186 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd