![]() |
v0.16.3 |
#include "src/interfaces/CgalCrackGrowth.hpp"
Classes | |
| struct | Settings |
| struct | Step |
Public Types | |
| enum class | Kind { None , Join , Closure , Extension } |
| using | Pair = std::array< int, 2 > |
| using | Direction = std::function< MoFEMErrorCode(EntityHandle edge, const Range &crack, std::array< double, 3 > &direction)> |
| Extension direction of a front edge, given the crack faces. | |
Public Member Functions | |
| CgalCrackGrowth (MoFEM::Interface &m_field, EntityHandle crack_set, BitRefLevel source, BitRefLevel output, const Range &constraints, const Settings &settings) | |
| BitRefLevel | level () const |
| The level holding the current mesh. | |
| const Settings & | settings () const |
| MoFEMErrorCode | crackFaces (Range &crack) const |
| MoFEMErrorCode | frontEdges (const Range &crack, Range &front) const |
| Pair | edgeIds (EntityHandle edge) const |
| MoFEMErrorCode | opening (EntityHandle node, const Range &crack, const Range &front, double &value) const |
| MoFEMErrorCode | join (const Direction &direction, Step &step) |
| MoFEMErrorCode | extend (const std::vector< Pair > &edges, const Direction &direction, Step &step) |
| MoFEMErrorCode | advanceOrdered (const std::vector< Pair > &edges, const Direction &direction, Step &step) |
Private Member Functions | |
| MoFEMErrorCode | refreshLevel () const |
| MoFEMErrorCode | closeAndJoin (const std::vector< Pair > &edges, const Direction &direction, Step &step) |
| MoFEMErrorCode | forgetClosuresNear (const Range &faces) |
| MoFEMErrorCode | resolve (const Pair &pair, const Range &front, EntityHandle &edge) const |
| MoFEMErrorCode | resolveListed (const std::vector< Pair > &edges, std::size_t i, const Range &front, std::vector< char > &dropped, Step &step, EntityHandle &edge) |
| CGALInterface::CrackExtension & | crackExtension () const |
| std::vector< CGALTools::CrackExtensionSettings > | advancePhases () const |
| bool | widenTolerance (double &tolerance) const |
| MoFEMErrorCode | change (Kind operation, const Pair &pair, EntityHandle edge, const Range &crack, const Direction &direction, const CGALTools::CrackExtensionSettings &settings, bool &changed, Step &step) |
Private Attributes | |
| MoFEM::Interface & | mField |
| EntityHandle | crackSet |
| BitRefLevel | sourceBit |
| BitRefLevel | outputBit |
| Range | constraints |
| Settings | options |
| bool | levelChanged = true |
| Skin and vertex IDs of the current level, refreshed when it changes. | |
| Range | skinEdges |
| Range | skinVertices |
| std::unordered_map< int, EntityHandle > | vertexById |
| std::set< Pair > | failedClosures |
| std::set< Pair > | failedGapJoins |
| std::set< Pair > | failedJoins |
Crack growth by steps. A step joins the front to the existing crack, closes a gap whose closing face is missing, or extends one front edge. A closure or an extension publishes the mesh on the other bit level, fills notches, retires the old level and swaps the two levels. The caller chooses the extension direction of a front edge and the order in which front edges are tried. One rank. See doc/development/cgal_crack_extension_algorithm.md.
Definition at line 22 of file CgalCrackGrowth.hpp.
| using MoFEM::CgalCrackGrowth::Direction = std::function<MoFEMErrorCode( EntityHandle edge, const Range &crack, std::array<double, 3> &direction)> |
Extension direction of a front edge, given the crack faces.
Definition at line 27 of file CgalCrackGrowth.hpp.
| using MoFEM::CgalCrackGrowth::Pair = std::array<int, 2> |
A front edge by the sorted GLOBAL_IDs of its vertices; stable when levels are swapped and retired entities are deleted.
Definition at line 25 of file CgalCrackGrowth.hpp.
|
strong |
| Enumerator | |
|---|---|
| None | |
| Join | |
| Closure | |
| Extension | |
Definition at line 39 of file CgalCrackGrowth.hpp.
| MoFEM::CgalCrackGrowth::CgalCrackGrowth | ( | MoFEM::Interface & | m_field, |
| EntityHandle | crack_set, | ||
| BitRefLevel | source, | ||
| BitRefLevel | output, | ||
| const Range & | constraints, | ||
| const Settings & | settings | ||
| ) |
crack_set holds the crack faces on source; constraints are protected as in CGALInterface::CrackExtension::extendCrack.
Definition at line 14 of file CgalCrackGrowth.cpp.
| MoFEMErrorCode MoFEM::CgalCrackGrowth::advanceOrdered | ( | const std::vector< Pair > & | edges, |
| const Direction & | direction, | ||
| Step & | step | ||
| ) |
Global gap closure, then global joining, then flip-only advance, then vertex movement. Supplied edge priority is respected within each phase; each edge exhausts its allowed tolerance range before the next. Flips may recover both missing gap and joining faces.
Definition at line 373 of file CgalCrackGrowth.cpp.
|
private |
Settings of the advance phases: flips alone first, then, when moves are allowed, the move classes only.
Definition at line 448 of file CgalCrackGrowth.cpp.
|
private |
Close a gap at, or extend, one front edge; on success publish, fill, retire and swap levels, and describe it in step.
Definition at line 147 of file CgalCrackGrowth.cpp.
|
private |
Global gap-closure pass followed by joining, ordered by edges within each operation. Both passes can recover missing faces by flips.
Definition at line 280 of file CgalCrackGrowth.cpp.
|
inlineprivate |
Definition at line 131 of file CgalCrackGrowth.hpp.
| MoFEMErrorCode MoFEM::CgalCrackGrowth::crackFaces | ( | Range & | crack | ) | const |
Definition at line 51 of file CgalCrackGrowth.cpp.
| CgalCrackGrowth::Pair MoFEM::CgalCrackGrowth::edgeIds | ( | EntityHandle | edge | ) | const |
Definition at line 75 of file CgalCrackGrowth.cpp.
| MoFEMErrorCode MoFEM::CgalCrackGrowth::extend | ( | const std::vector< Pair > & | edges, |
| const Direction & | direction, | ||
| Step & | step | ||
| ) |
Try flip-only advances on the whole list over the allowed tolerance range, then allow vertex movement. Within a pass, preserve FIFO edge and tolerance order. This method omits the separate global gap/join passes.
Definition at line 412 of file CgalCrackGrowth.cpp.
|
private |
Forget failed closures within twice the ring limit of the nodes of faces: a closure search changes cells within the ring limit of its edge, so a change there may make it possible.
Definition at line 227 of file CgalCrackGrowth.cpp.
| MoFEMErrorCode MoFEM::CgalCrackGrowth::frontEdges | ( | const Range & | crack, |
| Range & | front | ||
| ) | const |
Crack edges with one crack face that are not on the body skin.
Definition at line 58 of file CgalCrackGrowth.cpp.
| MoFEMErrorCode MoFEM::CgalCrackGrowth::join | ( | const Direction & | direction, |
| Step & | step | ||
| ) |
Close a feasible gap anywhere on the front before joining anywhere. Sharpness orders edges within each phase. Missing faces are recovered by flips; neither phase moves vertices. None when joining is disabled or no gap or join is admissible.
Definition at line 253 of file CgalCrackGrowth.cpp.
|
inline |
| MoFEMErrorCode MoFEM::CgalCrackGrowth::opening | ( | EntityHandle | node, |
| const Range & | crack, | ||
| const Range & | front, | ||
| double & | value | ||
| ) | const |
Uncracked opening at a front node: 2 pi minus the sum of the angles of its crack faces. A node on the body skin, or without exactly two front edges, is neutral (pi).
Definition at line 88 of file CgalCrackGrowth.cpp.
|
private |
Definition at line 23 of file CgalCrackGrowth.cpp.
|
private |
The current front edge of pair, or zero.
Definition at line 128 of file CgalCrackGrowth.cpp.
|
private |
The current front edge of edges[i], or zero. An edge no longer on the front is marked in dropped and recorded in step.dropped once.
Definition at line 469 of file CgalCrackGrowth.cpp.
|
inline |
Definition at line 65 of file CgalCrackGrowth.hpp.
Double tolerance up to Settings::angleMaxDegrees; false when it is already there or relaxation is disabled.
Definition at line 461 of file CgalCrackGrowth.cpp.
|
private |
Definition at line 100 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 98 of file CgalCrackGrowth.hpp.
|
private |
Front edges whose gap closure failed. An entry is forgotten when a step changes the mesh or the crack near it, see forgetClosuresNear.
Definition at line 111 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 112 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 112 of file CgalCrackGrowth.hpp.
|
mutableprivate |
Skin and vertex IDs of the current level, refreshed when it changes.
Definition at line 104 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 97 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 101 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 99 of file CgalCrackGrowth.hpp.
|
mutableprivate |
Definition at line 105 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 105 of file CgalCrackGrowth.hpp.
|
private |
Definition at line 99 of file CgalCrackGrowth.hpp.
|
mutableprivate |
Definition at line 106 of file CgalCrackGrowth.hpp.