Better bounding on topo change
[foam-extend-3.2.git] / src / dynamicMesh / meshMotion / fvMotionSolver / fvPatchFields / derived / surfaceSlipDisplacement / surfaceSlipDisplacementFvPatchField.H
blob0b21a72bf4243f41f5b86a8194f060e23b68fdbc
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::surfaceSlipDisplacementFvPatchField
27 Description
28     fvPatchField corresponding to surfaceSlipDisplacementPointPatchField.
29     Is just a slip type since all hard work (projection) is done in the
30     pointPatch field.
32 SourceFiles
33     surfaceSlipDisplacementFvPatchField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef surfaceSlipDisplacementFvPatchField_H
38 #define surfaceSlipDisplacementFvPatchField_H
40 #include "slipFvPatchField.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class surfaceSlipDisplacementFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class Type>
52 class surfaceSlipDisplacementFvPatchField
54     public slipFvPatchField<Type>
57 public:
59     //- Runtime type information
60     TypeName("surfaceSlipDisplacement");
63     // Constructors
65         //- Construct from patch and internal field
66         surfaceSlipDisplacementFvPatchField
67         (
68             const fvPatch& p,
69             const DimensionedField<Type, volMesh>& iF
70         )
71         :
72             slipFvPatchField<Type>(p, iF)
73         {}
75         //- Construct from patch, internal field and dictionary
76         surfaceSlipDisplacementFvPatchField
77         (
78             const fvPatch& p,
79             const DimensionedField<Type, volMesh>& iF,
80             const dictionary& dict
81         )
82         :
83             slipFvPatchField<Type>(p, iF, dict)
84         {}
86         //- Construct by mapping given surfaceSlipDisplacementFvPatchField
87         //  onto a new patch
88         surfaceSlipDisplacementFvPatchField
89         (
90             const surfaceSlipDisplacementFvPatchField<Type>& ptf,
91             const fvPatch& p,
92             const DimensionedField<Type, volMesh>& iF,
93             const fvPatchFieldMapper& mapper
94         )
95         :
96             slipFvPatchField<Type>(ptf, p, iF, mapper)
97         {}
100         //- Construct as copy
101         surfaceSlipDisplacementFvPatchField
102         (
103             const surfaceSlipDisplacementFvPatchField<Type>& ptf
104         )
105         :
106             slipFvPatchField<Type>(ptf)
107         {}
109         //- Construct and return a clone
110         virtual tmp<fvPatchField<Type> > clone() const
111         {
112             return tmp<fvPatchField<Type> >
113             (
114                 new surfaceSlipDisplacementFvPatchField<Type>(*this)
115             );
116         }
118         //- Construct as copy setting internal field reference
119         surfaceSlipDisplacementFvPatchField
120         (
121             const surfaceSlipDisplacementFvPatchField<Type>& ptf,
122             const DimensionedField<Type, volMesh>& iF
123         )
124         :
125             slipFvPatchField<Type>(ptf, iF)
126         {}
128         //- Construct and return a clone setting internal field reference
129         virtual tmp<fvPatchField<Type> > clone
130         (
131             const DimensionedField<Type, volMesh>& iF
132         ) const
133         {
134             return tmp<fvPatchField<Type> >
135             (
136                 new surfaceSlipDisplacementFvPatchField<Type>(*this, iF)
137             );
138         }
140         virtual void write(Ostream& os) const
141         {
142             slipFvPatchField<Type>::write(os);
143             // Only so we can easily postprocess.
144             this->writeEntry("value", os);
145         }
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 #endif
157 // ************************************************************************* //