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

patchProbes.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) 2010-2011 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::patchProbes
00026 
00027 Description
00028     Set of locations to sample.at patches
00029 
00030     Call write() to sample and write files.
00031 
00032 SourceFiles
00033     patchProbes.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef patchProbes_H
00038 #define patchProbes_H
00039 
00040 #include "probes.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward declaration of classes
00048 class objectRegistry;
00049 class dictionary;
00050 class fvMesh;
00051 class mapPolyMesh;
00052 
00053 /*---------------------------------------------------------------------------*\
00054                           Class patchProbes Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 class patchProbes
00058 :
00059     public probes
00060 {
00061     // Private data
00062 
00063         //- Patch name
00064         word patchName_;
00065 
00066 
00067     // Private Member Functions
00068 
00069         //- Sample and write a particular volume field
00070         template<class Type>
00071         void sampleAndWrite
00072         (
00073             const GeometricField<Type, fvPatchField, volMesh>&
00074         );
00075 
00076 
00077         //- Sample and write all the fields of the given type
00078         template <class Type>
00079         void sampleAndWrite(const fieldGroup<Type>&);
00080 
00081 
00082         //- Sample a volume field at all locations
00083         template<class Type>
00084         tmp<Field<Type> > sample
00085         (
00086             const GeometricField<Type, fvPatchField, volMesh>&
00087         ) const;
00088 
00089 
00090         //- Sample a single field on all sample locations
00091         template <class Type>
00092         tmp<Field<Type> > sample(const word& fieldName) const;
00093 
00094 
00095         //- Disallow default bitwise copy construct
00096         patchProbes(const patchProbes&);
00097 
00098         //- Disallow default bitwise assignment
00099         void operator=(const patchProbes&);
00100 
00101 
00102 public:
00103 
00104     //- Runtime type information
00105     TypeName("patchProbes");
00106 
00107 
00108     // Constructors
00109 
00110         //- Construct for given objectRegistry and dictionary.
00111         //  Allow the possibility to load fields from files
00112         patchProbes
00113         (
00114             const word& name,
00115             const objectRegistry&,
00116             const dictionary&,
00117             const bool loadFromFiles = false
00118         );
00119 
00120 
00121     //- Destructor
00122     virtual ~patchProbes();
00123 
00124     //- Public members
00125 
00126         //- Sample and write
00127         virtual void write();
00128 
00129         //- Read
00130         virtual void read(const dictionary&);
00131 
00132         //- Find elements containing patchProbes
00133         virtual void findElements(const fvMesh&);
00134 
00135 
00136 };
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace Foam
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 #ifdef NoRepository
00145 #   include "patchProbesTemplates.C"
00146 #endif
00147 
00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00149 
00150 #endif
00151 
00152 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines