suanPan
Spring02.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 ******************************************************************************/
30#ifndef SPRING02_H
31#define SPRING02_H
32
34
35class Spring02 final : public MaterialElement1D {
36 static constexpr unsigned s_node = 2, s_dof = 2, s_size = s_dof * s_node;
37
38 static uvec IS, JS;
39
40 const double length = 0.;
41
42 vec direction_cosine;
43
44 unique_ptr<Material> s_material;
45
46public:
48 unsigned, // tag
49 uvec&&, // node tags
50 unsigned // material tag
51 );
52
53 int initialize(const shared_ptr<DomainBase>&) override;
54
55 int update_status() override;
56
57 int commit_status() override;
58 int clear_status() override;
59 int reset_status() override;
60
61 vector<vec> record(OutputType) override;
62
63 void print() override;
64};
65
66#endif
67
OutputType
Definition: OutputType.h:23
Definition: MaterialElement.h:51
The Spring02 class.
Definition: Spring02.h:35
int initialize(const shared_ptr< DomainBase > &) override
Definition: Spring02.cpp:28
Spring02(unsigned, uvec &&, unsigned)
Definition: Spring02.cpp:25
int clear_status() override
Definition: Spring02.cpp:69
int reset_status() override
Definition: Spring02.cpp:71
int commit_status() override
Definition: Spring02.cpp:67
vector< vec > record(OutputType) override
Definition: Spring02.cpp:73
int update_status() override
Definition: Spring02.cpp:51
void print() override
Definition: Spring02.cpp:75