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/*
2 * BodyParticle.h
3 *
4 * Created on: 10 de set. de 2022
5 * Author: Fabricio Fernández <fabricio.hmf@gmail.com>
6 */
7
8#ifndef INC_BODY_BODYPARTICLE_H_
9#define INC_BODY_BODYPARTICLE_H_
10
11#include <Body/Body.h>
12
20
21class BodyParticle: public Body {
22
23public:
24
28
32
35 inline virtual void setMaterialId(int material_id) { this->materialId = material_id; }
36
39 inline virtual int getMaterialId() const { return this->materialId; }
40
43 inline void setParticles(const vector<Particle*>& particle_list) { Body::insertParticles(particle_list); }
44
47 inline void insertParticles(const vector<Particle*>& particle_list) { Body::insertParticles(particle_list); }
48
51 inline vector<Particle*>* getParticles() { return Body::getParticles(); }
52
56 virtual void create(Mesh& mesh, Material* material);
57
58private:
59
61};
62
63#endif /* INC_BODY_BODYPARTICLE_H_ */
Is a Body created by a list of particles.
Definition BodyParticle.h:21
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:47
void setParticles(const vector< Particle * > &particle_list)
Configure the particles in the body.
Definition BodyParticle.h:43
virtual void setMaterialId(int material_id)
Configure the material id.
Definition BodyParticle.h:35
virtual int getMaterialId() const
Return the material identification.
Definition BodyParticle.h:39
vector< Particle * > * getParticles()
Return the particles forming the body.
Definition BodyParticle.h:51
int materialId
material identification
Definition BodyParticle.h:60
Represents a body in the space forming by a group of materials points and identified by a number.
Definition Body.h:19
vector< Particle * > * getParticles()
Return the particles forming the body.
Definition Body.h:54
void insertParticles(const vector< Particle * > &particle_list)
Add particles to the current particle list.
Definition Body.h:70
Represents a material.
Definition Material.h:18
Class representing a rectangular grid mesh.
Definition Mesh.h:29