suanPan
StressWrapper.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 StressWrapper_H
32 #define StressWrapper_H
33 
34 #include <Material/Material.h>
35 #include <Toolbox/ResourceHolder.h>
36 
37 class StressWrapper : public Material {
38  const uvec F1, F2;
39 
40  const unsigned base_tag;
41 
42  const unsigned max_iteration;
43 
44  vec trial_full_strain, current_full_strain;
45 
46  [[nodiscard]] mat form_stiffness(const mat&) const;
47 
48 protected:
50 
51 public:
53  unsigned, // tag
54  unsigned, // 3D material tag
55  unsigned, // max iteration
56  uvec&&, // non-trivial stress DoF
57  uvec&&, // trivial stress DoF
58  MaterialType // material type
59  );
60 
61  int initialize(const shared_ptr<DomainBase>&) override;
62 
63  [[nodiscard]] double get_parameter(ParameterType) const override;
64 
65  int update_trial_status(const vec&) override;
66 
67  int clear_status() override;
68  int commit_status() override;
69  int reset_status() override;
70 
71  std::vector<vec> record(OutputType) override;
72 };
73 
74 #endif
75 
OutputType
Definition: OutputType.h:23
ParameterType
Definition: ParameterType.h:21
A Material abstract base class.
Definition: Material.h:111
A StressWrapper class.
Definition: StressWrapper.h:37
std::vector< vec > record(OutputType) override
Definition: StressWrapper.cpp:113
int commit_status() override
Definition: StressWrapper.cpp:97
ResourceHolder< Material > base
Definition: StressWrapper.h:49
int initialize(const shared_ptr< DomainBase > &) override
Definition: StressWrapper.cpp:30
int update_trial_status(const vec &) override
Definition: StressWrapper.cpp:49
double get_parameter(ParameterType) const override
Definition: StressWrapper.cpp:47
StressWrapper(unsigned, unsigned, unsigned, uvec &&, uvec &&, MaterialType)
Definition: StressWrapper.cpp:23
int clear_status() override
Definition: StressWrapper.cpp:89
int reset_status() override
Definition: StressWrapper.cpp:105
MaterialType
Definition: Material.h:34