NetDEM v1.0
Loading...
Searching...
No Matches
domain_splittor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "stl_model.hpp"
4#include "stl_reader.hpp"
5
6namespace netdem {
7
18public:
23
34 virtual void InitFromSTL(std::string const &stl_file, int num_ele_each) {
35 STLModel stl_model;
36 stl_model.InitFromSTL(stl_file);
37 InitFromSTL(stl_model, num_ele_each);
38 }
39
49 virtual void InitFromSTL(STLModel const &stl_model, int num_ele_each) = 0;
50
62 virtual void GetPeriDigmNodes(VecXT<Vec3d> *const nodes,
63 VecXT<double> *const node_vols) = 0;
64
73 virtual void MakePorosity(double porosity) = 0;
74
82 virtual STLModel GetSTLModel() = 0;
83
96 virtual STLModel GetSTLModel(const VecXT<int> &indices) = 0;
97
101 virtual ~DomainSplittor() {}
102};
103
104} // namespace netdem
An abstract base class for domain splitters used in discrete element method simulations.
Definition domain_splittor.hpp:17
virtual STLModel GetSTLModel()=0
Gets the STL model corresponding to the discretized domain.
virtual ~DomainSplittor()
Virtual destructor.
Definition domain_splittor.hpp:101
virtual void MakePorosity(double porosity)=0
Modifies the domain by adding porosity.
virtual STLModel GetSTLModel(const VecXT< int > &indices)=0
Gets the STL model corresponding to a subset of the discretized domain.
virtual void GetPeriDigmNodes(VecXT< Vec3d > *const nodes, VecXT< double > *const node_vols)=0
Gets the nodes and volumes of the discretized domain.
virtual void InitFromSTL(STLModel const &stl_model, int num_ele_each)=0
Initializes the domain splitter from an STL model.
DomainSplittor()
Default constructor.
Definition domain_splittor.hpp:22
virtual void InitFromSTL(std::string const &stl_file, int num_ele_each)
Initializes the domain splitter from an STL file.
Definition domain_splittor.hpp:34
Class for working with STL models.
Definition stl_model.hpp:17
void InitFromSTL(std::string const &file)
Initialize the model from an STL file.
Definition stl_model.cpp:25
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31