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// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef BODYCUBOID_H_
5#define BODYCUBOID_H_
6
7#include <Body/Body.h>
8
33class BodyCuboid: public Body {
34
35public:
36
39 BodyCuboid();
40
43 virtual ~BodyCuboid();
44
48 inline void setPoints(const Vector3d& point_1, const Vector3d& point_2) { this->pointP1=point_1; this->pointP2=point_2; }
49
52 inline virtual void setMaterialId(int material_id) { this->materialId=material_id; }
53
56 inline virtual int getMaterialId() const { return this->materialId; }
57
61 virtual void create(Mesh& mesh, Material* material);
62
63private:
64
65 Vector3d pointP1;
66
67 Vector3d pointP2;
68
70};
71
73
74 materialId=-1;
75}
76
78
79#endif /* BODYCUBOID_H_ */
A type of Body representing a cuboid in 3D.
Definition BodyCuboid.h:33
virtual void setMaterialId(int material_id)
Configure the material id.
Definition BodyCuboid.h:52
virtual void create(Mesh &mesh, Material *material)
Create a cuboid in space.
int materialId
material identification
Definition BodyCuboid.h:69
virtual int getMaterialId() const
Return the material identification.
Definition BodyCuboid.h:56
Vector3d pointP2
higher right point
Definition BodyCuboid.h:67
void setPoints(const Vector3d &point_1, const Vector3d &point_2)
Configure the geometrical points of the cuboid.
Definition BodyCuboid.h:48
virtual ~BodyCuboid()
Default constructor.
Definition BodyCuboid.h:77
Vector3d pointP1
lower left point
Definition BodyCuboid.h:65
BodyCuboid()
Default constructor.
Definition BodyCuboid.h:72
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