suanPan
ElementExample.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  ******************************************************************************/
17 
18 #ifndef ELEMENTEXAMPLE_H
19 #define ELEMENTEXAMPLE_H
20 
21 #include <Element/Element.h>
22 
23 class ElementExample final : public Element {
24  static constexpr unsigned m_node = 3, m_dof = 2, m_size = m_node * m_dof;
25 
26  const double thickness, area = 0.;
27 
28  mat strain_mat;
29 
30  unique_ptr<Material> m_material;
31 
32 public:
33  ElementExample(unsigned, uvec&&, unsigned, double = 1.);
34 
35  int initialize(const shared_ptr<DomainBase>&) override;
36 
37  int update_status() override;
38 
39  int commit_status() override;
40  int clear_status() override;
41  int reset_status() override;
42 
43  void print() override;
44 };
45 
46 #endif
Definition: ElementExample.h:23
int clear_status() override
Definition: ElementExample.cpp:99
int commit_status() override
Definition: ElementExample.cpp:97
void print() override
Definition: ElementExample.cpp:103
int initialize(const shared_ptr< DomainBase > &) override
Definition: ElementExample.cpp:59
ElementExample(unsigned, uvec &&, unsigned, double=1.)
Definition: ElementExample.cpp:55
int reset_status() override
Definition: ElementExample.cpp:101
int update_status() override
Definition: ElementExample.cpp:88
A Element class.
Definition: Element.h:113
Definition: shape.h:50