suanPan
PatchCube.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  ******************************************************************************/
29 #ifndef PATCHCUBE_H
30 #define PATCHCUBE_H
31 
32 #include <Element/Patch/Patch.h>
33 
34 class 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 
51 public:
52  PatchCube(unsigned, // tag
53  vec&&, // knot x
54  vec&&, // knot y
55  vec&&, // knot z
56  uvec&&, // node tag
57  unsigned // material tag
58  );
59 
60  int initialize(const shared_ptr<DomainBase>&) override;
61 
62  int update_status() override;
63 
64  int commit_status() override;
65  int clear_status() override;
66  int reset_status() override;
67 
68  vector<vec> record(OutputType) override;
69 
70  void print() override;
71 };
72 
73 #endif
74 
OutputType
Definition: OutputType.h:21
Definition: Patch.h:69
The PatchCube class.
Definition: PatchCube.h:34
void print() override
Definition: PatchCube.cpp:151
int clear_status() override
Definition: PatchCube.cpp:133
int reset_status() override
Definition: PatchCube.cpp:139
vector< vec > record(OutputType) override
Definition: PatchCube.cpp:145
int initialize(const shared_ptr< DomainBase > &) override
Definition: PatchCube.cpp:35
int update_status() override
Definition: PatchCube.cpp:111
int commit_status() override
Definition: PatchCube.cpp:127
PatchCube(unsigned, vec &&, vec &&, vec &&, uvec &&, unsigned)
Definition: PatchCube.cpp:31