MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Boundary.h
Go to the documentation of this file.
1/*
2 * Boundary.h
3 *
4 * Created on: 27 de abr de 2021
5 * Author: Fabricio Fernandez <fabricio.hmf@gmail.com>
6 */
7
8#ifndef BOUNDARY_H_
9#define BOUNDARY_H_
10
11#include <vector>
12using std::vector;
13
47class Boundary {
48
49public:
50
54
57 enum BoundaryPlane{ X0, Y0, Z0, Xn, Yn, Zn };
58
69
72 Boundary();
73
76 virtual ~Boundary();
77
80 inline const planeBoundary* getPlaneX0() const { return &(this->planeX0); }
81
84 inline const planeBoundary* getPlaneY0() const { return &(this->planeY0); }
85
88 inline const planeBoundary* getPlaneZ0() const { return &(this->planeZ0); }
89
92 inline const planeBoundary* getPlaneXn() const { return &(this->planeXn); }
93
96 inline const planeBoundary* getPlaneYn() const { return &(this->planeYn); }
97
100 inline const planeBoundary* getPlaneZn() const { return &(this->planeZn); }
101
104 inline void setNodesPlaneX0(const vector<int>& nodes_id) { this->planeX0.nodes=nodes_id; }
105
108 inline void setNodesPlaneY0(const vector<int>& nodes_id) { this->planeY0.nodes=nodes_id; }
109
112 inline void setNodesPlaneZ0(const vector<int>& nodes_id) { this->planeZ0.nodes=nodes_id; }
113
116 inline void setNodesPlaneXn(const vector<int>& nodes_id) { this->planeXn.nodes=nodes_id; }
117
120 inline void setNodesPlaneYn(const vector<int>& nodes_id) { this->planeYn.nodes=nodes_id; }
121
124 inline void setNodesPlaneZn(const vector<int>& nodes_id) { this->planeZn.nodes=nodes_id; }
125
128 inline void setRestrictions(Boundary::BoundaryType restriction);
129
132 inline void setRestrictionsFluid(Boundary::BoundaryType restriction);
133
137 inline void setRestrictions(Boundary::BoundaryPlane plane, Boundary::BoundaryType restriction);
138
143
144private:
145
147
149
151
153
155
157};
158
164
166
168
169 planeX0.restriction=restriction;
170 planeY0.restriction=restriction;
171 planeZ0.restriction=restriction;
172 planeXn.restriction=restriction;
173 planeYn.restriction=restriction;
174 planeZn.restriction=restriction;
175}
176
178
179 planeX0.restrictionFluid=restriction;
180 planeY0.restrictionFluid=restriction;
181 planeZ0.restrictionFluid=restriction;
182 planeXn.restrictionFluid=restriction;
183 planeYn.restrictionFluid=restriction;
184 planeZn.restrictionFluid=restriction;
185}
186
188
189 switch (plane)
190 {
192 planeX0.restriction=restriction;
193 break;
194
196 planeY0.restriction=restriction;
197 break;
198
200 planeZ0.restriction=restriction;
201 break;
202
204 planeXn.restriction=restriction;
205 break;
206
208 planeYn.restriction=restriction;
209 break;
210
212 planeZn.restriction=restriction;
213 break;
214 }
215}
216
218
219 switch (plane)
220 {
222 planeX0.restrictionFluid=restriction;
223 break;
224
226 planeY0.restrictionFluid=restriction;
227 break;
228
230 planeZ0.restrictionFluid=restriction;
231 break;
232
234 planeXn.restrictionFluid=restriction;
235 break;
236
238 planeYn.restrictionFluid=restriction;
239 break;
240
242 planeZn.restrictionFluid=restriction;
243 break;
244 }
245}
246#endif /* BOUNDARY_H_ */
Mesh boundary nodes.
Definition Boundary.h:47
void setNodesPlaneYn(const vector< int > &nodes_id)
Configure the nodes lower than the plane Yn, including ghosts.
Definition Boundary.h:120
Boundary::planeBoundary planeX0
boundary nodes at plane X0
Definition Boundary.h:146
void setNodesPlaneX0(const vector< int > &nodes_id)
Configure the nodes lower than the plane X0, including ghosts.
Definition Boundary.h:104
const planeBoundary * getPlaneYn() const
Return the nodes lower than the plane Yn, including ghosts.
Definition Boundary.h:96
void setRestrictionsFluid(Boundary::BoundaryType restriction)
Configure the restrictions of the boundary nodes.
Definition Boundary.h:177
Boundary::planeBoundary planeXn
boundary nodes at plane Xn
Definition Boundary.h:152
void setRestrictions(Boundary::BoundaryType restriction)
Configure the restrictions of the boundary nodes.
Definition Boundary.h:167
Boundary::planeBoundary planeZ0
boundary nodes at plane Z0
Definition Boundary.h:150
void setNodesPlaneZn(const vector< int > &nodes_id)
Configure the nodes lower than the plane Zn, including ghosts.
Definition Boundary.h:124
const planeBoundary * getPlaneY0() const
Return the nodes lower than the plane Y0, including ghosts.
Definition Boundary.h:84
void setNodesPlaneXn(const vector< int > &nodes_id)
Configure the nodes lower than the plane Xn, including ghosts.
Definition Boundary.h:116
const planeBoundary * getPlaneZn() const
Return the nodes lower than the plane Zn, including ghosts.
Definition Boundary.h:100
const planeBoundary * getPlaneX0() const
Return the nodes lower than the plane X0, including ghosts.
Definition Boundary.h:80
Boundary()
Default constructor.
Definition Boundary.h:159
const planeBoundary * getPlaneXn() const
Return the nodes lower than the plane Xn, including ghosts.
Definition Boundary.h:92
virtual ~Boundary()
Default destructor.
Definition Boundary.h:165
void setNodesPlaneZ0(const vector< int > &nodes_id)
Configure the nodes lower than the plane Z0, including ghosts.
Definition Boundary.h:112
Boundary::planeBoundary planeZn
boundary nodes at plane Zn
Definition Boundary.h:156
Boundary::planeBoundary planeY0
boundary nodes at plane Y0
Definition Boundary.h:148
const planeBoundary * getPlaneZ0() const
Return the nodes lower than the plane Z0, including ghosts.
Definition Boundary.h:88
BoundaryType
Determines the type of restrictions to be imposed to the mesh.
Definition Boundary.h:53
@ SLIDING
Definition Boundary.h:53
@ FIXED
Definition Boundary.h:53
@ FREE
Definition Boundary.h:53
@ EARTHQUAKE
Definition Boundary.h:53
void setNodesPlaneY0(const vector< int > &nodes_id)
Configure the nodes lower than the plane Y0, including ghosts.
Definition Boundary.h:108
Boundary::planeBoundary planeYn
boundary nodes at plane Yn
Definition Boundary.h:154
BoundaryPlane
Planes at the mesh boundary.
Definition Boundary.h:57
@ X0
Definition Boundary.h:57
@ Z0
Definition Boundary.h:57
@ Xn
Definition Boundary.h:57
@ Y0
Definition Boundary.h:57
@ Zn
Definition Boundary.h:57
@ Yn
Definition Boundary.h:57
Represents the nodes and the type of restrictions.
Definition Boundary.h:62
vector< int > nodes
nodes in plane
Definition Boundary.h:65
planeBoundary()
Definition Boundary.h:67
BoundaryType restrictionFluid
type of restrictions to be applied to the fluid phase
Definition Boundary.h:64
BoundaryType restriction
type of restrictions to be applied to the solid phase
Definition Boundary.h:63