adamantine
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
adamantine::ScanPath Class Reference

#include <ScanPath.hh>

Public Member Functions

 ScanPath ()=default
 
 ScanPath (std::string const &scan_path_file, std::string const &file_format, boost::optional< boost::property_tree::ptree const & > const &units_optional_database)
 
dealii::Point< 3 > value (double const time, bool const save_time=true) const
 
double get_power_modifier (double const time) const
 
std::vector< ScanPathSegmentget_segment_list () const
 
void read_file ()
 
bool is_finished () const
 

Private Member Functions

void load_segment_scan_path ()
 
void load_event_series_scan_path ()
 
void update_current_segment_info (double time, bool save_segment, unsigned int &current_segment, dealii::Point< 3 > &segment_start_point, double &segment_start_time) const
 

Private Attributes

bool _scan_path_end = false
 
double _distance_scaling = 1.
 
double _velocity_scaling = 1.
 
std::string _scan_path_file
 
std::string _file_format
 
std::filesystem::file_time_type _last_write_time
 
std::vector< ScanPathSegment_segment_list
 
unsigned int _old_segment = 0
 

Friends

class ScanPathTester
 

Detailed Description

This class calculates the position of the center of a heat source. It also gives the power modifier for the current segment. It reads in the scan path from a text file.

Definition at line 57 of file ScanPath.hh.

Constructor & Destructor Documentation

◆ ScanPath() [1/2]

adamantine::ScanPath::ScanPath ( )
default

Default constructor. This creates an empty scan path with no segment.

◆ ScanPath() [2/2]

adamantine::ScanPath::ScanPath ( std::string const &  scan_path_file,
std::string const &  file_format,
boost::optional< boost::property_tree::ptree const & > const &  units_optional_database 
)

Construtor.

Parameters
[in]scan_path_fileis the name of the text file containing the scan path
[in]file_formatis the format of the scan path file
[in]units_optional_databaseis the units property tree

Definition at line 15 of file ScanPath.cc.

Member Function Documentation

◆ get_power_modifier()

double adamantine::ScanPath::get_power_modifier ( double const  time) const

Return the power coefficient for the current segment

Definition at line 244 of file ScanPath.cc.

◆ get_segment_list()

std::vector< ScanPathSegment > adamantine::ScanPath::get_segment_list ( ) const

Return the scan path's list of segments

Definition at line 261 of file ScanPath.cc.

◆ is_finished()

bool adamantine::ScanPath::is_finished ( ) const

Return true if we reach the end of the scan path.

Definition at line 266 of file ScanPath.cc.

◆ load_event_series_scan_path()

void adamantine::ScanPath::load_event_series_scan_path ( )
private

Method to load an "event series" scan path file

Definition at line 143 of file ScanPath.cc.

◆ load_segment_scan_path()

void adamantine::ScanPath::load_segment_scan_path ( )
private

Method to load a "segment" scan path file

Definition at line 58 of file ScanPath.cc.

◆ read_file()

void adamantine::ScanPath::read_file ( )

Read the scan path file and update the list of segments.

Definition at line 43 of file ScanPath.cc.

◆ update_current_segment_info()

void adamantine::ScanPath::update_current_segment_info ( double  time,
bool  save_segment,
unsigned int &  current_segment,
dealii::Point< 3 > &  segment_start_point,
double &  segment_start_time 
) const
private

Method to determine the current segment, its start point, and start time.

Definition at line 187 of file ScanPath.cc.

◆ value()

dealii::Point< 3 > adamantine::ScanPath::value ( double const  time,
bool const  save_time = true 
) const

Calculate the location of the scan path at a given time for a single coordinate. TODO

Definition at line 215 of file ScanPath.cc.

Friends And Related Function Documentation

◆ ScanPathTester

friend class ScanPathTester
friend

Definition at line 59 of file ScanPath.hh.

Member Data Documentation

◆ _distance_scaling

double adamantine::ScanPath::_distance_scaling = 1.
private

Scaling factor for the distance.

Definition at line 131 of file ScanPath.hh.

◆ _file_format

std::string adamantine::ScanPath::_file_format
private

Format of the scan path file, either segment of event_series.

Definition at line 143 of file ScanPath.hh.

◆ _last_write_time

std::filesystem::file_time_type adamantine::ScanPath::_last_write_time
private

Time the last time _scan_path_file was updated.

Definition at line 147 of file ScanPath.hh.

◆ _old_segment

unsigned int adamantine::ScanPath::_old_segment = 0
mutableprivate

The index of the old segment in the scan path.

Definition at line 155 of file ScanPath.hh.

◆ _scan_path_end

bool adamantine::ScanPath::_scan_path_end = false
private

Flag is true if we have reached the end of _scan_path_file.

Definition at line 127 of file ScanPath.hh.

◆ _scan_path_file

std::string adamantine::ScanPath::_scan_path_file
private

File name of the scan path

Definition at line 139 of file ScanPath.hh.

◆ _segment_list

std::vector<ScanPathSegment> adamantine::ScanPath::_segment_list
private

The list of information about each segment in the scan path.

Definition at line 151 of file ScanPath.hh.

◆ _velocity_scaling

double adamantine::ScanPath::_velocity_scaling = 1.
private

Scaling factor for the velocity.

Definition at line 135 of file ScanPath.hh.