suanPan
Patch.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 PATCH_H
30 #define PATCH_H
31 
33 #include <Element/SectionElement.h>
34 
35 class Patch {
36 protected:
37  const field<vec> knot_pool;
38  vector<uvec> element_span;
39 
40 public:
41  explicit Patch(field<vec>&&);
42 
43  [[nodiscard]] uvec get_number_of_control_points() const;
44 };
45 
46 class MaterialPatch : public Patch, public MaterialElement {
47 public:
49  unsigned, // tag
50  unsigned, // number of dofs
51  uvec&&, // node encoding
52  uvec&&, // material tags
53  field<vec>&&, // knot pool
54  bool, // nonlinear geometry switch
55  MaterialType // material type
56  );
57 };
58 
60 public:
62  unsigned, // tag
63  unsigned, // number of dofs
64  uvec&&, // node encoding
65  uvec&&, // material tags
66  field<vec>&&, // knot pool
67  bool // nonlinear geometry switch
68  );
69 };
70 
72 public:
74  unsigned, // tag
75  unsigned, // number of dofs
76  uvec&&, // node encoding
77  uvec&&, // material tags
78  field<vec>&&, // knot pool
79  bool // nonlinear geometry switch
80  );
81 };
82 
83 class SectionPatch : public Patch, public SectionElement {
84 public:
86  unsigned, // tag
87  unsigned, // number of dofs
88  uvec&&, // node encoding
89  uvec&&, // section tags
90  field<vec>&&, // knot pool
91  bool, // nonlinear geometry switch
92  SectionType // section type
93  );
94 };
95 
96 class SectionPatch2D : public SectionPatch {
97 public:
99  unsigned, // tag
100  unsigned, // number of dofs
101  uvec&&, // node encoding
102  uvec&&, // section tags
103  field<vec>&&, // knot pool
104  bool // nonlinear geometry switch
105  );
106 };
107 
108 class SectionPatch3D : public SectionPatch {
109 public:
111  unsigned, // tag
112  unsigned, // number of dofs
113  uvec&&, // node encoding
114  uvec&&, // section tags
115  field<vec>&&, // knot pool
116  bool // nonlinear geometry switch
117  );
118 };
119 
120 #endif
121 
The MaterialElement class.
Definition: MaterialElement.h:37
Definition: Patch.h:59
MaterialPatch2D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:40
Definition: Patch.h:71
MaterialPatch3D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:43
Definition: Patch.h:46
MaterialPatch(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool, MaterialType)
Definition: Patch.cpp:36
A Patch class.
Definition: Patch.h:35
Patch(field< vec > &&)
Definition: Patch.cpp:23
uvec get_number_of_control_points() const
Definition: Patch.cpp:30
const field< vec > knot_pool
Definition: Patch.h:37
vector< uvec > element_span
Definition: Patch.h:38
The SectionElement class.
Definition: SectionElement.h:37
Definition: Patch.h:96
SectionPatch2D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:50
Definition: Patch.h:108
SectionPatch3D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:53
Definition: Patch.h:83
SectionPatch(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool, SectionType)
Definition: Patch.cpp:46
MaterialType
Definition: Material.h:34
SectionType
Definition: Section.h:33