suanPan
PatchQuad.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 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  ******************************************************************************/
33 #ifndef PATCHQUAD_H
34 #define PATCHQUAD_H
35 
36 #include <Element/Patch/Patch.h>
37 
38 class PatchQuad final : public MaterialPatch2D {
39  struct IntegrationPoint final {
40  vec coor;
41  double weight;
42  unique_ptr<Material> m_material;
43  sp_mat strain_mat;
44  IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
45  };
46 
47  static constexpr unsigned m_dof = 2;
48 
49  const unsigned m_node, m_size;
50 
51  const double thickness;
52 
53  vector<IntegrationPoint> int_pt;
54 
55 public:
56  PatchQuad(unsigned, // tag
57  vec&&, // knot x
58  vec&&, // knot y
59  uvec&&, // node tag
60  unsigned, // material tag
61  double = 1. // thickness
62  );
63 
64  int initialize(const shared_ptr<DomainBase>&) override;
65 
66  int update_status() override;
67 
68  int commit_status() override;
69  int clear_status() override;
70  int reset_status() override;
71 
72  vector<vec> record(OutputType) override;
73 
74  void print() override;
75 };
76 
77 #endif
78 
OutputType
Definition: OutputType.h:21
Definition: Patch.h:58
The PatchQuad class handles CPS4, CPE4, CPS4R and CPE4R elements. It is a four node constant strain m...
Definition: PatchQuad.h:38
int update_status() override
Definition: PatchQuad.cpp:116
int clear_status() override
Definition: PatchQuad.cpp:138
vector< vec > record(OutputType) override
Definition: PatchQuad.cpp:150
int initialize(const shared_ptr< DomainBase > &) override
Definition: PatchQuad.cpp:37
void print() override
Definition: PatchQuad.cpp:156
PatchQuad(unsigned, vec &&, vec &&, uvec &&, unsigned, double=1.)
Definition: PatchQuad.cpp:31
int reset_status() override
Definition: PatchQuad.cpp:144
int commit_status() override
Definition: PatchQuad.cpp:132