MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
BodySphere.h
Go to the documentation of this file.
1/*
2 * BodySphere.h
3 *
4 * Created on: 30 de ago de 2024
5 * Author: Fabricio Fernandez <fabricio.hmf@gmail.com>
6 */
7
8#ifndef BODYSPHERE_H_
9#define BODYSPHERE_H_
10
11#include <Body/Body.h>
12
20
21class BodySphere: public Body {
22
23public:
24
28
31 virtual ~BodySphere();
32
33 inline void setDiameter(double diameter) { this->diameter = diameter; }
34
35 inline void setCenter( Vector3d center) { this->center = center; }
36
39 inline virtual void setMaterialId(int material_id) { this->materialId=material_id; }
40
43 inline virtual int getMaterialId() const { return this->materialId; }
44
45 inline void setParticlesPerDirection(Vector3d ppd) { this->particlesPerDirection = ppd; }
46
47 virtual void create(Mesh& mesh, Material* material);
48
50 //virtual void create(Mesh& mesh, Material* material, const Vector3d& center, double diameter, const Vector3i& particlesInDirection);
51
52private:
53
54 Vector3d center;
55
57
58 double diameter;
59
61
62};
63
64#endif /* BODYSPHERE_H_ */
Is a type of Body representing a sphere in 3D.
Definition BodySphere.h:21
void setParticlesPerDirection(Vector3d ppd)
Definition BodySphere.h:45
Vector3d center
Create a sphere in space.
Definition BodySphere.h:54
void setDiameter(double diameter)
Definition BodySphere.h:33
Vector3d particlesPerDirection
particles per direction
Definition BodySphere.h:56
BodySphere()
Default constructor.
int materialId
material identification
Definition BodySphere.h:60
virtual ~BodySphere()
Default destructor.
virtual void setMaterialId(int material_id)
Configure the material id.
Definition BodySphere.h:39
virtual int getMaterialId() const
Return the material identification.
Definition BodySphere.h:43
double diameter
diameter of the sphere
Definition BodySphere.h:58
void setCenter(Vector3d center)
Definition BodySphere.h:35
virtual void create(Mesh &mesh, Material *material)
Create a body with particles and material.
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