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

Is a type of Body representing a sphere in 3D. More...

#include <BodySphere.h>

Inheritance diagram for BodySphere:
Collaboration diagram for BodySphere:

Public Member Functions

 BodySphere ()
 Default constructor.
virtual ~BodySphere ()
 Default destructor.
void setDiameter (double diameter)
void setCenter (Vector3d center)
virtual void setMaterialId (int material_id)
 Configure the material id.
virtual int getMaterialId () const
 Return the material identification.
void setParticlesPerDirection (Vector3d ppd)
virtual void create (Mesh &mesh, Material *material)
 Create a body with particles and material.
Public Member Functions inherited from Body
 Body ()
 Default constructor.
virtual ~Body ()
 Default destructor.
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.

Private Attributes

Vector3d center
 Create a sphere in space.
Vector3d particlesPerDirection
 particles per direction
double diameter
 diameter of the sphere
int materialId
 material identification

Additional Inherited Members

Protected Attributes inherited from Body
int id
 body identification
Vector3d initial_velocity
 initial velocity of the body
vector< Particle * > particles
 material points forming the body

Detailed Description

Is a type of Body representing a sphere in 3D.

Sphere definition

The sphere is geometrically defined by its center and diameter.

Constructor & Destructor Documentation

◆ BodySphere()

BodySphere::BodySphere ( )

Default constructor.

◆ ~BodySphere()

virtual BodySphere::~BodySphere ( )
virtual

Default destructor.

Member Function Documentation

◆ create()

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

Create a body with particles and material.

Parameters
[in]meshComputational Mesh reference
[in]materialMaterial

Implements Body.

◆ getMaterialId()

virtual int BodySphere::getMaterialId ( ) const
inlinevirtual

Return the material identification.

Returns
Material identification

Implements Body.

◆ setCenter()

void BodySphere::setCenter ( Vector3d center)
inline

◆ setDiameter()

void BodySphere::setDiameter ( double diameter)
inline

◆ setMaterialId()

virtual void BodySphere::setMaterialId ( int material_id)
inlinevirtual

Configure the material id.

Parameters
[in]material_idMaterial identification

Implements Body.

◆ setParticlesPerDirection()

void BodySphere::setParticlesPerDirection ( Vector3d ppd)
inline

Member Data Documentation

◆ center

Vector3d BodySphere::center
private

Create a sphere in space.

center of the sphere

◆ diameter

double BodySphere::diameter
private

diameter of the sphere

◆ materialId

int BodySphere::materialId
private

material identification

◆ particlesPerDirection

Vector3d BodySphere::particlesPerDirection
private

particles per direction


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