Defines the command line options class for the main executable.
More...
#include "Core/Common.h"
#include "Core/AstronomicalConstants.h"
#include "StellarEvoltion/MESAIO.h"
#include "StellarEvolution/CustomStellarEvolution.h"
#include "BinarySystem/OrbitSolver.h"
#include "BinarySystem/EvolvingStar.h"
#include "BinarySystem/LockedPlanet.h"
#include "BinarySystem/DiskPlanetSystem.h"
#include "BinarySystem/ConstSolutionIterator.h"
#include "IO/IOColumns.h"
#include <argtable2.h>
#include <iostream>
#include <fstream>
#include <sstream>
Go to the source code of this file.
|
|
std::vector< std::string > | TRACK_COLUMN_NAMES (CustomStellarEvolution::NUM_TRACK_QUANTITIES) |
| |
|
std::string | data_directory () |
| |
| void | parse_real_list (const char *values_str, std::list< double > &values) |
| | Parses a comma separated list of real values. More...
|
| |
| void | output_solution (const OrbitSolver &solver, const BinarySystem &system, const std::string &filename, const std::vector< OutCol::OutputColumns > &output_file_format, double start_age, double end_age, double timestep, const std::list< double > &required_ages=std::list< double >()) |
| | Outputs the solution calculated by the given solver. More...
|
| |
| void | calculate_evolution (const std::vector< double > &real_parameters, bool start_locked, const std::list< double > &required_ages, const StellarEvolution &stellar_evolution, const std::string &outfname, const std::vector< OutCol::OutputColumns > &output_file_format, bool need_orbit) |
| | Calculates the evolution for a set of parameters. More...
|
| |
| std::string | update_run_parameters (std::vector< double > &real_parameters, bool &start_locked, std::list< double > &required_ages, const std::vector< InCol::InputColumns > &input_format, std::istringstream &line, size_t input_lineno) |
| | Updates the evolution parameters as indicated on the next line of the input stream and returns filename to output the evolution to. More...
|
| |
| void | run (const CommandLineOptions &options, const StellarEvolution &stellar_evolution) |
| | Actually calculates the orbital evolutions. More...
|
| |
Defines the command line options class for the main executable.
- Todo:
- Add command line option to chose between YREC and MESA
Definition in file poet.h.
◆ calculate_evolution()
| void calculate_evolution |
( |
const std::vector< double > & |
real_parameters, |
|
|
bool |
start_locked, |
|
|
const std::list< double > & |
required_ages, |
|
|
const StellarEvolution & |
stellar_evolution, |
|
|
const std::string & |
outfname, |
|
|
const std::vector< OutCol::OutputColumns > & |
output_file_format, |
|
|
bool |
need_orbit |
|
) |
| |
Calculates the evolution for a set of parameters.
- Parameters
-
| real_parameters | The real-valued parameters describing the system indexed by InCol::InputColumns. |
| start_locked | Whether to start the system with the stellar surface rotation synchronized to the orbit. |
| required_ages | The ages required to be included in the evolution (sorted). |
| stellar_evolution | The stellar evolution interpolator. |
| outfname | The filename to write the evolution to. |
| output_file_format | The columns to include in the output file in the desired order. |
| need_orbit | Is calculating the orbit requried by the output. |
◆ output_solution()
| void output_solution |
( |
const OrbitSolver & |
solver, |
|
|
const BinarySystem & |
system, |
|
|
const std::string & |
filename, |
|
|
const std::vector< OutCol::OutputColumns > & |
output_file_format, |
|
|
double |
start_age, |
|
|
double |
end_age, |
|
|
double |
timestep, |
|
|
const std::list< double > & |
required_ages = std::list< double >() |
|
) |
| |
Outputs the solution calculated by the given solver.
- Parameters
-
| solver | The solver that contains the solution. sover.operator() should already have been called. |
| system | The planet-star system for which solution was derived. |
| filename | The name of the file to output the solution to. |
| output_file_format | The columns to include in the output file in the desired order. |
| start_age | The starting age if no orbit was calculated. Ignored if solver contains an orbit. |
| end_age | The starting age if no orbit was calculated. Ignored if solver contains an orbit. |
| timestep | The time step if no orbit was calculated. Ignored if solver contains an orbit. |
| required_ages | A list of ages for which an output line must be written. Ignored if solver contains an orbit |
◆ parse_real_list()
| void parse_real_list |
( |
const char * |
values_str, |
|
|
std::list< double > & |
values |
|
) |
| |
Parses a comma separated list of real values.
If the list starts with a comma, the values are appended to the output list, otherwise the output list is overwritten with the new values.
- Parameters
-
| values_str | The comma separated list of values. |
| values | The values to append to or overwrite. |
◆ run()
| void run |
( |
const CommandLineOptions & |
options, |
|
|
const StellarEvolution & |
stellar_evolution |
|
) |
| |
Actually calculates the orbital evolutions.
- Parameters
-
| options | All the configuration from the command line. |
| stellar_evolution | A fully functional stellar evolution interpolator. |
◆ update_run_parameters()
| std::string update_run_parameters |
( |
std::vector< double > & |
real_parameters, |
|
|
bool & |
start_locked, |
|
|
std::list< double > & |
required_ages, |
|
|
const std::vector< InCol::InputColumns > & |
input_format, |
|
|
std::istringstream & |
line, |
|
|
size_t |
input_lineno |
|
) |
| |
Updates the evolution parameters as indicated on the next line of the input stream and returns filename to output the evolution to.
- Parameters
-
| real_parameters | The array of real valued parameters to update, indexed by InCol::InputColumns. |
| start_locked | Whether to start the system with the stellar surface spin synchronous with the orbit. |
| required_ages | The ages required to be included in the evolution (sorted). |
| input_format | List of the columns to read from the input stream. |
| line | The line from the input stream to read parameters from. |
| input_lineno | The line number being processed (used only for error messages). |