suanPan
Loading...
Searching...
No Matches
Maxwell.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 ******************************************************************************/
28#ifndef MAXWELL_H
29#define MAXWELL_H
30
33
34class Maxwell final : public Material1D {
35 static constexpr unsigned max_iteration = 20;
36
37 const double* incre_time = nullptr;
38
39 unsigned counter = 0, delay_counter = 0;
40 const unsigned damper_tag, spring_tag;
41 const unsigned proceed;
42
43 const bool use_matrix;
44
45 double beta;
46
47 ResourceHolder<Material> damper, spring;
48
49public:
50 Maxwell(unsigned, // tag
51 unsigned, // damper tag
52 unsigned, // spring tag
53 bool = false, // if to use matrix
54 unsigned = 0, // if to process when fails to converge
55 double = 0. // beta
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 int update_trial_status(const vec&, const vec&) override;
64
65 int clear_status() override;
66 int commit_status() override;
67 int reset_status() override;
68
69 vector<vec> record(OutputType) override;
70
71 void print() override;
72};
73
74#endif
75
OutputType
Definition OutputType.h:21
A Material1D class.
Definition Material1D.h:36
A 1D Maxwell material class.
Definition Maxwell.h:34
unique_ptr< Material > get_copy() override
Definition Maxwell.cpp:47
int commit_status() override
Definition Maxwell.cpp:150
void print() override
Definition Maxwell.cpp:183
vector< vec > record(OutputType) override
Definition Maxwell.cpp:168
int clear_status() override
Definition Maxwell.cpp:141
int initialize(const shared_ptr< DomainBase > &) override
Definition Maxwell.cpp:31
int reset_status() override
Definition Maxwell.cpp:159
int update_trial_status(const vec &) override
Definition Maxwell.cpp:49
Definition ResourceHolder.h:32