Remove trailing whitespace systematically
[foam-extend-3.2.git] / applications / solvers / solidMechanics / deprecatedSolvers / materialModels / fvPatchFields / cohesiveLaw / cohesiveLawFvPatchVectorField.H
blob77fb4a3c88443a1af544878d59b8ed86c283f05a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     |
5     \\  /    A nd           | For copyright notice see file Copyright
6      \\/     M anipulation  |
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     cohesiveLawFvPatchVectorField
27 Description
28     Cohesive law fv patch field
30 SourceFiles
31     cohesiveLawFvPatchVectorField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef cohesiveLawFvPatchVectorField_H
36 #define cohesiveLawFvPatchVectorField_H
38 #include "fvPatchFields.H"
39 #include "fixedGradientFvPatchFields.H"
40 #include "cohesiveFvPatch.H"
41 #include "cohesiveLaw.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                    Class cohesiveLawFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
52 class cohesiveLawFvPatchVectorField
54     public fixedGradientFvPatchVectorField
57     // Private Data
59         //- Cohesive law
60         cohesiveLaw* cohesiveLawPtr_;
62         //- Under-relaxation factor
63         scalar relaxationFactor_;
65         //- Traction
66         vectorField traction_;
69 public:
71     //- Runtime type information
72     TypeName("cohesiveLaw");
75     // Constructors
77         //- Construct from patch and internal field
78         cohesiveLawFvPatchVectorField
79         (
80             const fvPatch&,
81             const DimensionedField<vector, volMesh>&
82         );
84         //- Construct from patch, internal field and dictionary
85         cohesiveLawFvPatchVectorField
86         (
87             const fvPatch&,
88             const DimensionedField<vector, volMesh>&,
89             const dictionary&
90         );
92         //- Construct by mapping given
93         //  cohesiveLawFvPatchVectorField onto a new patch
94         cohesiveLawFvPatchVectorField
95         (
96             const cohesiveLawFvPatchVectorField&,
97             const fvPatch&,
98             const DimensionedField<vector, volMesh>&,
99             const fvPatchFieldMapper&
100         );
102         //- Construct as copy
103         cohesiveLawFvPatchVectorField
104         (
105             const cohesiveLawFvPatchVectorField&
106         );
108         //- Construct and return a clone
109         virtual tmp<fvPatchVectorField> clone() const
110         {
111             return tmp<fvPatchVectorField>
112             (
113                 new cohesiveLawFvPatchVectorField(*this)
114             );
115         }
117         //- Construct as copy setting internal field reference
118         cohesiveLawFvPatchVectorField
119         (
120             const cohesiveLawFvPatchVectorField&,
121             const DimensionedField<vector, volMesh>&
122         );
124         //- Construct and return a clone setting internal field reference
125         virtual tmp<fvPatchVectorField> clone
126         (
127             const DimensionedField<vector, volMesh>& iF
128         ) const
129         {
130             return tmp<fvPatchVectorField>
131             (
132                 new cohesiveLawFvPatchVectorField(*this, iF)
133             );
134         }
137     // Member functions
139         // Access
141             //- Return cohesive law
142             const cohesiveLaw& law() const;
145         // Mapping functions
147             //- Map (and resize as needed) from self given a mapping object
148             virtual void autoMap
149             (
150                 const fvPatchFieldMapper&
151             );
153             //- Reverse map the given fvPatchField onto this fvPatchField
154             virtual void rmap
155             (
156                 const fvPatchVectorField&,
157                 const labelList&
158             );
161         //- Update the coefficients associated with the patch field
162         virtual void updateCoeffs();
164         //- Write
165         virtual void write(Ostream&) const;
168     // Member operators
170         virtual void operator=(const fvPatchVectorField&) {}
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 #endif
182 // ************************************************************************* //