suanPan
CP7.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  ******************************************************************************/
32 #ifndef CP7_H
33 #define CP7_H
34 
36 
37 class CP7 final : public MaterialElement2D {
38  struct IntegrationPoint final {
39  vec coor;
40  double weight;
41  unique_ptr<Material> m_material;
42  mat pn_pxy, strain_mat;
43  IntegrationPoint(vec&&, double, unique_ptr<Material>&&, mat&&);
44  };
45 
46  static constexpr unsigned m_node = 7, m_dof = 2, m_size = m_dof * m_node;
47 
48  const double thickness;
49 
50  vector<IntegrationPoint> int_pt;
51 
52 public:
53  CP7(unsigned, // tag
54  uvec&&, // node tag
55  unsigned, // material tag
56  double = 1., // thickness
57  bool = false // nonlinear geometry switch
58  );
59 
60  int initialize(const shared_ptr<DomainBase>&) override;
61 
62  int update_status() override;
63 
64  int commit_status() override;
65  int clear_status() override;
66  int reset_status() override;
67 
68  [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
69 
70  vector<vec> record(OutputType) override;
71 
72  void print() override;
73 };
74 
75 #endif
76 
OutputType
Definition: OutputType.h:21
The CP7 class handles CPS5, CPE5, CPS5R and CPE5R elements. It is a four node constant strain membran...
Definition: CP7.h:37
CP7(unsigned, uvec &&, unsigned, double=1., bool=false)
Definition: CP7.cpp:34
int clear_status() override
Definition: CP7.cpp:165
vector< vec > record(OutputType) override
Definition: CP7.cpp:179
int update_status() override
Definition: CP7.cpp:94
int reset_status() override
Definition: CP7.cpp:171
int commit_status() override
Definition: CP7.cpp:159
void print() override
Definition: CP7.cpp:185
mat compute_shape_function(const mat &, unsigned) const override
Definition: CP7.cpp:177
int initialize(const shared_ptr< DomainBase > &) override
Definition: CP7.cpp:38
Definition: MaterialElement.h:62