suanPan
PatchCube.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 ******************************************************************************/
29#ifndef PATCHCUBE_H
30#define PATCHCUBE_H
31
32#include <Element/Patch/Patch.h>
33
34class PatchCube final : public MaterialPatch3D {
35 struct IntegrationPoint final {
36 vec coor;
37 double weight;
38 unique_ptr<Material> c_material;
39 sp_mat strain_mat;
40 IntegrationPoint(vec&&, double, unique_ptr<Material>&&);
41 };
42
43 static constexpr unsigned c_dof = 3;
44
45 const unsigned c_node;
46
47 const unsigned c_size = c_dof * c_node;
48
49 vector<IntegrationPoint> int_pt;
50
51public:
53 unsigned, // tag
54 vec&&, // knot x
55 vec&&, // knot y
56 vec&&, // knot z
57 uvec&&, // node tag
58 unsigned // material tag
59 );
60
61 int initialize(const shared_ptr<DomainBase>&) override;
62
63 int update_status() override;
64
65 int commit_status() override;
66 int clear_status() override;
67 int reset_status() override;
68
69 vector<vec> record(OutputType) override;
70
71 void print() override;
72};
73
74#endif
75
OutputType
Definition: OutputType.h:23
Definition: Patch.h:71
The PatchCube class.
Definition: PatchCube.h:34
void print() override
Definition: PatchCube.cpp:150
int clear_status() override
Definition: PatchCube.cpp:132
int reset_status() override
Definition: PatchCube.cpp:138
vector< vec > record(OutputType) override
Definition: PatchCube.cpp:144
int initialize(const shared_ptr< DomainBase > &) override
Definition: PatchCube.cpp:34
int update_status() override
Definition: PatchCube.cpp:110
int commit_status() override
Definition: PatchCube.cpp:126
PatchCube(unsigned, vec &&, vec &&, vec &&, uvec &&, unsigned)
Definition: PatchCube.cpp:30