NetDEM v1.0
Loading...
Searching...
No Matches
peridigm_discretization.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <fstream>
6#include <sstream>
7#include <string>
8
9namespace netdem {
10
20public:
28
33
38
43
48
53
58
69 void InitFromSTL(std::string const &stl_file, int num_ele_each);
70
81 void InitFromSTL(STLModel const &stl_model, int num_ele_each);
82
92 void InitFromDistanceMap(std::string const &txt_file);
93
109 void InitFromGrid(double corner_x, double corner_y, double corner_z,
110 double len_x, double len_y, double len_z, int num_ele_each);
111
121 void MakePorosity(double porosity);
122
132 void WriteNodeFile(std::string const &result_dir);
133
142 double GetNodeSize();
143
148
149private:
156 void InitDefaultBlockIndices();
157};
158
159} // namespace netdem
An abstract base class for domain splitters used in discrete element method simulations.
Definition domain_splittor.hpp:17
A class representing the discretization of a peridynamic simulation.
Definition peridigm_discretization.hpp:19
Type
An enum representing the type of discretization used.
Definition peridigm_discretization.hpp:27
@ level_set
Definition peridigm_discretization.hpp:27
@ tetmesh
Definition peridigm_discretization.hpp:27
void WriteNodeFile(std::string const &result_dir)
Writes the node information to file.
Definition peridigm_discretization.cpp:120
void InitFromDistanceMap(std::string const &txt_file)
Initializes the discretization from a distance map.
Definition peridigm_discretization.cpp:43
void MakePorosity(double porosity)
Modifies the node volumes to achieve a specified porosity.
Definition peridigm_discretization.cpp:114
VecXT< Vec3d > nodes
The list of node positions in the discretization.
Definition peridigm_discretization.hpp:42
DomainSplittor * domain_splittor
A pointer to the domain splittor used in the discretization.
Definition peridigm_discretization.hpp:37
VecXT< double > node_vols
The list of volumes for each node in the discretization.
Definition peridigm_discretization.hpp:52
Type type
The type of discretization used.
Definition peridigm_discretization.hpp:32
void InitFromGrid(double corner_x, double corner_y, double corner_z, double len_x, double len_y, double len_z, int num_ele_each)
Initializes the discretization from a regular grid.
Definition peridigm_discretization.cpp:63
double GetNodeSize()
Gets the average size of the nodes in the discretization.
Definition peridigm_discretization.cpp:150
VecXT< int > node_block_indices
The list of block indices for each node in the discretization.
Definition peridigm_discretization.hpp:47
~PeriDigmDiscretization()
Destructor.
Definition peridigm_discretization.cpp:158
void InitFromSTL(std::string const &stl_file, int num_ele_each)
Initializes the discretization from an STL file.
PeriDigmDiscretization()
Default constructor.
Definition peridigm_discretization.cpp:11
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