initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / constraint / jumpCyclic / jumpCyclicFvPatchField.H
blob340799ffe16244cbba9482492a835802bb722a26
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::jumpCyclicFvPatchField
28 Description
29     Foam::jumpCyclicFvPatchField
31 SourceFiles
32     jumpCyclicFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef jumpCyclicFvPatchField_H
37 #define jumpCyclicFvPatchField_H
39 #include "cyclicFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                            Class cyclicFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class jumpCyclicFvPatchField
53     public cyclicFvPatchField<Type>
56 public:
58     //- Runtime type information
59     TypeName("jumpCyclic");
62     // Constructors
64         //- Construct from patch and internal field
65         jumpCyclicFvPatchField
66         (
67             const fvPatch&,
68             const DimensionedField<Type, volMesh>&
69         );
71         //- Construct from patch, internal field and dictionary
72         jumpCyclicFvPatchField
73         (
74             const fvPatch&,
75             const DimensionedField<Type, volMesh>&,
76             const dictionary&
77         );
79         //- Construct by mapping given jumpCyclicFvPatchField onto a new patch
80         jumpCyclicFvPatchField
81         (
82             const jumpCyclicFvPatchField<Type>&,
83             const fvPatch&,
84             const DimensionedField<Type, volMesh>&,
85             const fvPatchFieldMapper&
86         );
88         //- Construct as copy
89         jumpCyclicFvPatchField
90         (
91             const jumpCyclicFvPatchField<Type>&
92         );
94         //- Construct as copy setting internal field reference
95         jumpCyclicFvPatchField
96         (
97             const jumpCyclicFvPatchField<Type>&,
98             const DimensionedField<Type, volMesh>&
99         );
102     // Member functions
104         // Access
106             //- Return the interface type
107             virtual const word& interfaceFieldType() const
108             {
109                 return cyclicFvPatchField<Type>::type();
110             }
112             //- Return the "jump" across the patch as a "half" field 
113             virtual tmp<Field<scalar> > jump() const = 0;
116         // Evaluation functions
118             //- Return neighbour coupled given internal cell data
119             tmp<Field<Type> > patchNeighbourField() const;
121             //- Update result field based on interface functionality
122             virtual void updateInterfaceMatrix
123             (
124                 const scalarField& psiInternal,
125                 scalarField& result,
126                 const lduMatrix&,
127                 const scalarField& coeffs,
128                 const direction cmpt,
129                 const Pstream::commsTypes commsType
130             ) const;
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 #ifdef NoRepository
141 #   include "jumpCyclicFvPatchField.C"
142 #endif
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //