Program Listing for File CInterface.h¶
↰ Return to documentation for file (/home/kpenev/projects/git/poet/poet_src/StellarEvolution/CInterface.h)
#include "../Core/SharedLibraryExportMacros.h"
#include "MESAIO.h"
extern "C" {
LIB_PUBLIC extern const int RADIUS;
LIB_PUBLIC extern const int ICONV;
LIB_PUBLIC extern const int LUM;
LIB_PUBLIC extern const int IRAD;
LIB_PUBLIC extern const int MRAD;
LIB_PUBLIC extern const int RRAD;
LIB_PUBLIC extern const int NUM_QUANTITIES;
struct LIB_PUBLIC MESAInterpolator;
struct LIB_PUBLIC EvolvingStellarQuantity;
LIB_PUBLIC MESAInterpolator* create_interpolator(
const char *mesa_dir,
double *smoothing,
int *nodes,
bool *vs_log_age,
bool *log_quantity,
unsigned num_threads
);
LIB_PUBLIC void destroy_interpolator(
MESAInterpolator *interpolator
);
LIB_PUBLIC const EvolvingStellarQuantity* create_quantity(
const MESAInterpolator* interpolator,
int quantityID,
double mass,
double feh
);
LIB_PUBLIC void destroy_quantity(
EvolvingStellarQuantity *quantity
);
LIB_PUBLIC double evaluate_quantity(
const EvolvingStellarQuantity* quantity,
double age
);
LIB_PUBLIC void evaluate_quantity_array(
const EvolvingStellarQuantity *quantity,
double *age,
unsigned nvalues,
double *result
);
LIB_PUBLIC void differentiate_quantity(
const EvolvingStellarQuantity* quantity,
double age,
double *result
);
LIB_PUBLIC void differentiate_quantity_array(
const EvolvingStellarQuantity *quantity,
double *age,
unsigned nvalues,
double *result
);
LIB_PUBLIC double quantity_min_age(
const EvolvingStellarQuantity* quantity
);
LIB_PUBLIC double quantity_max_age(
const EvolvingStellarQuantity* quantity
);
LIB_PUBLIC void quantity_continuous_range(
const EvolvingStellarQuantity* quantity,
double age,
double *range_min,
double *range_max
);
#ifndef NO_SERIALIZE
LIB_PUBLIC void save_interpolator(
MESAInterpolator *interpolator,
const char *filename
);
LIB_PUBLIC MESAInterpolator *load_interpolator(
const char *filename
);
#endif
LIB_PUBLIC double default_smoothing(
int quantityID
);
LIB_PUBLIC int default_nodes(
int quantityID
);
LIB_PUBLIC bool default_vs_log_age(
int quantityID
);
LIB_PUBLIC bool default_log_quantity(
int quantityID
);
LIB_PUBLIC double metallicity_from_feh(double feh);
LIB_PUBLIC double feh_from_metallicity(double metallicity);
LIB_PUBLIC double feh_from_z(double z);
LIB_PUBLIC double z_from_feh(double feh);
} //End extern "C"