suanPan
CAX3.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  ******************************************************************************/
29 #ifndef CAX3_H
30 #define CAX3_H
31 
33 
34 class CAX3 final : public MaterialElement2D {
35  static constexpr unsigned m_node = 3, m_dof = 2, m_size = m_dof * m_node;
36 
37  const double area = 0.; // area
38  const double weight = 0.;
39 
40  mat inv_coor, strain_mat;
41 
42  unique_ptr<Material> m_material; // store material model
43 public:
44  CAX3(unsigned, uvec&&, unsigned, bool = false);
45 
46  int initialize(const shared_ptr<DomainBase>&) override;
47 
48  int update_status() override;
49 
50  int commit_status() override;
51  int clear_status() override;
52  int reset_status() override;
53 
54  vector<vec> record(OutputType) override;
55 
56  void print() override;
57 
58 #ifdef SUANPAN_VTK
59  void Setup() override;
60  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
61  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
62 #endif
63 };
64 
65 #endif
66 
OutputType
Definition: OutputType.h:21
The CAX3 class defines CAX3 element.
Definition: CAX3.h:34
vector< vec > record(OutputType) override
Definition: CAX3.cpp:87
int update_status() override
Definition: CAX3.cpp:63
CAX3(unsigned, uvec &&, unsigned, bool=false)
Definition: CAX3.cpp:24
int initialize(const shared_ptr< DomainBase > &) override
Definition: CAX3.cpp:27
int reset_status() override
Definition: CAX3.cpp:85
int clear_status() override
Definition: CAX3.cpp:83
int commit_status() override
Definition: CAX3.cpp:81
void print() override
Definition: CAX3.cpp:89
Definition: MaterialElement.h:62
Definition: shape.h:50