Wildmeshing Toolkit
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
wmtk::history::BasicRecorder< N > Class Template Reference

Collects the edits of operations that may commit concurrently. More...

#include <History.hpp>

Public Member Functions

 BasicRecorder (History< N > start)
 
void append (Edit &&e)
 
void rebase (std::vector< Eigen::Vector3d > positions)
 
const History< N > & history () const
 Not synchronised: read it once the recording mesh is done.
 
History< N > & history ()
 

Private Attributes

std::mutex m_mutex
 
History< N > m_history
 
std::vector< Eigen::Vector3d > m_known
 
std::vector< uint8_t > m_known_valid
 

Detailed Description

template<int N>
class wmtk::history::BasicRecorder< N >

Collects the edits of operations that may commit concurrently.

A mesh appends while it still holds the locks of the operation it is committing, so two operations whose regions overlap append in the order they committed, and the order of the edits is a valid serial order of the run.

A mesh reports every vertex an operation wrote, which includes vertices it only read through non-const access. The recorder keeps the last position it saw for every vertex and drops the moves that leave a vertex where it was, and an edit that only moved vertices and moved none.

Member Function Documentation

◆ rebase()

template<int N>
void wmtk::history::BasicRecorder< N >::rebase ( std::vector< Eigen::Vector3d >  positions)

The ids were renumbered (a consolidation): positions holds every live vertex's position under its new id, and every other id is unknown.


The documentation for this class was generated from the following files: