suanPan
PCPE8UC.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  ******************************************************************************/
30 #ifndef PCPE8UC_H
31 #define PCPE8UC_H
32 
34 
35 class PCPE8UC final : public MaterialElement2D {
36  struct IntegrationPoint final {
37  vec coor;
38  double weight;
39  unique_ptr<Material> m_material;
40  mat strain_mat;
41  IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
42  };
43 
44  static constexpr unsigned m_node = 8, m_dof = 2, m_size = m_dof * m_node;
45 
46  const double alpha;
47  const double porosity;
48 
49  double q = 0.;
50 
51  mat meta_k;
52 
53  vector<IntegrationPoint> int_pt;
54 
55 public:
56  PCPE8UC(
57  unsigned, // tag
58  uvec&&, // node tag
59  unsigned, // solid material tag
60  unsigned, // fluid material tag
61  double, // alpha
62  double // porosity
63  );
64 
65  int initialize(const shared_ptr<DomainBase>&) override;
66 
67  int update_status() override;
68 
69  int commit_status() override;
70  int clear_status() override;
71  int reset_status() override;
72 
73  [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
74 
75  vector<vec> record(OutputType) override;
76 
77  void print() override;
78 
79 #ifdef SUANPAN_VTK
80  void Setup() override;
81  void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
82  mat GetData(OutputType) override;
83  void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
84 #endif
85 };
86 
87 #endif
88 
OutputType
Definition: OutputType.h:23
Definition: MaterialElement.h:64
The PCPE8 class handles CPE8 elements with pore pressure.
Definition: PCPE8UC.h:35
int update_status() override
Definition: PCPE8UC.cpp:113
mat compute_shape_function(const mat &, unsigned) const override
Definition: PCPE8UC.cpp:147
void print() override
Definition: PCPE8UC.cpp:161
vector< vec > record(OutputType) override
Definition: PCPE8UC.cpp:149
int commit_status() override
Definition: PCPE8UC.cpp:129
PCPE8UC(unsigned, uvec &&, unsigned, unsigned, double, double)
Definition: PCPE8UC.cpp:33
int clear_status() override
Definition: PCPE8UC.cpp:135
int reset_status() override
Definition: PCPE8UC.cpp:141
int initialize(const shared_ptr< DomainBase > &) override
Definition: PCPE8UC.cpp:38