MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
BodyPolygon.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef BODYPOLYGON_H_
5#define BODYPOLYGON_H_
6
7#include <Body/Body.h>
8
55class BodyPolygon: public Body {
56
57public:
58
62
65 virtual ~BodyPolygon();
66
69 inline void setPoints(vector<Vector3d> polygon_points) { this->polygonPoints=polygon_points; }
70
73 inline virtual void setMaterialId(int material_id) { this->materialId=material_id; }
74
77 inline virtual int getMaterialId() const { return this->materialId; }
78
82 virtual void create(Mesh& mesh, Material* material);
83
86 inline void setExtrudeDirection(string extrude_direction) { this->extrudeDirection=extrude_direction; }
87
90 inline void setExtrudeDisplacement(double extrude_displacement) { this->extrudeDisplacement=extrude_displacement; }
91
94 inline void setDiscretizationLength(double distretization_length) { this->distretizationLength=distretization_length; }
95
96private:
97
99
100 vector<Vector3d> polygonPoints;
101
103
105
107};
108
109#endif /* BODYPOLYGON_H_ */
Is a type of Body created by the extrusion of a 2D polygon.
Definition BodyPolygon.h:55
BodyPolygon()
Default constructor.
double distretizationLength
length of the local mesh used to create the body
Definition BodyPolygon.h:106
virtual void setMaterialId(int material_id)
Configure the material id.
Definition BodyPolygon.h:73
virtual int getMaterialId() const
Return the material identification.
Definition BodyPolygon.h:77
double extrudeDisplacement
extrude displacement
Definition BodyPolygon.h:104
void setExtrudeDirection(string extrude_direction)
Configures the extrude direction.
Definition BodyPolygon.h:86
void setExtrudeDisplacement(double extrude_displacement)
Configures the extrude displacement.
Definition BodyPolygon.h:90
virtual ~BodyPolygon()
Default destruction.
string extrudeDirection
extrude direction
Definition BodyPolygon.h:102
void setDiscretizationLength(double distretization_length)
Configures the discretization parameter.
Definition BodyPolygon.h:94
int materialId
material identification
Definition BodyPolygon.h:98
void setPoints(vector< Vector3d > polygon_points)
Configure the geometrical points of the polygon.
Definition BodyPolygon.h:69
vector< Vector3d > polygonPoints
geometrical definition of the polygon
Definition BodyPolygon.h:100
virtual void create(Mesh &mesh, Material *material)
Create a body in space using a polygon in 2D.
Represents a body in the space forming by a group of materials points and identified by a number.
Definition Body.h:15
Represents a material.
Definition Material.h:14
Class representing a rectangular grid mesh.
Definition Mesh.h:26