suanPan
PatchQuad.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2024 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
38class 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
55public:
57 unsigned, // tag
58 vec&&, // knot x
59 vec&&, // knot y
60 uvec&&, // node tag
61 unsigned, // material tag
62 double = 1. // thickness
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 vector<vec> record(OutputType) override;
74
75 void print() override;
76};
77
78#endif
79
OutputType
Definition: OutputType.h:23
Definition: Patch.h:59
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:115
int clear_status() override
Definition: PatchQuad.cpp:137
vector< vec > record(OutputType) override
Definition: PatchQuad.cpp:149
int initialize(const shared_ptr< DomainBase > &) override
Definition: PatchQuad.cpp:36
void print() override
Definition: PatchQuad.cpp:155
PatchQuad(unsigned, vec &&, vec &&, uvec &&, unsigned, double=1.)
Definition: PatchQuad.cpp:30
int reset_status() override
Definition: PatchQuad.cpp:143
int commit_status() override
Definition: PatchQuad.cpp:131