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

processorFvsPatchField.C

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 \*---------------------------------------------------------------------------*/
00025 
00026 #include <finiteVolume/processorFvsPatchField.H>
00027 
00028 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00029 
00030 namespace Foam
00031 {
00032 
00033 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
00034 
00035 template<class Type>
00036 processorFvsPatchField<Type>::processorFvsPatchField
00037 (
00038     const fvPatch& p,
00039     const DimensionedField<Type, surfaceMesh>& iF
00040 )
00041 :
00042     coupledFvsPatchField<Type>(p, iF),
00043     procPatch_(refCast<const processorFvPatch>(p))
00044 {}
00045 
00046 
00047 template<class Type>
00048 processorFvsPatchField<Type>::processorFvsPatchField
00049 (
00050     const fvPatch& p,
00051     const DimensionedField<Type, surfaceMesh>& iF,
00052     const Field<Type>& f
00053 )
00054 :
00055     coupledFvsPatchField<Type>(p, iF, f),
00056     procPatch_(refCast<const processorFvPatch>(p))
00057 {}
00058 
00059 
00060 // Construct by mapping given processorFvsPatchField<Type>
00061 template<class Type>
00062 processorFvsPatchField<Type>::processorFvsPatchField
00063 (
00064     const processorFvsPatchField<Type>& ptf,
00065     const fvPatch& p,
00066     const DimensionedField<Type, surfaceMesh>& iF,
00067     const fvPatchFieldMapper& mapper
00068 )
00069 :
00070     coupledFvsPatchField<Type>(ptf, p, iF, mapper),
00071     procPatch_(refCast<const processorFvPatch>(p))
00072 {
00073     if (!isType<processorFvPatch>(this->patch()))
00074     {
00075         FatalErrorIn
00076         (
00077             "processorFvsPatchField<Type>::processorFvsPatchField\n"
00078             "(\n"
00079             "    const processorFvsPatchField<Type>& ptf,\n"
00080             "    const fvPatch& p,\n"
00081             "    const DimensionedField<Type, surfaceMesh>& iF,\n"
00082             "    const fvPatchFieldMapper& mapper\n"
00083             ")\n"
00084         )   << "Field type does not correspond to patch type for patch "
00085             << this->patch().index() << "." << endl
00086             << "Field type: " << typeName << endl
00087             << "Patch type: " << this->patch().type()
00088             << exit(FatalError);
00089     }
00090 }
00091 
00092 
00093 template<class Type>
00094 processorFvsPatchField<Type>::processorFvsPatchField
00095 (
00096     const fvPatch& p,
00097     const DimensionedField<Type, surfaceMesh>& iF,
00098     const dictionary& dict
00099 )
00100 :
00101     coupledFvsPatchField<Type>(p, iF, dict),
00102     procPatch_(refCast<const processorFvPatch>(p))
00103 {
00104     if (!isType<processorFvPatch>(p))
00105     {
00106         FatalIOErrorIn
00107         (
00108             "processorFvsPatchField<Type>::processorFvsPatchField\n"
00109             "(\n"
00110             "    const fvPatch& p,\n"
00111             "    const Field<Type>& field,\n"
00112             "    const dictionary& dict\n"
00113             ")\n",
00114             dict
00115         )   << "patch " << this->patch().index() << " not processor type. "
00116             << "Patch type = " << p.type()
00117             << exit(FatalIOError);
00118     }
00119 }
00120 
00121 
00122 template<class Type>
00123 processorFvsPatchField<Type>::processorFvsPatchField
00124 (
00125     const processorFvsPatchField<Type>& ptf
00126 )
00127 :
00128     coupledFvsPatchField<Type>(ptf),
00129     procPatch_(refCast<const processorFvPatch>(ptf.patch()))
00130 {}
00131 
00132 
00133 template<class Type>
00134 processorFvsPatchField<Type>::processorFvsPatchField
00135 (
00136     const processorFvsPatchField<Type>& ptf,
00137     const DimensionedField<Type, surfaceMesh>& iF
00138 )
00139 :
00140     coupledFvsPatchField<Type>(ptf, iF),
00141     procPatch_(refCast<const processorFvPatch>(ptf.patch()))
00142 {}
00143 
00144 
00145 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
00146 
00147 template<class Type>
00148 processorFvsPatchField<Type>::~processorFvsPatchField()
00149 {}
00150 
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 } // End namespace Foam
00155 
00156 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines