MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
BodyParticle.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 INC_BODY_BODYPARTICLE_H_
5#define INC_BODY_BODYPARTICLE_H_
6
7#include <Body/Body.h>
8
16
17class BodyParticle: public Body {
18
19public:
20
24
28
31 inline virtual void setMaterialId(int material_id) { this->materialId = material_id; }
32
35 inline virtual int getMaterialId() const { return this->materialId; }
36
39 inline void setParticles(const vector<Particle*>& particle_list) { Body::insertParticles(particle_list); }
40
43 inline void insertParticles(const vector<Particle*>& particle_list) { Body::insertParticles(particle_list); }
44
47 inline vector<Particle*>* getParticles() { return Body::getParticles(); }
48
52 virtual void create(Mesh& mesh, Material* material);
53
54private:
55
57};
58
59#endif /* INC_BODY_BODYPARTICLE_H_ */
Is a Body created by a list of particles.
Definition BodyParticle.h:17
virtual void create(Mesh &mesh, Material *material)
Create a body in space using particles.
BodyParticle()
Default constructor.
~BodyParticle()
Default destruction.
void insertParticles(const vector< Particle * > &particle_list)
Add particles to the current particle list.
Definition BodyParticle.h:43
void setParticles(const vector< Particle * > &particle_list)
Configure the particles in the body.
Definition BodyParticle.h:39
virtual void setMaterialId(int material_id)
Configure the material id.
Definition BodyParticle.h:31
virtual int getMaterialId() const
Return the material identification.
Definition BodyParticle.h:35
vector< Particle * > * getParticles()
Return the particles forming the body.
Definition BodyParticle.h:47
int materialId
material identification
Definition BodyParticle.h:56
Represents a body in the space forming by a group of materials points and identified by a number.
Definition Body.h:15
vector< Particle * > * getParticles()
Return the particles forming the body.
Definition Body.h:50
void insertParticles(const vector< Particle * > &particle_list)
Add particles to the current particle list.
Definition Body.h:66
Represents a material.
Definition Material.h:14
Class representing a rectangular grid mesh.
Definition Mesh.h:26