MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Body Class Referenceabstract

Represents a body in the space forming by a group of materials points and identified by a number. More...

#include <Body.h>

Inheritance diagram for Body:
Collaboration diagram for Body:

Public Member Functions

 Body ()
 Default constructor.
 
virtual ~Body ()
 Default destructor.
 
virtual void create (Mesh &mesh, Material *material)=0
 Create a body with particles and material.
 
virtual void setMaterialId (int material_id)=0
 Configure the material id.
 
virtual int getMaterialId () const =0
 Return the material id.
 
int getId () const
 Return the body identification.
 
Vector3d getInitialVelocity () const
 Return the initial velocity of the body.
 
vector< Particle * > * getParticles ()
 Return the particles forming the body.
 
void setId (int body_id)
 Configure the id of the body.
 
void setInitialVelocity (Vector3d initial_velocity)
 Configure the initial velocity of the body.
 
void setParticles (const vector< Particle * > &particle_list)
 Configure the particles in the body.
 
void insertParticles (const vector< Particle * > &particle_list)
 Add particles to the current particle list.
 

Protected Attributes

int id
 body identification
 
Vector3d initial_velocity
 initial velocity of the body
 
vector< Particle * > particles
 material points forming the body

 

Detailed Description

Represents a body in the space forming by a group of materials points and identified by a number.

Constructor & Destructor Documentation

◆ Body()

Body::Body ( )
inline

Default constructor.

◆ ~Body()

Body::~Body ( )
inlinevirtual

Default destructor.

Member Function Documentation

◆ create()

virtual void Body::create ( Mesh & mesh,
Material * material )
pure virtual

Create a body with particles and material.

Parameters
[in]meshComputational Mesh reference
[in]materialMaterial

Implemented in BodyCuboid, BodyParticle, BodyPolygon, and BodySphere.

◆ getId()

int Body::getId ( ) const
inline

Return the body identification.

Returns
Body identification

◆ getInitialVelocity()

Vector3d Body::getInitialVelocity ( ) const
inline

Return the initial velocity of the body.

Returns
Initial body velocity

◆ getMaterialId()

virtual int Body::getMaterialId ( ) const
pure virtual

Return the material id.

Returns
Material identification

Implemented in BodyCuboid, BodyParticle, BodyPolygon, and BodySphere.

◆ getParticles()

vector< Particle * > * Body::getParticles ( )
inline

Return the particles forming the body.

Returns
A reference to a vector containing Particle pointers

◆ insertParticles()

void Body::insertParticles ( const vector< Particle * > & particle_list)
inline

Add particles to the current particle list.

Parameters
[in]particle_listA vector containing pointers to particles

◆ setId()

void Body::setId ( int body_id)
inline

Configure the id of the body.

Parameters
[in]body_idBody identification

◆ setInitialVelocity()

void Body::setInitialVelocity ( Vector3d initial_velocity)
inline

Configure the initial velocity of the body.

Parameters
[in]initial_velocityBody identification

◆ setMaterialId()

virtual void Body::setMaterialId ( int material_id)
pure virtual

Configure the material id.

Parameters
[in]material_idMaterial identification

Implemented in BodyCuboid, BodyParticle, BodyPolygon, and BodySphere.

◆ setParticles()

void Body::setParticles ( const vector< Particle * > & particle_list)
inline

Configure the particles in the body.

Parameters
[in]particle_listA vector containing pointers to the particle

Member Data Documentation

◆ id

int Body::id
protected

body identification

◆ initial_velocity

Vector3d Body::initial_velocity
protected

initial velocity of the body

◆ particles

vector<Particle*> Body::particles
protected

material points forming the body


The documentation for this class was generated from the following file: