feat(Comoposition-Tracking): updated GridFire to use new, molar-abundance based, version of libcomposition (v2.0.6)
This entailed a major rewrite of the composition handling from each engine and engine view along with the solver and primer. The intent here is to let Compositions be constructed from the same extensive property which the solver tracks internally. This addressed C0 discontinuity issues in the tracked molar abundances of species which were introduced by repeadidly swaping from molar abundance space to mass fraction space and back. This also allowed for a simplification of the primeNetwork method. Specifically the mass borrowing system was dramatically simplified as molar abundances are extensive.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace gridfire::exceptions {
|
||||
/**
|
||||
@@ -28,7 +29,7 @@ namespace gridfire::exceptions {
|
||||
* @brief Constructs a PolicyError with a descriptive message.
|
||||
* @param msg The error message.
|
||||
*/
|
||||
explicit PolicyError(const std::string& msg) : m_message(msg) {};
|
||||
explicit PolicyError(std::string msg) : m_message(std::move(msg)) {};
|
||||
|
||||
/**
|
||||
* @brief Returns the explanatory string.
|
||||
|
||||
@@ -5,14 +5,9 @@
|
||||
#include <utility>
|
||||
|
||||
namespace gridfire::exceptions {
|
||||
class UtilityError : public std::exception {};
|
||||
|
||||
class HashingError final : public UtilityError {
|
||||
class UtilityError : public std::exception {
|
||||
public:
|
||||
explicit HashingError() = default;
|
||||
|
||||
explicit HashingError(std::string message)
|
||||
: m_message(std::move(message)) {}
|
||||
explicit UtilityError(std::string message) : m_message(std::move(message)) {}
|
||||
|
||||
[[nodiscard]] const char* what() const noexcept override {
|
||||
return m_message.c_str();
|
||||
@@ -20,4 +15,11 @@ namespace gridfire::exceptions {
|
||||
private:
|
||||
std::string m_message;
|
||||
};
|
||||
|
||||
class HashingError final : public UtilityError {
|
||||
public:
|
||||
|
||||
explicit HashingError(const std::string &message) : UtilityError(message) {}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user