Forward compatibility: flex
[foam-extend-3.2.git] / src / solidModels / fvPatchFields / fixedDisplacementZeroShear / fixedDisplacementZeroShearFvPatchVectorField.H
blob3fdbfc248932a0699d892ce968d3cd5d37114e42
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     fixedDisplacementZeroShearFvPatchVectorField
27 Description
28     The component of the displacement normal to the patch is applied,
29     and the shear traction is set to zero.
30     Patch contains non-orthogonal correction.
32 SourceFiles
33     fixedDisplacementZeroShearFvPatchVectorField.C
35 Author
36     Philip Cardiff
37     Based on velocityDisplacement by Aleksandar Karac
39 \*---------------------------------------------------------------------------*/
41 #ifndef fixedDisplacementZeroShearFvPatchVectorField_H
42 #define fixedDisplacementZeroShearFvPatchVectorField_H
44 #include "fvPatchFields.H"
45 #include "directionMixedFvPatchFields.H"
46 #include "nonLinearGeometry.H"
47 #include "Switch.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 namespace Foam
54 /*---------------------------------------------------------------------------*\
55                       Class directionMixedFvPatch Declaration
56 \*---------------------------------------------------------------------------*/
58 class fixedDisplacementZeroShearFvPatchVectorField
60     public directionMixedFvPatchVectorField
62     // Private data
64         //- Name of the displacement field
65         const word fieldName_;
67         //- Is it a non linear solver
68         nonLinearGeometry::nonLinearType nonLinear_;
70         //- if it is an orthropic solver
71         Switch orthotropic_;
73 public:
75     //- Runtime type information
76     TypeName("fixedDisplacementZeroShear");
79     // Constructors
81         //- Construct from patch and internal field
82         fixedDisplacementZeroShearFvPatchVectorField
83         (
84             const fvPatch&,
85             const DimensionedField<vector, volMesh>&
86         );
88         //- Construct from patch, internal field and dictionary
89         fixedDisplacementZeroShearFvPatchVectorField
90         (
91             const fvPatch&,
92             const DimensionedField<vector, volMesh>&,
93             const dictionary&
94         );
96         //- Construct by mapping given
97         // fixedDisplacementZeroShearFvPatchVectorField
98         //  onto a new patch
99         fixedDisplacementZeroShearFvPatchVectorField
100         (
101             const fixedDisplacementZeroShearFvPatchVectorField&,
102             const fvPatch&,
103             const DimensionedField<vector, volMesh>&,
104             const fvPatchFieldMapper&
105         );
107         //- Construct and return a clone
108         virtual tmp<fvPatchField<vector> > clone() const
109         {
110             return tmp<fvPatchField<vector> >
111             (
112                 new fixedDisplacementZeroShearFvPatchVectorField(*this)
113             );
114         }
116         //- Construct as copy setting internal field reference
117         fixedDisplacementZeroShearFvPatchVectorField
118         (
119             const fixedDisplacementZeroShearFvPatchVectorField&,
120             const DimensionedField<vector, volMesh>&
121         );
123         //- Construct and return a clone setting internal field reference
124         virtual tmp<fvPatchField<vector> > clone
125         (
126             const DimensionedField<vector, volMesh>& iF
127         ) const
128         {
129             return tmp<fvPatchField<vector> >
130             (
131                 new fixedDisplacementZeroShearFvPatchVectorField(*this, iF)
132             );
133         }
135     // Destructor
137         virtual ~fixedDisplacementZeroShearFvPatchVectorField()
138         {}
141     // Member functions
143         // Mapping functions
145             //- Map (and resize as needed) from self given a mapping object
146             virtual void autoMap
147             (
148                 const fvPatchFieldMapper&
149             );
151             //- Reverse map the given fvPatchField onto this fvPatchField
152             virtual void rmap
153             (
154                 const fvPatchField<vector>&,
155                 const labelList&
156             );
159         // Evaluation functions
161             //- Update the coefficients associated with the patch field
162             virtual void updateCoeffs();
165         //- Write
166         virtual void write(Ostream&) const;
169     // Member operators
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 #endif
182 // ************************************************************************* //