MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
BodyCuboid.h
Go to the documentation of this file.
1/*
2 * BodyCuboid.h
3 *
4 * Created on: 17 de mai de 2021
5 * Author: Fabricio Fernandez <fabricio.hmf@gmail.com>
6 */
7
8#ifndef BODYCUBOID_H_
9#define BODYCUBOID_H_
10
11#include <Body/Body.h>
12
35class BodyCuboid: public Body {
36
37public:
38
41 BodyCuboid();
42
45 virtual ~BodyCuboid();
46
50 inline void setPoints(const Vector3d& point_1, const Vector3d& point_2) { this->pointP1=point_1; this->pointP2=point_2; }
51
54 inline virtual void setMaterialId(int material_id) { this->materialId=material_id; }
55
58 inline virtual int getMaterialId() const { return this->materialId; }
59
63 virtual void create(Mesh& mesh, Material* material);
64
65private:
66
67 Vector3d pointP1;
68
69 Vector3d pointP2;
70
72};
73
75
76 materialId=-1;
77}
78
80
81#endif /* BODYCUBOID_H_ */
Is a type of Body representing a cuboid in 3D.
Definition BodyCuboid.h:35
virtual void setMaterialId(int material_id)
Configure the material id.
Definition BodyCuboid.h:54
virtual void create(Mesh &mesh, Material *material)
Create a cuboid in space.
int materialId
material identification
Definition BodyCuboid.h:71
virtual int getMaterialId() const
Return the material identification.
Definition BodyCuboid.h:58
Vector3d pointP2
higher right point
Definition BodyCuboid.h:69
void setPoints(const Vector3d &point_1, const Vector3d &point_2)
Configure the geometrical points of the cuboid.
Definition BodyCuboid.h:50
virtual ~BodyCuboid()
Default constructor.
Definition BodyCuboid.h:79
Vector3d pointP1
lower left point
Definition BodyCuboid.h:67
BodyCuboid()
Default constructor.
Definition BodyCuboid.h:74
Represents a body in the space forming by a group of materials points and identified by a number.
Definition Body.h:19
Represents a material.
Definition Material.h:18
Class representing a rectangular grid mesh.
Definition Mesh.h:29