suanPan
Loading...
Searching...
No Matches
Yeoh.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 ******************************************************************************/
29#ifndef YEOH_H
30#define YEOH_H
31
33
34struct DataYeoh {
35 const vec A0;
36 const vec A1;
37};
38
39class Yeoh final : DataYeoh, public Material3D {
40 static const vec weight;
41 static const vec I1E;
42
43 static constexpr double one_three = 1. / 3.;
44 static constexpr double two_three = 2. * one_three;
45 static constexpr double four_three = 2. * two_three;
46 static constexpr double five_three = 5. * one_three;
47 static constexpr double eight_nine = two_three * four_three;
48
49 [[nodiscard]] vec compute_derivative(double, double) const;
50
51public:
52 Yeoh(unsigned, // tag
53 vec&&, // constants
54 vec&&, // constants
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
The Material3D class.
Definition Material3D.h:37
The Yeoh class.
Definition Yeoh.h:39
int clear_status() override
Definition Yeoh.cpp:120
int update_trial_status(const vec &) override
Definition Yeoh.cpp:79
void print() override
Definition Yeoh.cpp:143
int commit_status() override
Definition Yeoh.cpp:129
int reset_status() override
Definition Yeoh.cpp:136
unique_ptr< Material > get_copy() override
Definition Yeoh.cpp:76
int initialize(const shared_ptr< DomainBase > &) override
Definition Yeoh.cpp:69
Definition Yeoh.h:34
const vec A0
Definition Yeoh.h:35
const vec A1
Definition Yeoh.h:36