NetDEM v1.0
Loading...
Searching...
No Matches
netdem::WallGroup Class Reference

A class used to group walls in a DEM simulation. More...

#include <wall_group.hpp>

Inheritance diagram for netdem::WallGroup:
netdem::Modifier netdem::WallMotionControl netdem::WallMotionIntegrator netdem::WallServoControl

Public Member Functions

 WallGroup ()
 Default constructor for WallGroup class.
 
VecXT< Wall * > const & GetWalls ()
 Get the walls.
 
void AddWall (int id)
 Adds a wall to the group.
 
void RemoveWall (int id)
 Removes a wall from the group.
 
void AddWall (const VecXT< int > &ids)
 Adds multiple walls to the group.
 
void RemoveWall (const VecXT< int > &ids)
 Removes multiple walls from the group.
 
void AddWall (const std::initializer_list< int > &ids)
 Adds multiple walls to the group.
 
void RemoveWall (const std::initializer_list< int > &ids)
 Removes multiple walls from the group.
 
void SetWall (int id)
 Sets the walls based on a wall ID.
 
void SetWall (const VecXT< int > &id_list)
 Sets the walls based on a variable number of wall IDs.
 
void SetWall (const std::initializer_list< int > &id_list)
 Sets the walls based on a variable number of wall IDs.
 
void Clear ()
 Clears all walls from the group.
 
ModifierClone () const override
 Clones the current WallGroup instance.
 
void Execute () override
 Executes the WallGroup instance.
 
void Update () override
 Updates the WallGroup instance.
 
- Public Member Functions inherited from netdem::Modifier
 Modifier ()
 Default constructor for Modifier class.
 
virtual void Init (Simulation *sim)
 Initializes the Modifier instance.
 
virtual void Enable ()
 Enables the Modifier instance.
 
virtual void Disable ()
 Disables the Modifier instance.
 
virtual ~Modifier ()
 Destructor for Modifier class.
 

Protected Attributes

std::unordered_set< int > wall_id_list
 The list of wall ids.
 
VecXT< Wall * > wall_list
 The list of wall.
 

Additional Inherited Members

- Public Attributes inherited from netdem::Modifier
std::string label {"default"}
 
DEMSolver::CyclePoint cycle_point {DEMSolver::CyclePoint::pre}
 
Simulationsim {nullptr}
 
Scenescene {nullptr}
 
bool update_with_scene {false}
 
bool enable_logging {true}
 

Detailed Description

A class used to group walls in a DEM simulation.

The WallGroup class is used to group walls together for various operations, such as setting their velocity or spin properties.

Constructor & Destructor Documentation

◆ WallGroup()

netdem::WallGroup::WallGroup ( )

Default constructor for WallGroup class.

Member Function Documentation

◆ AddWall() [1/3]

void netdem::WallGroup::AddWall ( const std::initializer_list< int > & ids)

Adds multiple walls to the group.

Parameters
idsA vector of wall IDs to add.

◆ AddWall() [2/3]

void netdem::WallGroup::AddWall ( const VecXT< int > & ids)

Adds multiple walls to the group.

Parameters
idsA vector of wall IDs to add.

◆ AddWall() [3/3]

void netdem::WallGroup::AddWall ( int id)

Adds a wall to the group.

Parameters
idThe ID of the wall to add.

◆ Clear()

void netdem::WallGroup::Clear ( )

Clears all walls from the group.

◆ Clone()

Modifier * netdem::WallGroup::Clone ( ) const
overridevirtual

Clones the current WallGroup instance.

Returns
A pointer to the cloned WallGroup instance.

Reimplemented from netdem::Modifier.

Reimplemented in netdem::WallMotionControl, netdem::WallMotionIntegrator, and netdem::WallServoControl.

◆ Execute()

void netdem::WallGroup::Execute ( )
overridevirtual

Executes the WallGroup instance.

Reimplemented from netdem::Modifier.

Reimplemented in netdem::WallMotionControl, netdem::WallMotionIntegrator, and netdem::WallServoControl.

◆ GetWalls()

VecXT< Wall * > const & netdem::WallGroup::GetWalls ( )

Get the walls.

◆ RemoveWall() [1/3]

void netdem::WallGroup::RemoveWall ( const std::initializer_list< int > & ids)

Removes multiple walls from the group.

Parameters
idsA vector of wall IDs to remove.

◆ RemoveWall() [2/3]

void netdem::WallGroup::RemoveWall ( const VecXT< int > & ids)

Removes multiple walls from the group.

Parameters
idsA vector of wall IDs to remove.

◆ RemoveWall() [3/3]

void netdem::WallGroup::RemoveWall ( int id)

Removes a wall from the group.

Parameters
idThe ID of the wall to remove.

◆ SetWall() [1/3]

void netdem::WallGroup::SetWall ( const std::initializer_list< int > & id_list)

Sets the walls based on a variable number of wall IDs.

◆ SetWall() [2/3]

void netdem::WallGroup::SetWall ( const VecXT< int > & id_list)

Sets the walls based on a variable number of wall IDs.

◆ SetWall() [3/3]

◆ Update()

void netdem::WallGroup::Update ( )
overridevirtual

Updates the WallGroup instance.

Updates the wall_list based on the current wall_id_list.

Reimplemented from netdem::Modifier.

Reimplemented in netdem::WallServoControl.

Member Data Documentation

◆ wall_id_list

std::unordered_set<int> netdem::WallGroup::wall_id_list
protected

The list of wall ids.

◆ wall_list

VecXT<Wall *> netdem::WallGroup::wall_list
protected

The list of wall.


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