Paramotopy
parallel parameter homotopy through bertini
|
#include "para_aux_funcs.hpp"
Go to the source code of this file.
Functions | |
void | ParamotopySplashScreen () |
void | BertiniSplashScreen (std::string bertinilocation) |
int | GetFileParserIndex (std::string filename) |
void | GetFilesToParse (boost::filesystem::path run_to_analyze, std::vector< std::string > &gather_savefiles, std::vector< int > &gather_parser_indices) |
bool | TestIfFinished (boost::filesystem::path &path_to_check) |
int | ParseFailedPaths (std::ifstream &fin, int numvariables) |
the parser for the failed_paths file type, which is output from bertini. More... | |
std::string | replace_tilde_with_home (std::string workwithme) |
std::vector < boost::filesystem::path > | FindDirectories (boost::filesystem::path dir, std::string expression) |
std::vector < boost::filesystem::path > | FindFiles (boost::filesystem::path dir, std::string expression) |
boost::filesystem::path | make_base_dir_name (boost::filesystem::path filename) |
bool | parseDouble (std::string const &text, double &results) |
double | getDouble () |
std::string | getAlphaNumeric_WithSpaces () |
std::string | getAlphaNumeric () |
bool | parseInteger (std::string const &text, int &results) |
int | getInteger () |
int | get_int_choice (std::string display_string, int min_value, int max_value) |
int | ParamotopyMainMenu () |
std::string | stackoverflow_getcwd () |
void | safe_chdir (std::string desired_directory) |
std::string | convert_spaces_to_escaped (std::string workwithme) |
void BertiniSplashScreen | ( | std::string | bertinilocation | ) |
Display the bertini version information.
Definition at line 21 of file para_aux_funcs.cpp.
References bertini_main().
Referenced by main().
std::string convert_spaces_to_escaped | ( | std::string | workwithme | ) |
Definition at line 484 of file para_aux_funcs.cpp.
Referenced by parallel_case().
std::vector<boost::filesystem::path> FindDirectories | ( | boost::filesystem::path | , |
std::string | expression | ||
) |
Searches a directory for all files fitting a regular expression.
dir | - The directory to search. |
expression | - The expression for which to search. |
Definition at line 167 of file para_aux_funcs.cpp.
Referenced by runinfo::AutoScanData(), datagatherer::GetAvailableRuns(), failinfo::RecoverProgress(), runinfo::ScanData(), and failinfo::StartOver().
std::vector< boost::filesystem::path > FindFiles | ( | boost::filesystem::path | dir, |
std::string | expression | ||
) |
Searches a directory for all directories fitting a regular expression.
dir | - The directory to search. |
expression | - The expression for which to search. |
Definition at line 194 of file para_aux_funcs.cpp.
Referenced by datagatherer::finalize_run_to_file(), GetFilesToParse(), ProgSettings::load_interactive(), and datagatherer::MergeFolders().
int get_int_choice | ( | std::string | display_string, |
int | min_value, | ||
int | max_value | ||
) |
Display a menu option to the user and ask for an integer input within the specified range.
display_string | - The menu as a string. |
min_value | - The minimum value allowed. |
max_value | - The maximum value allowed. |
Definition at line 347 of file para_aux_funcs.cpp.
References getInteger().
Referenced by ProgSettings::AddSetting(), ProgSettings::BertiniMenu(), runinfo::CheckRunStepOne(), DataManagementMainMenu(), ProgSettings::FileMenu(), ProgSettings::GetArchitecture(), datagatherer::GetAvailableRuns(), ProgSettings::GetBufferSize(), ProgSettings::GetDataFolderMethod(), ProgSettings::GetDeleteTmpFiles(), ProgSettings::GetMachineFile(), ProgSettings::GetNewFileThresh(), ProgSettings::GetNewRandomAtNewFolder(), ProgSettings::GetNumFilesTime(), ProgSettings::GetNumIterations(), ProgSettings::GetNumProcs(), ProgSettings::GetParallel(), ProgSettings::GetRandomMethod(), ProgSettings::GetStartFileName(), ProgSettings::GetStifle(), ProgSettings::GetTemporaryFileLocation(), ProgSettings::GetTightenTolerancesPathFailure(), ProgSettings::GetWriteMCFileUserDef(), ProgSettings::load_interactive(), failinfo::MainMenu(), ProgSettings::MainMenu(), ProgSettings::ManagePathFailureBertini(), ProgSettings::MetaSettingsMenu(), ProgSettings::ParallelismMenu(), ParamotopyMainMenu(), ProgSettings::PathFailureMenu(), runinfo::RandomMenu(), ProgSettings::SaveFilesMenu(), ProgSettings::SearchMenu(), runinfo::SetBaseDirManual(), runinfo::SetRandom(), ProgSettings::SetSaveFiles(), ProgSettings::SetSearchDesiredNumber(), ProgSettings::SetSearchIterations(), ProgSettings::SetSearchMode(), ProgSettings::SetSearchPosRealThresh(), ProgSettings::SetSearchSubmode(), ProgSettings::SetStandardStep2(), ProgSettings::SolverModeMenu(), ProgSettings::StepOneMenu(), steptwo_case(), ProgSettings::StepTwoMenu(), and ProgSettings::SystemMenu().
std::string getAlphaNumeric | ( | ) |
Get alphanumeric input from the user without spaces.
Definition at line 292 of file para_aux_funcs.cpp.
Referenced by ProgSettings::AddSetting(), ProgSettings::ChangeSetting(), ProgSettings::FindProgram(), ProgSettings::GetMachineFile(), ProgSettings::GetProgramLocationManual(), ProgSettings::GetTemporaryFileLocation(), and ProgSettings::RemoveSetting().
std::string getAlphaNumeric_WithSpaces | ( | ) |
Get alphnumeric input from the user with spaces.
Definition at line 278 of file para_aux_funcs.cpp.
Referenced by ProgSettings::GetArchitecture(), runinfo::GetInputFileName(), runinfo::LoadRandom(), and runinfo::SaveRandom().
double getDouble | ( | ) |
Have the user input a value until it's a double, return that value.
Definition at line 247 of file para_aux_funcs.cpp.
References parseDouble().
Referenced by runinfo::SetRandom().
int GetFileParserIndex | ( | std::string | filename | ) |
get the index for the particular filename. not the fastest lookup, should only perform seldomly.
filename | the string name of the file. |
Definition at line 44 of file para_aux_funcs.cpp.
Referenced by datagatherer::add_file_to_save().
void GetFilesToParse | ( | boost::filesystem::path | run_to_analyze, |
std::vector< std::string > & | gather_savefiles, | ||
std::vector< int > & | gather_parser_indices | ||
) |
Get the files to parse.
run_to_analyze | - The path of the folder to analyze. |
gather_savefiles | - Gather all the files to be saved |
gather_parser_indices | - A vector that that stores info as to whether or not to gather a particular file. |
Definition at line 66 of file para_aux_funcs.cpp.
References FindFiles().
Referenced by datagatherer::GatherDataForFails(), and datagatherer::GatherDataFromMenu().
int getInteger | ( | ) |
Have the user input a value untl it's an integer, return that value.
Definition at line 317 of file para_aux_funcs.cpp.
References parseInteger().
Referenced by get_int_choice().
boost::filesystem::path make_base_dir_name | ( | boost::filesystem::path | filename | ) |
Make the base directory given the associated paramotopy input filename.
filename | - The paramotopy input filename. |
Definition at line 226 of file para_aux_funcs.cpp.
Referenced by main().
int ParamotopyMainMenu | ( | ) |
Display the main paramotopy choice menu.
Definition at line 387 of file para_aux_funcs.cpp.
References get_int_choice().
Referenced by main().
void ParamotopySplashScreen | ( | ) |
Display the Paramotopy splash screen.
Definition at line 5 of file para_aux_funcs.cpp.
Referenced by main().
bool parseDouble | ( | std::string const & | text, |
double & | results | ||
) |
Set results to the value in the string.
text | - The double as a string value. |
results | - The double to store the string value as a double. |
Definition at line 241 of file para_aux_funcs.cpp.
Referenced by getDouble().
int ParseFailedPaths | ( | std::ifstream & | fin, |
int | numvariables | ||
) |
the parser for the failed_paths file type, which is output from bertini.
The parser for the failed_paths file type which is output from bertini.
fin | - The input file stream of the failed_paths file to parse |
numvariables | - The number of variables. |
Definition at line 125 of file para_aux_funcs.cpp.
Referenced by failinfo::find_failed_paths().
bool parseInteger | ( | std::string const & | text, |
int & | results | ||
) |
Parse a string that has an integer value in string form.
text | - The integer value as a string. |
results | - The value to set as a string. |
Definition at line 310 of file para_aux_funcs.cpp.
Referenced by getInteger().
std::string replace_tilde_with_home | ( | std::string | workwithme | ) |
Finds a user-entered tilde, and replaces it with the $HOME variable.
workwithme | - The string to test if a ~ exists to replace with the $HOME variable. |
Definition at line 151 of file para_aux_funcs.cpp.
Referenced by ProgSettings::GetProgramLocationManual().
void safe_chdir | ( | std::string | desired_directory | ) |
Definition at line 463 of file para_aux_funcs.cpp.
Referenced by slave_process::GoCalledDir(), and slave_process::MoveToWorkingFolder().
std::string stackoverflow_getcwd | ( | ) |
Get the current working directory directly from stackoverflow
Definition at line 428 of file para_aux_funcs.cpp.
Referenced by master_process::master_process(), and slave_process::slave_process().
bool TestIfFinished | ( | boost::filesystem::path & | path_to_check | ) |
Test if a step2 run is finished.
paths_to_check |
Definition at line 109 of file para_aux_funcs.cpp.
Referenced by datagatherer::GetAvailableRuns(), failinfo::PerformAnalysis(), and failinfo::RecoverProgress().