1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
5 \\ / A nd | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
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/>.
25 cohesiveLawFvPatchVectorField
28 Cohesive law fv patch field
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class cohesiveLawFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
52 class cohesiveLawFvPatchVectorField
54 public fixedGradientFvPatchVectorField
60 cohesiveLaw* cohesiveLawPtr_;
62 //- Under-relaxation factor
63 scalar relaxationFactor_;
66 vectorField traction_;
71 //- Runtime type information
72 TypeName("cohesiveLaw");
77 //- Construct from patch and internal field
78 cohesiveLawFvPatchVectorField
81 const DimensionedField<vector, volMesh>&
84 //- Construct from patch, internal field and dictionary
85 cohesiveLawFvPatchVectorField
88 const DimensionedField<vector, volMesh>&,
92 //- Construct by mapping given
93 // cohesiveLawFvPatchVectorField onto a new patch
94 cohesiveLawFvPatchVectorField
96 const cohesiveLawFvPatchVectorField&,
98 const DimensionedField<vector, volMesh>&,
99 const fvPatchFieldMapper&
102 //- Construct as copy
103 cohesiveLawFvPatchVectorField
105 const cohesiveLawFvPatchVectorField&
108 //- Construct and return a clone
109 virtual tmp<fvPatchVectorField> clone() const
111 return tmp<fvPatchVectorField>
113 new cohesiveLawFvPatchVectorField(*this)
117 //- Construct as copy setting internal field reference
118 cohesiveLawFvPatchVectorField
120 const cohesiveLawFvPatchVectorField&,
121 const DimensionedField<vector, volMesh>&
124 //- Construct and return a clone setting internal field reference
125 virtual tmp<fvPatchVectorField> clone
127 const DimensionedField<vector, volMesh>& iF
130 return tmp<fvPatchVectorField>
132 new cohesiveLawFvPatchVectorField(*this, iF)
141 //- Return cohesive law
142 const cohesiveLaw& law() const;
147 //- Map (and resize as needed) from self given a mapping object
150 const fvPatchFieldMapper&
153 //- Reverse map the given fvPatchField onto this fvPatchField
156 const fvPatchVectorField&,
161 //- Update the coefficients associated with the patch field
162 virtual void updateCoeffs();
165 virtual void write(Ostream&) const;
170 virtual void operator=(const fvPatchVectorField&) {}
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //