suanPan
Patch.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 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:
48  MaterialPatch(unsigned, // tag
49  unsigned, // number of dofs
50  uvec&&, // node encoding
51  uvec&&, // material tags
52  field<vec>&&, // knot pool
53  bool, // nonlinear geometry switch
54  MaterialType // material type
55  );
56 };
57 
59 public:
60  MaterialPatch2D(unsigned, // tag
61  unsigned, // number of dofs
62  uvec&&, // node encoding
63  uvec&&, // material tags
64  field<vec>&&, // knot pool
65  bool // nonlinear geometry switch
66  );
67 };
68 
70 public:
71  MaterialPatch3D(unsigned, // tag
72  unsigned, // number of dofs
73  uvec&&, // node encoding
74  uvec&&, // material tags
75  field<vec>&&, // knot pool
76  bool // nonlinear geometry switch
77  );
78 };
79 
80 class SectionPatch : public Patch, public SectionElement {
81 public:
82  SectionPatch(unsigned, // tag
83  unsigned, // number of dofs
84  uvec&&, // node encoding
85  uvec&&, // section tags
86  field<vec>&&, // knot pool
87  bool, // nonlinear geometry switch
88  SectionType // section type
89  );
90 };
91 
92 class SectionPatch2D : public SectionPatch {
93 public:
94  SectionPatch2D(unsigned, // tag
95  unsigned, // number of dofs
96  uvec&&, // node encoding
97  uvec&&, // section tags
98  field<vec>&&, // knot pool
99  bool // nonlinear geometry switch
100  );
101 };
102 
103 class SectionPatch3D : public SectionPatch {
104 public:
105  SectionPatch3D(unsigned, // tag
106  unsigned, // number of dofs
107  uvec&&, // node encoding
108  uvec&&, // section tags
109  field<vec>&&, // knot pool
110  bool // nonlinear geometry switch
111  );
112 };
113 
114 #endif
115 
The MaterialElement class.
Definition: MaterialElement.h:37
Definition: Patch.h:58
MaterialPatch2D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:40
Definition: Patch.h:69
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:92
SectionPatch2D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:50
Definition: Patch.h:103
SectionPatch3D(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool)
Definition: Patch.cpp:53
Definition: Patch.h:80
SectionPatch(unsigned, unsigned, uvec &&, uvec &&, field< vec > &&, bool, SectionType)
Definition: Patch.cpp:46
MaterialType
Definition: Material.h:34
SectionType
Definition: Section.h:34