NetDEM v1.0
Loading...
Searching...
No Matches
netdem::DomainSplittor Class Referenceabstract

An abstract base class for domain splitters used in discrete element method simulations. More...

#include <domain_splittor.hpp>

Inheritance diagram for netdem::DomainSplittor:
netdem::LevelSetSplittor netdem::TetMeshSplittor

Public Member Functions

 DomainSplittor ()
 Default constructor.
 
virtual void InitFromSTL (std::string const &stl_file, int num_ele_each)
 Initializes the domain splitter from an STL file.
 
virtual void InitFromSTL (STLModel const &stl_model, int num_ele_each)=0
 Initializes the domain splitter from an STL model.
 
virtual void GetPeriDigmNodes (VecXT< Vec3d > *const nodes, VecXT< double > *const node_vols)=0
 Gets the nodes and volumes of the discretized domain.
 
virtual void MakePorosity (double porosity)=0
 Modifies the domain by adding porosity.
 
virtual STLModel GetSTLModel ()=0
 Gets the STL model corresponding to the discretized domain.
 
virtual STLModel GetSTLModel (const VecXT< int > &indices)=0
 Gets the STL model corresponding to a subset of the discretized domain.
 
virtual ~DomainSplittor ()
 Virtual destructor.
 

Detailed Description

An abstract base class for domain splitters used in discrete element method simulations.

This class defines an interface for splitting a domain, represented by an STL model, into discrete elements that can be used in a DEM simulation. Classes derived from this class can implement specific algorithms for splitting domains according to different criteria.

Constructor & Destructor Documentation

◆ DomainSplittor()

netdem::DomainSplittor::DomainSplittor ( )
inline

Default constructor.

◆ ~DomainSplittor()

virtual netdem::DomainSplittor::~DomainSplittor ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ GetPeriDigmNodes()

virtual void netdem::DomainSplittor::GetPeriDigmNodes ( VecXT< Vec3d > *const nodes,
VecXT< double > *const node_vols )
pure virtual

Gets the nodes and volumes of the discretized domain.

This method populates the given arrays with the positions of the nodes and the volumes of the elements in the discretized domain.

Parameters
nodesA pointer to an array of Vec3d objects to fill with node positions.
node_volsA pointer to an array of doubles to fill with element volumes.

Implemented in netdem::LevelSetSplittor, and netdem::TetMeshSplittor.

◆ GetSTLModel() [1/2]

virtual STLModel netdem::DomainSplittor::GetSTLModel ( )
pure virtual

Gets the STL model corresponding to the discretized domain.

This method returns an STL model representing the discretized domain.

Returns
An STLModel object representing the discretized domain.

Implemented in netdem::LevelSetSplittor, and netdem::TetMeshSplittor.

◆ GetSTLModel() [2/2]

virtual STLModel netdem::DomainSplittor::GetSTLModel ( const VecXT< int > & indices)
pure virtual

Gets the STL model corresponding to a subset of the discretized domain.

This method returns an STL model representing a subset of the discretized domain defined by the given indices.

Parameters
indicesA VecXT<int> object containing the indices of the subset of elements to include in the STL model.
Returns
An STLModel object representing the subset of the discretized domain.

Implemented in netdem::LevelSetSplittor, and netdem::TetMeshSplittor.

◆ InitFromSTL() [1/2]

virtual void netdem::DomainSplittor::InitFromSTL ( std::string const & stl_file,
int num_ele_each )
inlinevirtual

Initializes the domain splitter from an STL file.

This method loads an STL file and initializes the domain splitter using the corresponding STL model.

Parameters
stl_fileThe path to the STL file to load.
num_ele_eachThe desired number of elements in each dimension of the split domain.

◆ InitFromSTL() [2/2]

virtual void netdem::DomainSplittor::InitFromSTL ( STLModel const & stl_model,
int num_ele_each )
pure virtual

Initializes the domain splitter from an STL model.

This method initializes the domain splitter using the given STL model.

Parameters
stl_modelThe STL model to use as the domain.
num_ele_eachThe desired number of elements in each dimension of the split domain.

Implemented in netdem::LevelSetSplittor, and netdem::TetMeshSplittor.

◆ MakePorosity()

virtual void netdem::DomainSplittor::MakePorosity ( double porosity)
pure virtual

Modifies the domain by adding porosity.

This method modifies the discretized domain by randomly removing elements from it, according to the given porosity value.

Parameters
porosityThe desired porosity of the modified domain.

Implemented in netdem::LevelSetSplittor, and netdem::TetMeshSplittor.


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