suanPan
Maxwell.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 ******************************************************************************/
28#ifndef MAXWELL_H
29#define MAXWELL_H
30
33
34class Maxwell final : public Material1D {
35 static constexpr unsigned max_iteration = 20u;
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(
51 unsigned, // tag
52 unsigned, // damper tag
53 unsigned, // spring tag
54 bool = false, // if to use matrix
55 unsigned = 0, // if to process when fails to converge
56 double = 0. // beta
57 );
58
59 int initialize(const shared_ptr<DomainBase>&) override;
60
62
63 int update_trial_status(const vec&) override;
64 int update_trial_status(const vec&, const vec&) override;
65
66 int clear_status() override;
67 int commit_status() override;
68 int reset_status() override;
69
70 vector<vec> record(OutputType) override;
71
72 void print() override;
73};
74
75#endif
76
OutputType
Definition: OutputType.h:23
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:158
void print() override
Definition: Maxwell.cpp:189
vector< vec > record(OutputType) override
Definition: Maxwell.cpp:176
Maxwell(unsigned, unsigned, unsigned, bool=false, unsigned=0, double=0.)
Definition: Maxwell.cpp:23
int clear_status() override
Definition: Maxwell.cpp:149
int initialize(const shared_ptr< DomainBase > &) override
Definition: Maxwell.cpp:31
int reset_status() override
Definition: Maxwell.cpp:167
int update_trial_status(const vec &) override
Definition: Maxwell.cpp:49