FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

tractionDisplacementFvPatchVectorField.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::tractionDisplacementFvPatchVectorField
00026 
00027 Description
00028     Fixed traction boundary condition for the standard linear elastic, fixed
00029     coefficient displacement equation.
00030 
00031 SourceFiles
00032     tractionDisplacementFvPatchVectorField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef tractionDisplacementFvPatchVectorField_H
00037 #define tractionDisplacementFvPatchVectorField_H
00038 
00039 #include <finiteVolume/fvPatchFields.H>
00040 #include <finiteVolume/fixedGradientFvPatchFields.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                    Class tractionDisplacementFvPatch Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class tractionDisplacementFvPatchVectorField
00052 :
00053     public fixedGradientFvPatchVectorField
00054 {
00055 
00056     // Private Data
00057 
00058         vectorField traction_;
00059         scalarField pressure_;
00060 
00061 
00062 public:
00063 
00064     //- Runtime type information
00065     TypeName("tractionDisplacement");
00066 
00067 
00068     // Constructors
00069 
00070         //- Construct from patch and internal field
00071         tractionDisplacementFvPatchVectorField
00072         (
00073             const fvPatch&,
00074             const DimensionedField<vector, volMesh>&
00075         );
00076 
00077         //- Construct from patch, internal field and dictionary
00078         tractionDisplacementFvPatchVectorField
00079         (
00080             const fvPatch&,
00081             const DimensionedField<vector, volMesh>&,
00082             const dictionary&
00083         );
00084 
00085         //- Construct by mapping given
00086         //  tractionDisplacementFvPatchVectorField onto a new patch
00087         tractionDisplacementFvPatchVectorField
00088         (
00089             const tractionDisplacementFvPatchVectorField&,
00090             const fvPatch&,
00091             const DimensionedField<vector, volMesh>&,
00092             const fvPatchFieldMapper&
00093         );
00094 
00095         //- Construct as copy
00096         tractionDisplacementFvPatchVectorField
00097         (
00098             const tractionDisplacementFvPatchVectorField&
00099         );
00100 
00101         //- Construct and return a clone
00102         virtual tmp<fvPatchVectorField> clone() const
00103         {
00104             return tmp<fvPatchVectorField>
00105             (
00106                 new tractionDisplacementFvPatchVectorField(*this)
00107             );
00108         }
00109 
00110         //- Construct as copy setting internal field reference
00111         tractionDisplacementFvPatchVectorField
00112         (
00113             const tractionDisplacementFvPatchVectorField&,
00114             const DimensionedField<vector, volMesh>&
00115         );
00116 
00117         //- Construct and return a clone setting internal field reference
00118         virtual tmp<fvPatchVectorField> clone
00119         (
00120             const DimensionedField<vector, volMesh>& iF
00121         ) const
00122         {
00123             return tmp<fvPatchVectorField>
00124             (
00125                 new tractionDisplacementFvPatchVectorField(*this, iF)
00126             );
00127         }
00128 
00129 
00130     // Member functions
00131 
00132         // Access
00133 
00134             virtual const vectorField& traction() const
00135             {
00136                 return traction_;
00137             }
00138 
00139             virtual vectorField& traction()
00140             {
00141                 return traction_;
00142             }
00143 
00144             virtual const scalarField& pressure() const
00145             {
00146                 return pressure_;
00147             }
00148 
00149             virtual  scalarField& pressure()
00150             {
00151                 return pressure_;
00152             }
00153 
00154 
00155         // Mapping functions
00156 
00157             //- Map (and resize as needed) from self given a mapping object
00158             virtual void autoMap
00159             (
00160                 const fvPatchFieldMapper&
00161             );
00162 
00163             //- Reverse map the given fvPatchField onto this fvPatchField
00164             virtual void rmap
00165             (
00166                 const fvPatchVectorField&,
00167                 const labelList&
00168             );
00169 
00170 
00171         //- Update the coefficients associated with the patch field
00172         virtual void updateCoeffs();
00173 
00174         //- Write
00175         virtual void write(Ostream&) const;
00176 };
00177 
00178 
00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00180 
00181 } // End namespace Foam
00182 
00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00184 
00185 #endif
00186 
00187 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines