.. _program_listing_file_src_specsyn_SpecsynLibNoWind.hpp: Program Listing for File SpecsynLibNoWind.hpp ============================================= |exhale_lsh| :ref:`Return to documentation for file ` (``src/specsyn/SpecsynLibNoWind.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef SPECSYNLIBNOWIND_HPP #define SPECSYNLIBNOWIND_HPP #include "../io/SimControls.hpp" #include "Specsyn.hpp" #include "SpecsynCommons.hpp" #include "SpecsynLib.hpp" #include #include #include #include namespace specsyn { template class SpecsynLibNoWind : public SpecsynLib { public: SpecsynLibNoWind( const std::string& spectraName, double fehMin, double fehMax, double afe, double cfe, double microTurb, double r, const std::string& registryName, double wlMin, double wlMax, std::size_t nWl, const io::SimControls& controls); [[nodiscard]] auto spec(const Specsyn::StarData& props, double feh) const -> std::vector override; [[nodiscard]] auto specForce(const Specsyn::StarData& props, double feh) const -> std::vector override; [[nodiscard]] auto logTeff() const -> const std::vector& { return logTeff_; } [[nodiscard]] auto logg() const -> const std::vector& { return logg_; } [[nodiscard]] auto fehMin() const -> double override { return FeH_.front(); } [[nodiscard]] auto fehMax() const -> double override { return FeH_.back(); } [[nodiscard]] auto loggMin() const -> double override { return logg_.front(); } [[nodiscard]] auto loggMax() const -> double override { return logg_.back(); } private: [[nodiscard]] auto nearestPopulatedLogg(std::size_t f, std::size_t t, double targetLogg) const -> std::optional; // References into the parent class's dim1_/dim2_/dim3_, named // for what they actually hold in this (FeH, logg, Teff) // specialization, so the constructor logic inherited from the // pre-refactor SpecsynLib can stay unchanged in everything but // name. Deliberately references rather than owned copies -- // the actual storage lives in (and is sized by) the parent, // which knows nothing about what its three axes mean -- so the // avoid-const-or-ref-data-members check's usual objection // (disabling implicit copy/move assignment) doesn't apply in // practice: this class is only ever used through the same // non-copyable, non-movable ownership pattern (unique_ptr in // SpecsynLibChained) as every other Specsyn. std::vector& FeH_; // NOLINT(readability-identifier-naming, cppcoreguidelines-avoid-const-or-ref-data-members) std::vector& logg_; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) std::vector& logTeff_; // NOLINT(readability-identifier-naming, cppcoreguidelines-avoid-const-or-ref-data-members) double AFe_; // NOLINT(readability-identifier-naming) double CFe_; // NOLINT(readability-identifier-naming) double microTurb_; double r_; }; } // namespace specsyn #endif // SPECSYNLIBNOWIND_HPP