Class part_calibrate_class_tl (o2scl)

O2scl : Class List

template<class fp_t = double>
class part_calibrate_class_tl

Object to organize calibration of particle classes to results stored in a table.

Subclassed by o2scl::part_deriv_calibrate_class

Public Functions

template<class part_t>
inline void set_mass_flags(part_t &p, fp_t mot, fp_t T, size_t k)

Set mass and flags from mot, T, and the index k.

template<class part_t>
inline void set_chem_pot(part_t &p, fp_t psi, fp_t T, size_t k, bool nr_mode)

Set chemical potential from psi, T, the index k, and the flag nr_mode.

This function sets either \c mu or \c nu, depending on whether
or not we're comparing interacting or noninteracting
particles. The other chemical potential is set to zero to
ensure that the correct one is being used in the calculation.
template<class part1_t, class part2_t, class part3_t>
inline void check_density(part1_t &p, part2_t &exact, part3_t &max, size_t k, fp_t T, fp_t mot, fp_t psi, fp_t &mu_max, fp_t &m_max, fp_t &T_max, fp_t &mot_max, fp_t &psi_max, fp_t &ret_local)

Check the density against the exact result and update.

This function compares the number densities in \c p and \c
exact. If the difference is greater than that recorded in \c
max, and if so then all the "max" quantities are updated.
template<class part1_t, class part2_t, class part3_t>
inline void check_chem_pot(part1_t &p, part2_t &exact, part3_t &max, size_t k, fp_t T, fp_t mot, fp_t psi, fp_t &mu_max, fp_t &m_max, fp_t &T_max, fp_t &mot_max, fp_t &psi_max, fp_t &ret_local)

Check the chemical potential against the exact result and update.

template<class part1_t, class part2_t, class part3_t>
inline void check_eps(part1_t &p, part2_t &exact, part3_t &max, size_t k, fp_t T, fp_t mot, fp_t psi, fp_t &mu_max, fp_t &m_max, fp_t &T_max, fp_t &mot_max, fp_t &psi_max, fp_t &ret_local)

Check the energy density, pressure, and entropy against the exact result and update.

template<class part1_t, class part2_t, class part3_t>
inline void check_derivs(part1_t &p, part2_t &exact, part3_t &max, size_t k, fp_t T, fp_t mot, fp_t psi, fp_t &mu_max, fp_t &m_max, fp_t &T_max, fp_t &mot_max, fp_t &psi_max, fp_t &ret_local)

Check the three derivatives against the exact result and update.

template<class part_t, class thermo_t>
inline fp_t part_calibrate(part_t &p, thermo_t &th, std::string file, bool test_pair = true, bool test_density = true, bool nr_mode = false, int verbose = 0, bool external = false)

Calibrate a particle thermodynamics class with results stored in a table.

This compares the approximation to the exact results using calc_density(), calc_mu(), pair_density() and pair_mu(). It tries each function twelve times. It tries three different temperatures, setting both inc_rest_mass and non_interacting equal to true and false.

The verbose parameter controls the amount of output.

\verbatim embed:rst

.. todo::

In function pair_calibrate()

- Future: Also calibrate massless fermions?

\endverbatim