NLMech  0.1.0
geometry::Fracture Class Reference

A class for fracture state of bonds. More...

#include <fracture.h>

Collaboration diagram for geometry::Fracture:
Collaboration graph

Public Member Functions

bool addCrack (const double &time, const std::vector< util::Point3 > *nodes, const std::vector< std::vector< size_t >> *neighbor_list)
 Sets fracture state according to the crack data. More...
 
 Fracture (inp::FractureDeck *deck)
 Constructor. More...
 
 Fracture (inp::FractureDeck *deck, const std::vector< util::Point3 > *nodes, const std::vector< std::vector< size_t >> *neighbor_list)
 Constructor. More...
 
std::vector< uint8_t > getBonds (const size_t &i) const
 Returns the list of bonds of node i. More...
 
bool getBondState (const size_t &i, const size_t &j) const
 Read bond state. More...
 
void print (int nt=0, int lvl=0) const
 Prints the information about the instance of the object. More...
 
std::string printStr (int nt=0, int lvl=0) const
 Returns the string containing information about the instance of the object. More...
 
void setBondState (const size_t &i, const size_t &j, const bool &state)
 Sets the bond state. More...
 

Private Member Functions

void computeFracturedBondFd (const size_t &i, inp::EdgeCrack *crack, const std::vector< util::Point3 > *nodes, const std::vector< size_t > *neighbors)
 Sets state of bond which intersect the pre-crack line as fractured. More...
 

Private Attributes

std::vector< std::vector< uint8_t > > d_fracture
 Vector which stores the state of bonds. More...
 
inp::FractureDeckd_fractureDeck_p
 Interior flags deck.
 

Detailed Description

A class for fracture state of bonds.

This class provides method to read and modify fracture state of bonds

Constructor & Destructor Documentation

◆ Fracture() [1/2]

geometry::Fracture::Fracture ( inp::FractureDeck deck,
const std::vector< util::Point3 > *  nodes,
const std::vector< std::vector< size_t >> *  neighbor_list 
)

Constructor.

Parameters
deckInput deck which contains user-specified information
nodesPointer to nodal coordinates
neighbor_listPointer to neighbor list

◆ Fracture() [2/2]

geometry::Fracture::Fracture ( inp::FractureDeck deck)
explicit

Constructor.

Parameters
deckInput deck which contains user-specified information

Member Function Documentation

◆ addCrack()

bool geometry::Fracture::addCrack ( const double &  time,
const std::vector< util::Point3 > *  nodes,
const std::vector< std::vector< size_t >> *  neighbor_list 
)

Sets fracture state according to the crack data.

Parameters
timeActual simulation time
nodesPointer to nodal coordinates
neighbor_listPointer to neighbor list
Returns
True if one of the crack is applied at given time
Here is the call graph for this function:

◆ computeFracturedBondFd()

void geometry::Fracture::computeFracturedBondFd ( const size_t &  i,
inp::EdgeCrack crack,
const std::vector< util::Point3 > *  nodes,
const std::vector< size_t > *  neighbors 
)
private

Sets state of bond which intersect the pre-crack line as fractured.

Parameters
iNodal id
crackPointer to the pre-crack
nodesPointer to nodal coordinates
neighborsPointer to neighbors of node i
Here is the call graph for this function:

◆ getBonds()

std::vector< uint8_t > geometry::Fracture::getBonds ( const size_t &  i) const

Returns the list of bonds of node i.

Parameters
iNodal id
Returns
list Bonds of node i

◆ getBondState()

bool geometry::Fracture::getBondState ( const size_t &  i,
const size_t &  j 
) const

Read bond state.

Parameters
iNodal id
jLocal id of bond in neighbor list of i
Returns
bool True if bond is fractured otherwise false

Referenced by test::testFracture().

Here is the caller graph for this function:

◆ print()

void geometry::Fracture::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the instance of the object.

Parameters
ntNumber of tabs to append before each line of string
lvlLevel of information sought (higher level means more information)
Here is the call graph for this function:

◆ printStr()

std::string geometry::Fracture::printStr ( int  nt = 0,
int  lvl = 0 
) const

Returns the string containing information about the instance of the object.

Parameters
ntNumber of tabs to append before each line of string
lvlLevel of information sought (higher level means more information)
Returns
string String containing information about this object

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBondState()

void geometry::Fracture::setBondState ( const size_t &  i,
const size_t &  j,
const bool &  state 
)

Sets the bond state.

Parameters
iNodal id
jLocal id of bond in neighbor list of i
stateState which is applied to the bond

Referenced by test::testFracture().

Here is the caller graph for this function:

Field Documentation

◆ d_fracture

std::vector<std::vector<uint8_t> > geometry::Fracture::d_fracture
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.

Referenced by Fracture().


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