OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

tractionDisplacementCorrectionFvPatchVectorField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #ifndef tractionDisplacementCorrectionFvPatchVectorField_H
00028 #define tractionDisplacementCorrectionFvPatchVectorField_H
00029 
00030 #include "fvPatchFields.H"
00031 #include "fixedGradientFvPatchFields.H"
00032 
00033 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00034 
00035 namespace Foam
00036 {
00037 
00038 /*---------------------------------------------------------------------------*\
00039         Class tractionDisplacementCorrectionStressFvPatch Declaration
00040 \*---------------------------------------------------------------------------*/
00041 
00042 class tractionDisplacementCorrectionFvPatchVectorField
00043 :
00044     public fixedGradientFvPatchVectorField
00045 {
00046 
00047     // Private Data
00048 
00049         vectorField traction_;
00050         scalarField pressure_;
00051 
00052 
00053 public:
00054 
00055     //- Runtime type information
00056     TypeName("tractionDisplacement");
00057 
00058 
00059     // Constructors
00060 
00061         //- Construct from patch and internal field
00062         tractionDisplacementCorrectionFvPatchVectorField
00063         (
00064             const fvPatch&,
00065             const DimensionedField<vector, volMesh>&
00066         );
00067 
00068         //- Construct from patch, internal field and Istream
00069         tractionDisplacementCorrectionFvPatchVectorField
00070         (
00071             const fvPatch&,
00072             const DimensionedField<vector, volMesh>&,
00073             Istream&
00074         );
00075 
00076         //- Construct from patch, internal field and dictionary
00077         tractionDisplacementCorrectionFvPatchVectorField
00078         (
00079             const fvPatch&,
00080             const DimensionedField<vector, volMesh>&,
00081             const dictionary&
00082         );
00083 
00084         //- Construct by mapping given
00085         //  tractionDisplacementCorrectionFvPatchVectorField onto a new patch
00086         tractionDisplacementCorrectionFvPatchVectorField
00087         (
00088             const tractionDisplacementCorrectionFvPatchVectorField&,
00089             const fvPatch&,
00090             const DimensionedField<vector, volMesh>&,
00091             const fvPatchFieldMapper&
00092         );
00093 
00094         //- Construct as copy setting internal field reference
00095         tractionDisplacementCorrectionFvPatchVectorField
00096         (
00097             const tractionDisplacementCorrectionFvPatchVectorField&
00098         );
00099 
00100         //- Construct and return a clone
00101         virtual tmp<fvPatchVectorField> clone() const
00102         {
00103             return tmp<fvPatchVectorField>
00104             (
00105                 new tractionDisplacementCorrectionFvPatchVectorField(*this)
00106             );
00107         }
00108 
00109         //- Construct as copy setting internal field reference
00110         tractionDisplacementCorrectionFvPatchVectorField
00111         (
00112             const tractionDisplacementCorrectionFvPatchVectorField&,
00113             const DimensionedField<vector, volMesh>&
00114         );
00115 
00116         //- Construct and return a clone setting internal field reference
00117         virtual tmp<fvPatchVectorField> clone
00118         (
00119             const DimensionedField<vector, volMesh>& iF
00120         ) const
00121         {
00122             return tmp<fvPatchVectorField>
00123             (
00124                 new tractionDisplacementCorrectionFvPatchVectorField(*this, iF)
00125             );
00126         }
00127 
00128 
00129     // Member functions
00130 
00131         // Access
00132 
00133             virtual const vectorField& traction() const
00134             {
00135                 return traction_;
00136             }
00137 
00138             virtual vectorField& traction()
00139             {
00140                 return traction_;
00141             }
00142 
00143             virtual const scalarField& pressure() const
00144             {
00145                 return pressure_;
00146             }
00147 
00148             virtual  scalarField& pressure()
00149             {
00150                 return pressure_;
00151             }
00152 
00153 
00154         // Mapping functions
00155 
00156             //- Map (and resize as needed) from self given a mapping object
00157             virtual void autoMap
00158             (
00159                 const fvPatchFieldMapper&
00160             );
00161 
00162             //- Reverse map the given fvPatchField onto this fvPatchField
00163             virtual void rmap
00164             (
00165                 const fvPatchVectorField&,
00166                 const labelList&
00167             );
00168 
00169 
00170         //- Update the coefficients associated with the patch field
00171         virtual void updateCoeffs();
00172 
00173         //- Write
00174         virtual void write(Ostream&) const;
00175 };
00176 
00177 
00178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00179 
00180 } // End namespace Foam
00181 
00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00183 
00184 #endif
00185 
00186 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd