Forward compatibility: flex
[foam-extend-3.2.git] / src / solidModels / constitutiveModel / plasticityStressReturnMethods / plasticityStressReturn / plasticityStressReturn.H
blob62f85846c6b9e08adde49772def6fe94b114a346
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     plasticityStressReturn
27 Description
28     Method to calcluate the plastic strain increment, returning the
29     stress to the yield surface
31 SourceFiles
32     plasticityStressReturn.C
33     newPlasticityStressReturn.C
35 Author
36     Philip Cardiff UCD
38 \*---------------------------------------------------------------------------*/
40 #ifndef plasticityStressReturn_H
41 #define plasticityStressReturn_H
43 #include "IOdictionary.H"
44 #include "typeInfo.H"
45 #include "runTimeSelectionTables.H"
46 #include "volFields.H"
47 #include "tmp.H"
48 #include "autoPtr.H"
49 //#include "constitutiveModel.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 namespace Foam
56   class constitutiveModel;
58 /*---------------------------------------------------------------------------*\
59                          Class plasticityStressReturn Declaration
60 \*---------------------------------------------------------------------------*/
62 class plasticityStressReturn
64     // Private data
66         //- Name
67         const word name_;
70     // Private Member Functions
72         //- Disallow copy construct
73         plasticityStressReturn(const plasticityStressReturn&);
75         //- Disallow default bitwise assignment
76         void operator=(const plasticityStressReturn&);
79   //protected:
81 public:
83     //- Runtime type information
84     TypeName("plasticityStressReturn");
87     // Declare run-time constructor selection table
89         declareRunTimeSelectionTable
90         (
91             autoPtr,
92             plasticityStressReturn,
93             dictionary,
94             (
95          const word name,
96          constitutiveModel& constitutiveModel
97             ),
98             (name, constitutiveModel)
99         );
102     // Selectors
104         //- Return a reference to the selected rheology model
105         static autoPtr<plasticityStressReturn> New
106         (
107      const word& name,
108      constitutiveModel& constitutiveModel
109         );
112     // Constructors
114         //- Construct from dictionary
115         plasticityStressReturn
116         (
117      const word& name,
118      constitutiveModel& constitutiveModel
119      );
122     // Destructor
124         virtual ~plasticityStressReturn()
125         {}
128     // Member Functions
130         //- Return name
131         const word& name() const
132         {
133             return name_;
134         }
136         //- If plasticity is active
137         virtual bool plasticityActive() const
138         {
139       return true;
140     }
142         //- Increment of plastic strain
143         virtual const volSymmTensorField& DEpsilonP() const = 0;
145         //- Update the yield stress
146         //- called at end of time-step
147         virtual void updateYieldStress() = 0;
149         //- Correct model
150         virtual void correct() = 0;
152         //- Write model dictionary
153         //virtual void writeDict(Ostream& os) const {};
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 #endif
165 // ************************************************************************* //