suanPan
SlipLock.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 Theodore Chang
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  ******************************************************************************/
33 #ifndef SLIPLOCK_H
34 #define SLIPLOCK_H
35 
37 
38 struct DataSlipLock {
39  const double elastic_modulus; // elastic modulus
40  const double hardening_ratio; // hardening ratio
41  const double yield_strain; // yield stress
42  const double R0; // model parameters
43 };
44 
45 class SlipLock final : DataSlipLock, public Material1D {
46  static constexpr unsigned max_iteration = 20;
47 
48  const double yield_stress = yield_strain * elastic_modulus; // yield strain
49 public:
50  SlipLock(unsigned, // tag
51  double, // elastic modulus
52  double, // yield strain
53  double = .05, // hardening ratio
54  double = 20., // R0
55  double = 0. // density
56  );
57 
58  int initialize(const shared_ptr<DomainBase>&) override;
59 
60  unique_ptr<Material> get_copy() override;
61 
62  int update_trial_status(const vec&) override;
63 
64  int clear_status() override;
65  int commit_status() override;
66  int reset_status() override;
67 
68  void print() override;
69 };
70 
71 #endif
72 
A Material1D class.
Definition: Material1D.h:36
The SlipLock class.
Definition: SlipLock.h:45
int clear_status() override
Definition: SlipLock.cpp:57
int commit_status() override
Definition: SlipLock.cpp:64
unique_ptr< Material > get_copy() override
Definition: SlipLock.cpp:31
int update_trial_status(const vec &) override
Definition: SlipLock.cpp:33
SlipLock(unsigned, double, double, double=.05, double=20., double=0.)
Definition: SlipLock.cpp:21
int initialize(const shared_ptr< DomainBase > &) override
Definition: SlipLock.cpp:25
void print() override
Definition: SlipLock.cpp:78
int reset_status() override
Definition: SlipLock.cpp:71
Definition: SlipLock.h:38
const double yield_strain
Definition: SlipLock.h:41
const double elastic_modulus
Definition: SlipLock.h:39
const double R0
Definition: SlipLock.h:42
const double hardening_ratio
Definition: SlipLock.h:40