![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Collection of methods and data related to geometry. More...
Data Structures | |
| class | Fracture |
| A class for fracture state of bonds. More... | |
Functions | |
| bool | segmentCrossesVerticalLine (double x0, double y0, double x1, double y1, double xLine, double yLo, double yHi) |
| Pre-notch by breaking peridynamic bonds. | |
| bool | segmentEntersSlot (double x0, double y0, double x1, double y1, double xCenter, double halfWidth, double yLo, double yHi, int nSamples=8) |
| Checks whether the segment enters the open slot centred on xCenter. | |
| std::size_t | breakBondsCrossingVerticalLines (Fracture &fracture, const std::vector< util::Point > &xRef, const std::vector< std::vector< std::size_t > > &neighbors, const std::vector< std::size_t > &nodeParticleId, std::size_t particleId, const std::vector< double > &xLines, double yLo, double yHi) |
| Break the bonds of one particle that cross vertical cut lines. | |
| std::size_t | breakBondsInSlots (Fracture &fracture, const std::vector< util::Point > &xRef, const std::vector< std::vector< std::size_t > > &neighbors, const std::vector< std::size_t > &nodeParticleId, std::size_t particleId, const std::vector< double > &xCenters, double width, double yLo, double yHi) |
| Break the bonds of one particle that enter open notch slots. | |
Collection of methods and data related to geometry.
| std::size_t geometry::breakBondsCrossingVerticalLines | ( | Fracture & | fracture, |
| const std::vector< util::Point > & | xRef, | ||
| const std::vector< std::vector< std::size_t > > & | neighbors, | ||
| const std::vector< std::size_t > & | nodeParticleId, | ||
| std::size_t | particleId, | ||
| const std::vector< double > & | xLines, | ||
| double | yLo, | ||
| double | yHi | ||
| ) |
Break the bonds of one particle that cross vertical cut lines.
This is the zero-width pre-notch: a cut along each line in xLines between yLo and yHi. A V-notch seeded on its midplane is the same geometric test and uses this function.
Only bonds with both ends in particle particleId are considered.
| fracture | Bond-state store to modify |
| xRef | Reference coordinates of all nodes |
| neighbors | Peridynamic neighbour list |
| nodeParticleId | Particle id of each node |
| particleId | Particle to cut |
| xLines | Positions of the cut lines |
| yLo | Lower end of the cuts |
| yHi | Upper end of the cuts |
Definition at line 84 of file prenotch.cpp.
References segmentCrossesVerticalLine().
Referenced by anonymous_namespace{main.cpp}::applyNotches(), and anonymous_namespace{main.cpp}::applyNotchMidplanes().
| std::size_t geometry::breakBondsInSlots | ( | Fracture & | fracture, |
| const std::vector< util::Point > & | xRef, | ||
| const std::vector< std::vector< std::size_t > > & | neighbors, | ||
| const std::vector< std::size_t > & | nodeParticleId, | ||
| std::size_t | particleId, | ||
| const std::vector< double > & | xCenters, | ||
| double | width, | ||
| double | yLo, | ||
| double | yHi | ||
| ) |
Break the bonds of one particle that enter open notch slots.
This is the finite-width pre-notch: each slot is width across, centred on an entry of xCenters, spanning yLo to yHi.
Only bonds with both ends in particle particleId are considered.
| fracture | Bond-state store to modify |
| xRef | Reference coordinates of all nodes |
| neighbors | Peridynamic neighbour list |
| nodeParticleId | Particle id of each node |
| particleId | Particle to cut |
| xCenters | Slot centrelines |
| width | Full slot width |
| yLo | Lower end of the slots |
| yHi | Upper end of the slots |
Definition at line 99 of file prenotch.cpp.
References segmentEntersSlot().
Referenced by anonymous_namespace{main.cpp}::applyNotchSlots().
| bool geometry::segmentCrossesVerticalLine | ( | double | x0, |
| double | y0, | ||
| double | x1, | ||
| double | y1, | ||
| double | xLine, | ||
| double | yLo, | ||
| double | yHi | ||
| ) |
Pre-notch by breaking peridynamic bonds.
Removing the notch from the mesh does not by itself open it. The horizon is wider than the notch in the cases here, so bonds still span the gap and carry force across it. These functions break those bonds, after the model is initialised and before the time loop starts.
They take the node data rather than a model object, so that src/ does not depend on the driver. Call them with data.d_xRef, data.d_neighPd, data.d_ptId and *data.d_fracture_p.
Checks whether the segment (x0,y0)-(x1,y1) crosses the vertical line x = xLine within [yLo, yHi]
| x0 | First endpoint x |
| y0 | First endpoint y |
| x1 | Second endpoint x |
| y1 | Second endpoint y |
| xLine | Position of the cut line |
| yLo | Lower end of the cut |
| yHi | Upper end of the cut |
Definition at line 52 of file prenotch.cpp.
Referenced by breakBondsCrossingVerticalLines(), main(), and segmentEntersSlot().
| bool geometry::segmentEntersSlot | ( | double | x0, |
| double | y0, | ||
| double | x1, | ||
| double | y1, | ||
| double | xCenter, | ||
| double | halfWidth, | ||
| double | yLo, | ||
| double | yHi, | ||
| int | nSamples = 8 |
||
| ) |
Checks whether the segment enters the open slot centred on xCenter.
The slot spans xCenter +/- halfWidth and yLo to yHi. The segment is sampled at nSamples interior points, so that a bond with an endpoint inside the slot is detected and not only one that crosses the slot entirely.
| x0 | First endpoint x |
| y0 | First endpoint y |
| x1 | Second endpoint x |
| y1 | Second endpoint y |
| xCenter | Slot centreline |
| halfWidth | Half of the slot width |
| yLo | Lower end of the slot |
| yHi | Upper end of the slot |
| nSamples | Number of interior samples along the segment |
Definition at line 63 of file prenotch.cpp.
References segmentCrossesVerticalLine().
Referenced by breakBondsInSlots().