DSC
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DSC::VelocityFunc Class Reference

#include <velocity_function.h>

Public Member Functions

 VelocityFunc (double velocity, double accuracy, int max_time_steps)
 
virtual std::string get_name () const
 
int get_time_step () const
 
virtual void set_max_time_steps (int max_time_steps)
 
double get_velocity () const
 
virtual void set_velocity (double vel)
 
double get_accuracy () const
 
virtual void set_accuracy (double acc)
 
double get_deform_time () const
 
double get_compute_time () const
 
double get_total_deform_time () const
 
double get_total_compute_time () const
 
virtual bool is_motion_finished (DeformableSimplicialComplex &dsc)
 
void take_time_step (DeformableSimplicialComplex &dsc)
 
virtual void test (DeformableSimplicialComplex &dsc)
 

Protected Member Functions

void update_compute_time (const std::chrono::time_point< std::chrono::system_clock > &start_time)
 
void update_deform_time (const std::chrono::time_point< std::chrono::system_clock > &start_time)
 
virtual void deform (DeformableSimplicialComplex &dsc)
 

Protected Attributes

int time_step = 0
 
int MAX_TIME_STEPS
 
int deform_time_steps = 10
 
double VELOCITY
 
double ACCURACY
 
std::vector< vec3pos_old
 

Detailed Description

An abstract class which a specific velocity function should inherit from.

Constructor & Destructor Documentation

DSC::VelocityFunc::VelocityFunc ( double  velocity,
double  accuracy,
int  max_time_steps 
)

Creates a velocity function which is applied to the simplicial complex defined by the first input parameter. The velocity parameter determines the velocity of the function.

Member Function Documentation

void DSC::VelocityFunc::deform ( DeformableSimplicialComplex dsc)
protectedvirtual

Computes the motion of each interface vertex and stores the new position in new_pos in the simplicial complex class.

double DSC::VelocityFunc::get_accuracy ( ) const

Returns the accuracy.

double DSC::VelocityFunc::get_compute_time ( ) const

Returns the time it took to compute the new positions of the interface in this time step.

double DSC::VelocityFunc::get_deform_time ( ) const

Returns the time it took to deform the interface in this time step.

std::string DSC::VelocityFunc::get_name ( ) const
virtual

Returns the name of the velocity function.

int DSC::VelocityFunc::get_time_step ( ) const

Returns the current time step.

double DSC::VelocityFunc::get_total_compute_time ( ) const

Returns the total time it took to compute the new positions of the interface.

double DSC::VelocityFunc::get_total_deform_time ( ) const

Returns the total time it took to deform the interface.

double DSC::VelocityFunc::get_velocity ( ) const

Returns the velocity.

bool DSC::VelocityFunc::is_motion_finished ( DeformableSimplicialComplex dsc)
virtual

Returns whether the motion has finished.

void DSC::VelocityFunc::take_time_step ( DeformableSimplicialComplex dsc)

Takes one time step thereby deforming the simplicial complex according to the velocity function.

void DSC::VelocityFunc::test ( DeformableSimplicialComplex dsc)
virtual

An optional test function which can be used to test some aspect of the velocity function.

void DSC::VelocityFunc::update_compute_time ( const std::chrono::time_point< std::chrono::system_clock > &  start_time)
protected

Updates the time it took to compute new positions for the interface vertices.

void DSC::VelocityFunc::update_deform_time ( const std::chrono::time_point< std::chrono::system_clock > &  start_time)
protected

Updates the time it took to deform the interface.


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