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 ini_r; // model parameters
43 };
44 
45 class SlipLock final : protected DataSlipLock, public Material1D {
46  static constexpr unsigned max_iteration = 20u;
47 
48  const double yield_stress = yield_strain * elastic_modulus; // yield strain
49 public:
50  SlipLock(
51  unsigned, // tag
52  double, // elastic modulus
53  double, // yield strain
54  double = .05, // hardening ratio
55  double = 20., // R0
56  double = 0. // density
57  );
58 
59  int initialize(const shared_ptr<DomainBase>&) override;
60 
61  unique_ptr<Material> get_copy() override;
62 
63  int update_trial_status(const vec&) override;
64 
65  int clear_status() override;
66  int commit_status() override;
67  int reset_status() override;
68 
69  void print() override;
70 };
71 
72 #endif
73 
A Material1D class.
Definition: Material1D.h:36
The SlipLock class.
Definition: SlipLock.h:45
int clear_status() override
Definition: SlipLock.cpp:63
int commit_status() override
Definition: SlipLock.cpp:70
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:84
int reset_status() override
Definition: SlipLock.cpp:77
Definition: SlipLock.h:38
const double yield_strain
Definition: SlipLock.h:41
const double elastic_modulus
Definition: SlipLock.h:39
const double ini_r
Definition: SlipLock.h:42
const double hardening_ratio
Definition: SlipLock.h:40