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

A class representing a domain splitter for tetrahedral meshes. More...

#include <tetmesh_splittor.hpp>

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

Public Member Functions

 TetMeshSplittor ()
 Constructs a new TetMeshSplittor object.
 
void InitFromSTL (STLModel const &stl_model, int num_ele_each) override
 Initializes the splitter from an STL model and a requested number of elements per tetrahedron.
 
void GetPeriDigmNodes (VecXT< Vec3d > *const nodes, VecXT< double > *const node_vols) override
 Gets the nodes and node volumes for the Peridigm simulation.
 
void MakePorosity (double porosity) override
 Makes the mesh porous by removing a specified fraction of the tetrahedra.
 
STLModel GetSTLModel () override
 Gets the STL model for the splitter.
 
STLModel GetSTLModel (const VecXT< int > &tet_indices) override
 Gets a subset of the STL model corresponding to a set of tetrahedral indices.
 
- Public Member Functions inherited from netdem::DomainSplittor
 DomainSplittor ()
 Default constructor.
 
virtual void InitFromSTL (std::string const &stl_file, int num_ele_each)
 Initializes the domain splitter from an STL file.
 
virtual ~DomainSplittor ()
 Virtual destructor.
 

Public Attributes

TetMesh tetmesh
 The tetrahedral mesh used by the splitter.
 

Detailed Description

A class representing a domain splitter for tetrahedral meshes.

The TetMeshSplittor class represents a domain splitter for tetrahedral meshes. It derives from the DomainSplittor abstract base class and provides implementation for the methods required by that class.

Constructor & Destructor Documentation

◆ TetMeshSplittor()

netdem::TetMeshSplittor::TetMeshSplittor ( )

Constructs a new TetMeshSplittor object.

Member Function Documentation

◆ GetPeriDigmNodes()

void netdem::TetMeshSplittor::GetPeriDigmNodes ( VecXT< Vec3d > *const nodes,
VecXT< double > *const node_vols )
overridevirtual

Gets the nodes and node volumes for the Peridigm simulation.

This method gets the nodes and node volumes for the Peridigm simulation from the tetrahedral mesh, storing them in the provided vectors.

Parameters
nodesThe vector to store the nodes in.
node_volsThe vector to store the node volumes in.

Implements netdem::DomainSplittor.

◆ GetSTLModel() [1/2]

STLModel netdem::TetMeshSplittor::GetSTLModel ( )
overridevirtual

Gets the STL model for the splitter.

This method gets the original STL model used to initialize the splitter.

Returns
The STL model used to initialize the splitter.

Implements netdem::DomainSplittor.

◆ GetSTLModel() [2/2]

STLModel netdem::TetMeshSplittor::GetSTLModel ( const VecXT< int > & tet_indices)
overridevirtual

Gets a subset of the STL model corresponding to a set of tetrahedral indices.

This method gets a subset of the original STL model used to initialize the splitter, corresponding to a set of tetrahedral indices.

Parameters
tet_indicesThe set of tetrahedral indices to get the corresponding STL subset for.
Returns
The subset of the STL model corresponding to the provided tetrahedral indices.

Implements netdem::DomainSplittor.

◆ InitFromSTL()

void netdem::TetMeshSplittor::InitFromSTL ( STLModel const & stl_model,
int num_ele_each )
overridevirtual

Initializes the splitter from an STL model and a requested number of elements per tetrahedron.

This method initializes the splitter from an STL model and a requested number of elements per tetrahedron, breaking down the mesh into smaller elements as necessary.

Parameters
stl_modelThe STL model to use for initialization.
num_ele_eachThe requested number of elements to use per tetrahedron.

Implements netdem::DomainSplittor.

◆ MakePorosity()

void netdem::TetMeshSplittor::MakePorosity ( double porosity)
overridevirtual

Makes the mesh porous by removing a specified fraction of the tetrahedra.

This method makes the mesh porous by randomly removing a specified fraction of the tetrahedra from the mesh.

Parameters
porosityThe desired porosity fraction.

Implements netdem::DomainSplittor.

Member Data Documentation

◆ tetmesh

TetMesh netdem::TetMeshSplittor::tetmesh

The tetrahedral mesh used by the splitter.


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