suanPan
Loading...
Searching...
No Matches
NonlinearHoffman.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 ******************************************************************************/
31#ifndef NONLINEARHOFFMAN_H
32#define NONLINEARHOFFMAN_H
33
35
38};
39
41 static constexpr double two_third = 2. / 3.;
42 static const double root_two_third;
43 static const unsigned max_iteration;
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
52public:
53 NonlinearHoffman(unsigned, // tag
54 vec&&, // elastic modulus
55 vec&&, // poissons ratio
56 vec&&, // sigma
57 double = 0. // density
58 );
59
60 int initialize(const shared_ptr<DomainBase>&) override;
61
62 [[nodiscard]] double get_parameter(ParameterType) const override;
63
64 int update_trial_status(const vec&) override;
65
66 int clear_status() override;
67 int commit_status() override;
68 int reset_status() override;
69
70 void print() override;
71};
72
73#endif
74
ParameterType
Definition ParameterType.h:21
The Material3D class.
Definition Material3D.h:37
The NonlinearHoffman class.
Definition NonlinearHoffman.h:40
int commit_status() override
Definition NonlinearHoffman.cpp:126
int clear_status() override
Definition NonlinearHoffman.cpp:118
double get_parameter(ParameterType) const override
Definition NonlinearHoffman.cpp:43
void print() override
Definition NonlinearHoffman.cpp:142
int update_trial_status(const vec &) override
Definition NonlinearHoffman.cpp:48
int reset_status() override
Definition NonlinearHoffman.cpp:134
int initialize(const shared_ptr< DomainBase > &) override
Definition NonlinearHoffman.cpp:33
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