Represents a vertex in a deformed grid. More...
#include <Vertex.hpp>
Classes | |
class | Non_transferable_ptr |
A pointer class which is not transferred by Vertex::eat . More... | |
class | Transferable_ptr |
A pointer class which can be transferred by Vertex::eat . More... | |
Public Member Functions | |
Vertex (const Vertex &)=delete | |
if we have a reason to copy/move vertices, we can implement these | |
Vertex (Vertex &&)=delete | |
Vertex & | operator= (const Vertex &)=delete |
Vertex & | operator= (Vertex &&)=delete |
int | mass () |
the number of Transferable_ptr s pointing to this vertex | |
bool | is_mobile () |
whether relaxation will cause this vertex to move | |
bool | needs_smooth () |
any of Transferable_ptr::needs_smooth | |
void | eat (Vertex &other) |
Specify that another vertex represents the same grid point as *this . | |
double | shared_value (std::function< double(Mat<>)> reduction=vector_max) |
determine the shared shareable_value of all Transferable_ptr s to this by applying reduction . Thread safe. | |
auto | get_neighbors () const |
get neighbors as a std::range of const Vertex& | |
Static Public Member Functions | |
static double | vector_max (Mat<>) |
static double | vector_min (Mat<>) |
static void | connect (Vertex &, Vertex &) |
specify that two vertices are connected by an edge | |
static bool | are_neighbors (Vertex &, Vertex &) |
Public Attributes | |
Mat< 3 > | pos {0, 0, 0} |
position of the vertex in space | |
Mat< 3 > | temp_vector |
for an algorithm to keep some temporary vector data if it desires | |
std::vector< int > | record |
for algorithms to keep notes as they please | |
Lock | lock |
for any algorithms that could involve data races on vertices | |
Represents a vertex in a deformed grid.
Used by Deformed_element
s to manage data that is shared by nodal neighbors, including position and artificial viscosity coefficient.
Transferable_ptr
member class. void hexed::Vertex::eat | ( | Vertex & | other | ) |
Specify that another vertex represents the same grid point as *this
.
*this
will acquire other
's resources:
Transferable_ptr
s pointing to other
will be changed to point to this
.Non_transferable_ptr
s pointing to other
will be nullify
d.other
will be added to that of *this
.pos
s will be averaged, weighted by mass
.The fact that "eat" seemed like the obvious word to describe this might be a sign that I've been reading too much SnK...