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

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