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

Is a type of Body representing a body defined by a Gmsh mesh file each physical group in the Gmsh mesh file is a different body with its own material. More...

#include <BodyGmsh.h>

Inheritance diagram for BodyGmsh:
Collaboration diagram for BodyGmsh:

Public Member Functions

 BodyGmsh (const std::string &mesh_file="", std::map< std::string, int > physical_to_material={}, const std::string &particle_distribution="barycentric")
 Default constructor.
 
virtual ~BodyGmsh ()
 Default destructor.
 
virtual void create (Mesh &mesh, Material *material) override
 Seeds particles in the body defined by a Gmsh mesh file.
 
virtual void setMaterialId (int material_id)
 Configure the material id.
 
virtual int getMaterialId () const
 Return the material identification.
 
- 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.
 

Static Public Member Functions

static void resetSharedMesh ()
 Reset the shared Gmsh mesh to force reloading from file.
 

Private Attributes

string meshFile
 Gmsh mesh file name.
 
std::map< std::string, int > physicalToMaterial
 map from physical group name to material id
 
string particleDistribution
 particle distribution in mesh elements
 
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 body defined by a Gmsh mesh file each physical group in the Gmsh mesh file is a different body with its own material.

Constructor & Destructor Documentation

◆ BodyGmsh()

BodyGmsh::BodyGmsh ( const std::string &  mesh_file = "",
std::map< std::string, int >  physical_to_material = {},
const std::string &  particle_distribution = "barycentric" 
)

Default constructor.

◆ ~BodyGmsh()

virtual BodyGmsh::~BodyGmsh ( )
virtual

Default destructor.

Member Function Documentation

◆ create()

virtual void BodyGmsh::create ( Mesh mesh,
Material material 
)
overridevirtual

Seeds particles in the body defined by a Gmsh mesh file.

Parameters
[in]meshComputational Mesh reference
[in]materialMaterial

Implements Body.

◆ getMaterialId()

virtual int BodyGmsh::getMaterialId ( ) const
inlinevirtual

Return the material identification.

Returns
Material identification

Implements Body.

◆ resetSharedMesh()

static void BodyGmsh::resetSharedMesh ( )
static

Reset the shared Gmsh mesh to force reloading from file.

◆ setMaterialId()

virtual void BodyGmsh::setMaterialId ( int  material_id)
inlinevirtual

Configure the material id.

Parameters
[in]material_idMaterial identification

Implements Body.

Member Data Documentation

◆ materialId

int BodyGmsh::materialId
private

material identification

◆ meshFile

string BodyGmsh::meshFile
private

Gmsh mesh file name.

◆ particleDistribution

string BodyGmsh::particleDistribution
private

particle distribution in mesh elements

◆ physicalToMaterial

std::map<std::string,int> BodyGmsh::physicalToMaterial
private

map from physical group name to material id


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