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

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