suanPan
NonlinearHoffman.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2024 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  ******************************************************************************/
31 #ifndef NONLINEARHOFFMAN_H
32 #define NONLINEARHOFFMAN_H
33 
35 
37  const vec modulus, ratio, yield_stress;
38 };
39 
41  static constexpr double two_third = 2. / 3.;
42  static const double root_two_third;
43  static constexpr unsigned max_iteration = 20u;
44  static const uword sa;
45  static const span sb;
46 
47  mat proj_a, proj_b, elastic_a;
48 
49  [[nodiscard]] virtual double compute_k(double) const = 0;
50  [[nodiscard]] virtual double compute_dk(double) const = 0;
51 
52 public:
54  unsigned, // tag
55  vec&&, // elastic modulus
56  vec&&, // poissons ratio
57  vec&&, // sigma
58  double = 0. // density
59  );
60 
61  int initialize(const shared_ptr<DomainBase>&) 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 
The Material3D class.
Definition: Material3D.h:37
The NonlinearHoffman class.
Definition: NonlinearHoffman.h:40
int commit_status() override
Definition: NonlinearHoffman.cpp:117
int clear_status() override
Definition: NonlinearHoffman.cpp:109
void print() override
Definition: NonlinearHoffman.cpp:133
NonlinearHoffman(unsigned, vec &&, vec &&, vec &&, double=0.)
Definition: NonlinearHoffman.cpp:25
int update_trial_status(const vec &) override
Definition: NonlinearHoffman.cpp:39
int reset_status() override
Definition: NonlinearHoffman.cpp:125
int initialize(const shared_ptr< DomainBase > &) override
Definition: NonlinearHoffman.cpp:29
Definition: NonlinearHoffman.h:36
const vec ratio
Definition: NonlinearHoffman.h:37
const vec yield_stress
Definition: NonlinearHoffman.h:37
const vec modulus
Definition: NonlinearHoffman.h:37