NetDEM v1.0
Loading...
Searching...
No Matches
level_set_splittor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "domain_splittor.hpp"
5#include <iostream>
6#include <string>
7
8namespace netdem {
9
20public:
25
36 void InitFromSTL(STLModel const &stl_model, int num_ele_each) override;
37
46 void InitFromDistanceMap(std::string const &file_name);
47
70 void InitFromDistanceMap(double corner_x, double corner_y, double corner_z,
71 double sp, int dim_x, int dim_y, int dim_z,
72 const VecXT<double> &dist_list);
73
85 void GetPeriDigmNodes(VecXT<Vec3d> *const nodes,
86 VecXT<double> *const node_vols) override;
87
96 void MakePorosity(double porosity) override;
97
105 STLModel GetSTLModel() override;
106
119 STLModel GetSTLModel(const VecXT<int> &node_indices) override;
120
121private:
125 VecXT<Vec3i> node_grid_indices;
126};
127
128} // namespace netdem
An abstract base class for domain splitters used in discrete element method simulations.
Definition domain_splittor.hpp:17
Class for representing a level set function on a regular grid.
Definition level_set_function.hpp:17
A domain splitter that uses a level set function to define the domain.
Definition level_set_splittor.hpp:19
STLModel GetSTLModel() override
Gets the STL model corresponding to the discretized domain.
Definition level_set_splittor.cpp:197
LevelSetSplittor()
Default constructor.
Definition level_set_splittor.cpp:11
void GetPeriDigmNodes(VecXT< Vec3d > *const nodes, VecXT< double > *const node_vols) override
Gets the nodes and volumes of the discretized domain.
Definition level_set_splittor.cpp:160
void MakePorosity(double porosity) override
Modifies the domain by adding porosity.
Definition level_set_splittor.cpp:175
void InitFromSTL(STLModel const &stl_model, int num_ele_each) override
Initializes the domain splitter from an STL model.
Definition level_set_splittor.cpp:13
void InitFromDistanceMap(std::string const &file_name)
Initializes the domain splitter from a distance map file.
Definition level_set_splittor.cpp:61
Class for working with STL models.
Definition stl_model.hpp:17
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31