PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
prenotch.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2026 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef FRACTURE_PRENOTCH_H
12#define FRACTURE_PRENOTCH_H
13
14#include "fracture.h"
15#include "util/point.h"
16
17#include <cstddef>
18#include <vector>
19
20namespace geometry {
21
48bool segmentCrossesVerticalLine(double x0, double y0, double x1, double y1,
49 double xLine, double yLo, double yHi);
50
69bool segmentEntersSlot(double x0, double y0, double x1, double y1,
70 double xCenter, double halfWidth, double yLo,
71 double yHi, int nSamples = 8);
72
93 Fracture &fracture, const std::vector<util::Point> &xRef,
94 const std::vector<std::vector<std::size_t>> &neighbors,
95 const std::vector<std::size_t> &nodeParticleId, std::size_t particleId,
96 const std::vector<double> &xLines, double yLo, double yHi);
97
117std::size_t breakBondsInSlots(
118 Fracture &fracture, const std::vector<util::Point> &xRef,
119 const std::vector<std::vector<std::size_t>> &neighbors,
120 const std::vector<std::size_t> &nodeParticleId, std::size_t particleId,
121 const std::vector<double> &xCenters, double width, double yLo, double yHi);
122
123} // namespace geometry
124
125#endif // FRACTURE_PRENOTCH_H
Collection of methods and data related to geometry.
Definition fracture.h:20
bool segmentCrossesVerticalLine(double x0, double y0, double x1, double y1, double xLine, double yLo, double yHi)
Pre-notch by breaking peridynamic bonds.
Definition prenotch.cpp:52
bool segmentEntersSlot(double x0, double y0, double x1, double y1, double xCenter, double halfWidth, double yLo, double yHi, int nSamples)
Checks whether the segment enters the open slot centred on xCenter.
Definition prenotch.cpp:63
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.
Definition prenotch.cpp:84
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.
Definition prenotch.cpp:99