|
flippy
a c++20 package for dynamically triangulated membrane simulations.
|
A data structure containing all geometric and topological information associated with a node. More...
#include <Nodes.hpp>

Public Member Functions | |
| auto | find_nns_loc_pointer (Index nn_id) |
| void | pop_nn (Index to_pop_nn_id) |
Find and deletes the element with the id to_pop_nn_id in the nn_id vector. | |
| void | emplace_nn_id (Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx) |
| vec3< Real > const & | get_distance_vector_to (Index nn_id) const |
| This function can provide the stored distance vector to the next neighbor. | |
| bool | operator== (Node const &other_node) const =default |
| Default equality operator. | |
Public Attributes | |
| Index | id |
| Global id of the Node, which is a number between 0 and max_number_of_nodes - 1. | |
| Real | area |
| Voronoi area associated with the node. | |
| Real | volume |
If the node is part of a closed surface triangulation, then the volume contains the volume of the tetrahedron connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in Gueguen et al. 2017. | |
| vec3< Real > | pos |
| Position of the node in the lab frame. | |
| vec3< Real > | curvature_vec |
| Curvature vector of the node. | |
| std::vector< Index > | nn_ids |
| A vector containing the global ids of the current node's next neighbors. | |
| std::vector< vec3< Real > > | nn_distances |
| Distance vectors pointing from the node to its next neighbors. | |
| std::vector< Index > | verlet_list |
| The Verlet list contains the ids of nodes that are close to this node. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Node const &node) |
| Streaming operator that can print formatted output to standard out with all Node data fields. | |
A data structure containing all geometric and topological information associated with a node.
This is a DUMB DATA STRUCTURE, meaning that it is not responsible for the coherence of the data it contains. For performance reasons, methods associated with Node struct will never check if the Node::curvature is the norm of the Node::curvature_vector or if the Node::nn_ids and Node::nn_distances are in the correct order. It is the responsibility of higher-order structures like Nodes and Triangulation to check that correct data is stored and updated correctly. However, it does check the data for consistency. It will match the length of Node::nn_ids and Node::nn_distances and pop and add both of them together.
| Real | type that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float. |
| 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. |
|
inline |
Given the global id of the next neighbor, this function can be used to locate it in the Node::nn_ids vector.
This function is just a convenient wrapper around the std::find function.
| nn_id | Global id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. |
nn_id is contained in Node::nn_ids then the pointer to the position of that id in the nn_ids vector will be returned. Otherwise nn_ids.end(). nn_id's that are not found in the Node::nn_ids vector. If the nn_id is not contained in Node::nn_ids then the nn_ids.end() iterator will be returned. It is up to the user to perform the necessary checks to avoid undefined behavior that might result from trying to delete uninitiated memory.
|
inline |
Find and deletes the element with the id to_pop_nn_id in the nn_id vector.
| to_pop_nn_id | Global id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. This id is supposed to be removed from the next neighbor id vector. |

|
inline |
This function can be used to add new next neighbors to this node.
This function constructs to_emplace_nn_id right before to_emplace_pos, i.e. if to_emplace_nn_id is 3, to_emplace_nn_id will be constructed right before the 3rd element and will become the new 3rd element.
| to_emplace_nn_id | Global id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. This id is supposed to be added to the Node::nn_ids vector of this node. |
| to_emplace_nn_pos | const reference to the 3 dimensional position vector (type vec3<Real>) containing the position of the new next neighbour. This input is used to calculate the correct distance between this node and the new next neighbor, which will then be added to the Node::nn_distances vector. |
| loc_idx | Local index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1. |
|
inline |
This function can provide the stored distance vector to the next neighbor.
| nn_id | Global id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. . |
nn_id can not be found in the Node::nn_ids vector, then the function writes an error message to standard error output and terminates the program with exit code 12.
|
default |
Default equality operator.
| other_node | constant reference to the other Node. |
|
friend |
Streaming operator that can print formatted output to standard out with all Node data fields.
| os | This is intended to be std::cout or any other std::ofstream reference. |
| node | The streamed node. |
| Real fp::Node::area |
Voronoi area associated with the node.
The Voronoi area is the sum of (mixed) Voronoi areas inside the triangles, incident to the node. Definition follows Gueguen et al. 2017.
\[ A_{i} = \sum_{j} A'_{ij}. \]
| Real fp::Node::volume |
If the node is part of a closed surface triangulation, then the volume contains the volume of the tetrahedron connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in Gueguen et al. 2017.
This means that the volume of an individual node does not have a proper physical interpretation. Only the sum of all node volumes, which is given by the triangulation is interpretable as a physical volume of an object. The definition follows Gueguen et al. 2017.
\[ V_{ij} = A_{ij} \vec{x}_{i}\cdot \frac{\vec{n}_{ij,j+1}}{\| \vec{n}_{ij,j+1} \|}. \]
See Figure tr1. D in Triangulation.
| vec3<Real> fp::Node::curvature_vec |
Curvature vector of the node.
The definition of the curvature vector follows Meyer et al. 2003.
\[ \vec{K}_i = \frac{1}{2A_i}\sum_{j(i)} \left( \cot\left(\alpha_{ij}^{j+1}\right) + \cot\left(\alpha_{ij}^{j-1}\right) \right)\vec{\ell}_{ij} \]
See Figure tr1. B in Triangulation.
| std::vector<Index> fp::Node::nn_ids |
A vector containing the global ids of the current node's next neighbors.
nn_ids contains the ids of nodes that are connected to this node in the triangulation. The next neighbors that are also mutual neighbors in the triangulation are stored sequentially in the vector. The last and the first elements are also neighbors, i.e., the nn_ids vector wraps around. During the calculation, this is facilitated through the use of fp::Neighbors.