.. _program_listing_file_src_compfind.h: Program Listing for File compfind.h =================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/compfind.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef COMPFIND_H_ #define COMPFIND_H_ #include "hydro.h" void multiplanet(vector &Comp, vector Tgap, int solver, vector ave_rho, double P0, bool isothermal, string infile, string outfile); // Find planet radii and radii of layers for an input file of planets // Input file must specify planet mass and mass fractions of each layer void compfinder(vector &Comp, int findlayer, vector layers, double minPMR, double maxPMR, float step, double rerr, int num_threads, vector Tgap, vector ave_rho, double P0, bool isothermal, string infile, string outfile); // Find 3-layer solutions for samples of mass and radii // Set which layer to find and keep other two in constant partial mass ratio // Loops through multiple partial mass ratios //Structures for MCMC storage and iteration struct MCMCRecord { double Mass; double fCore; double fMantle; double fWater; double fAtm; double log_likelihood; double RCore; double RMantle; double RWater; double RPlanet; }; struct Params { double Mass; double fCore; double fMantle; double fWater; }; struct LikelihoodResult { double log_likelihood; double RCore; double RMantle; double RWater; double RPlanet; }; void mcmcsample(vector &Comp, double MassPrior, double MUncPrior, double RadPrior, double RUncPrior, vector Tgap, vector ave_rho, double P0, bool isothermal, string outfile, int numchains, int steps, int numlayers); // Find 2, 3 or 4-layer solutions for mass and radius with uncertainty LikelihoodResult log_likelihood(vector &Comp, double MassPrior, double MUncPrior, double RadPrior, double RUncPrior, vector Tgap, vector ave_rho, double P0, bool isothermal, double Mass, double fCore, double fMantle, double fWater); //Find planet radius and likelihood calculation following Rogers & Seager 2010 ApJ void metropolis_hastings(vector& chain,vector &Comp, double MassPrior, double MUncPrior, double RadPrior, double RUncPrior, vector Tgap, vector ave_rho, double P0, bool isothermal, int steps, int numlayers); // MCMC method #endif