initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvsPatchFields / constraint / cyclic / cyclicFvsPatchField.H
blobc130301d5044bc21217ecea2a7faac2cb3503db7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::cyclicFvsPatchField
28 Description
29     Foam::cyclicFvsPatchField
31 SourceFiles
32     cyclicFvsPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef cyclicFvsPatchField_H
37 #define cyclicFvsPatchField_H
39 #include "coupledFvsPatchField.H"
40 #include "cyclicFvPatch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class cyclicFvsPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class Type>
52 class cyclicFvsPatchField
54     public coupledFvsPatchField<Type>
56     // Private data
58         //- Local reference cast into the cyclic patch
59         const cyclicFvPatch& cyclicPatch_;
62 public:
64     //- Runtime type information
65     TypeName(cyclicFvPatch::typeName_());
68     // Constructors
70         //- Construct from patch and internal field
71         cyclicFvsPatchField
72         (
73             const fvPatch&,
74             const DimensionedField<Type, surfaceMesh>&
75         );
77         //- Construct from patch, internal field and dictionary
78         cyclicFvsPatchField
79         (
80             const fvPatch&,
81             const DimensionedField<Type, surfaceMesh>&,
82             const dictionary&
83         );
85         //- Construct by mapping given cyclicFvsPatchField onto a new patch
86         cyclicFvsPatchField
87         (
88             const cyclicFvsPatchField<Type>&,
89             const fvPatch&,
90             const DimensionedField<Type, surfaceMesh>&,
91             const fvPatchFieldMapper&
92         );
94         //- Construct as copy
95         cyclicFvsPatchField
96         (
97             const cyclicFvsPatchField<Type>&
98         );
100         //- Construct and return a clone
101         virtual tmp<fvsPatchField<Type> > clone() const
102         {
103             return tmp<fvsPatchField<Type> >
104             (
105                 new cyclicFvsPatchField<Type>(*this)
106             );
107         }
109         //- Construct as copy setting internal field reference
110         cyclicFvsPatchField
111         (
112             const cyclicFvsPatchField<Type>&,
113             const DimensionedField<Type, surfaceMesh>&
114         );
116         //- Construct and return a clone setting internal field reference
117         virtual tmp<fvsPatchField<Type> > clone
118         (
119             const DimensionedField<Type, surfaceMesh>& iF
120         ) const
121         {
122             return tmp<fvsPatchField<Type> >
123             (
124                 new cyclicFvsPatchField<Type>(*this, iF)
125             );
126         }
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 #ifdef NoRepository
137 #   include "cyclicFvsPatchField.C"
138 #endif
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #endif
144 // ************************************************************************* //