|
flippy
a c++20 package for dynamically triangulated membrane simulations.
|
A helper struct; keeps track of bond flips. More...
#include <Triangulation.hpp>

Public Attributes | |
| bool | flipped = false |
| track if the bond was flipped. | |
| Index | common_nn_0 = VERY_LARGE_NUMBER_ |
| Global id of a node that is supposed to receive a bond after a flip. | |
| Index | common_nn_1 = VERY_LARGE_NUMBER_ |
| Global id of a node that is supposed to receive a bond after a flip. | |
A helper struct; keeps track of bond flips.
A bond flip can be unsuccessful, e.g., if the requested two nodes that are donating an edge already have too few edges (more details on bond flips and how they can fail are provided in the Triangulation.flip_bond(Index, Index, Real, Real) function). If the flip does happen, then flipped will be changed to true by the Triangulation.flip_bond(Index, Index, Real, Real) function and common_nn_0 and common_nn_1 will record the ids of nodes that receive new common bond. If the flip does not happen then the common_nn_0 and common_nn_1 data members will hold a VERY_LARGE_NUMBER_ with which they were initiated.
The initiation with VERY_LARGE_NUMBER_ is done to avoid common_nn_0 and common_nn_1 being zero initiated. This mechanism will lead to wrong behavior that is easier to identify during debugging in situations of un-careful usage. Example of such un-careful usage is if the end-user does not check that the bonds were not flipped and tries to un-flip bonds.
| Index | type that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int. |