1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #ifndef tractionDisplacementCorrectionFvPatchVectorField_H
27 #define tractionDisplacementCorrectionFvPatchVectorField_H
29 #include "fvPatchFields.H"
30 #include "fixedGradientFvPatchFields.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 /*---------------------------------------------------------------------------*\
38 Class tractionDisplacementCorrectionStressFvPatch Declaration
39 \*---------------------------------------------------------------------------*/
41 class tractionDisplacementCorrectionFvPatchVectorField
43 public fixedGradientFvPatchVectorField
48 vectorField traction_;
49 scalarField pressure_;
54 //- Runtime type information
55 TypeName("tractionDisplacement");
60 //- Construct from patch and internal field
61 tractionDisplacementCorrectionFvPatchVectorField
64 const DimensionedField<vector, volMesh>&
67 //- Construct from patch, internal field and Istream
68 tractionDisplacementCorrectionFvPatchVectorField
71 const DimensionedField<vector, volMesh>&,
75 //- Construct from patch, internal field and dictionary
76 tractionDisplacementCorrectionFvPatchVectorField
79 const DimensionedField<vector, volMesh>&,
83 //- Construct by mapping given
84 // tractionDisplacementCorrectionFvPatchVectorField onto a new patch
85 tractionDisplacementCorrectionFvPatchVectorField
87 const tractionDisplacementCorrectionFvPatchVectorField&,
89 const DimensionedField<vector, volMesh>&,
90 const fvPatchFieldMapper&
93 //- Construct as copy setting internal field reference
94 tractionDisplacementCorrectionFvPatchVectorField
96 const tractionDisplacementCorrectionFvPatchVectorField&
99 //- Construct and return a clone
100 virtual tmp<fvPatchVectorField> clone() const
102 return tmp<fvPatchVectorField>
104 new tractionDisplacementCorrectionFvPatchVectorField(*this)
108 //- Construct as copy setting internal field reference
109 tractionDisplacementCorrectionFvPatchVectorField
111 const tractionDisplacementCorrectionFvPatchVectorField&,
112 const DimensionedField<vector, volMesh>&
115 //- Construct and return a clone setting internal field reference
116 virtual tmp<fvPatchVectorField> clone
118 const DimensionedField<vector, volMesh>& iF
121 return tmp<fvPatchVectorField>
123 new tractionDisplacementCorrectionFvPatchVectorField(*this, iF)
132 virtual const vectorField& traction() const
137 virtual vectorField& traction()
142 virtual const scalarField& pressure() const
147 virtual scalarField& pressure()
155 //- Map (and resize as needed) from self given a mapping object
158 const fvPatchFieldMapper&
161 //- Reverse map the given fvPatchField onto this fvPatchField
164 const fvPatchVectorField&,
169 //- Update the coefficients associated with the patch field
170 virtual void updateCoeffs();
173 virtual void write(Ostream&) const;
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 } // End namespace Foam
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 // ************************************************************************* //