suanPan
Loading...
Searching...
No Matches
PCPE4DC.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 PCPE4DC_H
31#define PCPE4DC_H
32
34
35class PCPE4DC 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 const uvec s_dof, f_dof;
45
46 static constexpr unsigned m_node = 4, m_dof = 4, m_size = m_dof * m_node;
47
48 const double alpha;
49 const double porosity;
50 const double k;
51
52 double q = 0.;
53
54 mat meta_k;
55
56 vector<IntegrationPoint> int_pt;
57
58public:
59 PCPE4DC(unsigned, // tag
60 uvec&&, // node tag
61 unsigned, // solid material tag
62 unsigned, // fluid material tag
63 double, // alpha
64 double, // porosity
65 double // permeability
66 );
67
68 int initialize(const shared_ptr<DomainBase>&) override;
69
70 int update_status() override;
71
72 int commit_status() override;
73 int clear_status() override;
74 int reset_status() override;
75
76 [[nodiscard]] mat compute_shape_function(const mat&, unsigned) const override;
77
78 vector<vec> record(OutputType) override;
79
80 void print() override;
81
82#ifdef SUANPAN_VTK
83 void Setup() override;
84 void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType) override;
85 mat GetData(OutputType) override;
86 void SetDeformation(vtkSmartPointer<vtkPoints>&, double) override;
87#endif
88};
89
90#endif
91
OutputType
Definition OutputType.h:21
Definition MaterialElement.h:62
The PCPE4 class handles CPE4 elements with pore pressure.
Definition PCPE4DC.h:35
void print() override
Definition PCPE4DC.cpp:216
int clear_status() override
Definition PCPE4DC.cpp:174
int initialize(const shared_ptr< DomainBase > &) override
Definition PCPE4DC.cpp:42
int reset_status() override
Definition PCPE4DC.cpp:180
int update_status() override
Definition PCPE4DC.cpp:150
mat compute_shape_function(const mat &, unsigned) const override
Definition PCPE4DC.cpp:186
vector< vec > record(OutputType) override
Definition PCPE4DC.cpp:188
int commit_status() override
Definition PCPE4DC.cpp:168