#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< vec3 > | pos_old |
An abstract class which a specific velocity function should inherit from.
| 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.
|
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.
|
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.
|
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.
|
virtual |
An optional test function which can be used to test some aspect of the velocity function.
|
protected |
Updates the time it took to compute new positions for the interface vertices.
|
protected |
Updates the time it took to deform the interface.
1.8.6