surfaceSlipDisplacementFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::surfaceSlipDisplacementFvPatchField
28 
29 Description
30  fvPatchField corresponding to surfaceSlipDisplacementPointPatchField.
31  Is just a slip type since all hard work (projection) is done in the
32  pointPatch field.
33 
34 SourceFiles
35  surfaceSlipDisplacementFvPatchField.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef surfaceSlipDisplacementFvPatchField_H
40 #define surfaceSlipDisplacementFvPatchField_H
41 
42 #include "slipFvPatchField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class surfaceSlipDisplacementFvPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class Type>
55 :
56  public slipFvPatchField<Type>
57 {
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("surfaceSlipDisplacement");
63 
64 
65  // Constructors
66 
67  //- Construct from patch and internal field
69  (
70  const fvPatch& p,
72  )
73  :
74  slipFvPatchField<Type>(p, iF)
75  {}
76 
77  //- Construct from patch, internal field and dictionary
79  (
80  const fvPatch& p,
82  const dictionary& dict
83  )
84  :
85  slipFvPatchField<Type>(p, iF, dict)
86  {}
87 
88  //- Construct by mapping given surfaceSlipDisplacementFvPatchField
89  // onto a new patch
91  (
93  const fvPatch& p,
95  const fvPatchFieldMapper& mapper
96  )
97  :
98  slipFvPatchField<Type>(ptf, p, iF, mapper)
99  {}
100 
101 
102  //- Construct as copy
104  (
106  )
107  :
108  slipFvPatchField<Type>(ptf)
109  {}
110 
111  //- Construct and return a clone
112  virtual tmp<fvPatchField<Type>> clone() const
113  {
114  return tmp<fvPatchField<Type>>
115  (
117  );
118  }
119 
120  //- Construct as copy setting internal field reference
122  (
125  )
126  :
127  slipFvPatchField<Type>(ptf, iF)
128  {}
129 
130  //- Construct and return a clone setting internal field reference
132  (
134  ) const
135  {
136  return tmp<fvPatchField<Type>>
137  (
139  );
140  }
141 
142  virtual void write(Ostream& os) const
143  {
145  // Only so we can easily postprocess.
146  this->writeEntry("value", os);
147  }
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
Foam::fvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:384
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::surfaceSlipDisplacementFvPatchField::write
virtual void write(Ostream &os) const
Write.
Definition: surfaceSlipDisplacementFvPatchField.H:141
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::surfaceSlipDisplacementFvPatchField::surfaceSlipDisplacementFvPatchField
surfaceSlipDisplacementFvPatchField(const fvPatch &p, const DimensionedField< Type, volMesh > &iF)
Construct from patch and internal field.
Definition: surfaceSlipDisplacementFvPatchField.H:68
Foam::surfaceSlipDisplacementFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: surfaceSlipDisplacementFvPatchField.H:111
Foam::surfaceSlipDisplacementFvPatchField
fvPatchField corresponding to surfaceSlipDisplacementPointPatchField. Is just a slip type since all h...
Definition: surfaceSlipDisplacementFvPatchField.H:53
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::slipFvPatchField
This boundary condition provides a slip constraint.
Definition: slipFvPatchField.H:63
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
slipFvPatchField.H
Foam::surfaceSlipDisplacementFvPatchField::TypeName
TypeName("surfaceSlipDisplacement")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54