PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A class for fracture state of bonds. More...
#include <fracture.h>
Public Member Functions | |
Fracture (const std::vector< util::Point > *nodes, const std::vector< std::vector< std::size_t > > *neighbor_list=nullptr) | |
Constructor. | |
Fracture () | |
Constructor. | |
void | setBondState (const std::size_t &i, const std::size_t &j, const bool &state) |
Sets the bond state. | |
bool | getBondState (const std::size_t &i, const std::size_t &j) const |
Read bond state. | |
const std::vector< uint8_t > & | getBonds (const std::size_t &i) const |
Returns the list of bonds of node i. | |
std::vector< uint8_t > & | getBonds (const std::size_t &i) |
Returns the list of bonds of node i. | |
std::string | printStr (int nt=0, int lvl=0) const |
Returns the string containing printable information about the object. | |
void | print (int nt=0, int lvl=0) const |
Prints the information about the object. | |
Private Attributes | |
std::vector< std::vector< uint8_t > > | d_fracture |
Vector which stores the state of bonds. | |
A class for fracture state of bonds.
This class provides method to read and modify fracture state of bonds
Definition at line 26 of file fracture.h.
geometry::Fracture::Fracture | ( | const std::vector< util::Point > * | nodes, |
const std::vector< std::vector< std::size_t > > * | neighbor_list = nullptr |
||
) |
Constructor.
If neighbor list is null, then it assumes all nodes interact with all other nodes (PeriDEM implementation).
nodes | Pointer to nodal coordinates |
neighbor_list | Pointer to neighbor list |
Definition at line 20 of file fracture.cpp.
References util::parallel::getNThreads().
geometry::Fracture::Fracture | ( | ) |
std::vector< uint8_t > & geometry::Fracture::getBonds | ( | const std::size_t & | i | ) |
Returns the list of bonds of node i.
i | Nodal id |
Definition at line 74 of file fracture.cpp.
const std::vector< uint8_t > & geometry::Fracture::getBonds | ( | const std::size_t & | i | ) | const |
Returns the list of bonds of node i.
i | Nodal id |
Definition at line 70 of file fracture.cpp.
bool geometry::Fracture::getBondState | ( | const std::size_t & | i, |
const std::size_t & | j | ||
) | const |
Read bond state.
i | Nodal id |
j | Local id of bond in neighbor list of i |
Definition at line 64 of file fracture.cpp.
Referenced by anonymous_namespace{materialUtil.cpp}::computeHydrostaticStrainI(), anonymous_namespace{materialUtil.cpp}::computeStateThetaxI(), and anonymous_namespace{materialUtil.cpp}::updateBondFractureDataI().
|
inline |
Prints the information about the object.
nt | Number of tabs to append before printing |
lvl | Information level (higher means more information) |
Definition at line 90 of file fracture.h.
References printStr().
std::string geometry::Fracture::printStr | ( | int | nt = 0 , |
int | lvl = 0 |
||
) | const |
Returns the string containing printable information about the object.
nt | Number of tabs to append before printing |
lvl | Information level (higher means more information) |
Definition at line 78 of file fracture.cpp.
References util::io::getTabS().
Referenced by print().
void geometry::Fracture::setBondState | ( | const std::size_t & | i, |
const std::size_t & | j, | ||
const bool & | state | ||
) |
Sets the bond state.
i | Nodal id |
j | Local id of bond in neighbor list of i |
state | State which is applied to the bond |
Definition at line 51 of file fracture.cpp.
Referenced by anonymous_namespace{materialUtil.cpp}::updateBondFractureDataI().
|
private |
Vector which stores the state of bonds.
Given node i, vector d_fracture[i] is the list of state of bonds of node i.
We only use 1 bit per bond of node to store the state.
Definition at line 101 of file fracture.h.