diff --git a/build-config/GridFire/meson.build b/build-config/GridFire/meson.build index 63e4f80..2e32cee 100644 --- a/build-config/GridFire/meson.build +++ b/build-config/GridFire/meson.build @@ -1,2 +1,3 @@ -gridfire_p = subproject('GridFire') -gridfire_dep = gridfire_p.get_variable('network_dep') +# Disabled for dev +#gridfire_p = subproject('GridFire') +#gridfire_dep = gridfire_p.get_variable('gridfire_dep') diff --git a/build-config/fourdst/libconfig/meson.build b/build-config/fourdst/libconfig/meson.build index 16fa34d..6b1adcf 100644 --- a/build-config/fourdst/libconfig/meson.build +++ b/build-config/fourdst/libconfig/meson.build @@ -1,3 +1,2 @@ config_p = subproject('libconfig') config_dep = config_p.get_variable('config_dep') -yaml_cpp_dep = config_p.get_variable('yaml_cpp_dep') \ No newline at end of file diff --git a/meson.build b/meson.build index e25c551..807a3cf 100644 --- a/meson.build +++ b/meson.build @@ -54,9 +54,9 @@ if get_option('build_tests') subdir('tests') endif -if get_option('build_python') - subdir('build-python') -endif +# if get_option('build_python') +# subdir('build-python') +# endif if get_option('build_post_run_utils') subdir('utils') diff --git a/src/config/config.h b/src/config/config.h new file mode 100644 index 0000000..6576f81 --- /dev/null +++ b/src/config/config.h @@ -0,0 +1,14 @@ +#pragma once + +#include + +namespace serif::config { + struct SERiFConfig { + struct EOS { + struct Helm { + std::string logFile = "log"; + }; + }; + + }; +} \ No newline at end of file diff --git a/src/config/meson.build b/src/config/meson.build new file mode 100644 index 0000000..55798b6 --- /dev/null +++ b/src/config/meson.build @@ -0,0 +1 @@ +include_directories('.', install_dir: ) \ No newline at end of file diff --git a/src/eos/private/EOS.cpp b/src/eos/private/EOS.cpp index ba3593d..16dc15a 100644 --- a/src/eos/private/EOS.cpp +++ b/src/eos/private/EOS.cpp @@ -3,6 +3,8 @@ #include "helm.h" #include +#include + namespace serif::eos { EOS::EOS(const EOSio& reader) : m_reader(reader) {} EOS::EOS(const std::string& filename, const EOSFormat format) : m_reader(EOSio(filename, format)) {} @@ -15,7 +17,13 @@ namespace serif::eos { q.rho = in.density; // Density in g/cm^3 q.abar = in.composition.getMeanParticleMass(); // Mean atomic mass in g - q.zbar = in.composition.getMeanAtomicNumber(); // Mean atomic number (dimensionless) + + //TODO: Impliment actual get Mean atomic Number Method + q.zbar = 0; + for (const auto& sp : in.composition | std::views::keys) { + q.zbar += sp.z(); + } + q.zbar /= static_cast(in.composition.size()); helmholtz::HELMEOSOutput tempOutput; tempOutput = helmholtz::get_helm_EOS(q, *std::get>(m_reader.getTable())); @@ -61,4 +69,4 @@ namespace serif::eos { const EOSio& EOS::getReader() const { return m_reader; } -} \ No newline at end of file +} diff --git a/src/eos/private/helm.cpp b/src/eos/private/helm.cpp index 9cac131..fd96d5f 100644 --- a/src/eos/private/helm.cpp +++ b/src/eos/private/helm.cpp @@ -36,11 +36,12 @@ #include "helm.h" -#include "const.h" -#include "config.h" +#include "fourdst/constants/const.h" +#include "fourdst/config/config.h" #include "quill/LogMacros.h" #include "quill/Logger.h" -#include "logging.h" +#include "fourdst/logging/logging.h" + using namespace std; @@ -127,10 +128,8 @@ namespace serif::eos::helmholtz { // this function reads in the HELM table and stores in the above arrays std::unique_ptr read_helm_table(const std::string &filename) { - fourdst::config::Config& config = fourdst::config::Config::getInstance(); - auto logFile = config.get("EOS:Helm:LogFile", "log"); fourdst::logging::LogManager& logManager = fourdst::logging::LogManager::getInstance(); - quill::Logger* logger = logManager.getLogger(logFile); + quill::Logger* logger = logManager.getLogger("log"); LOG_INFO(logger, "read_helm_table : Reading HELM table from file {}", filename); // Make a unique pointer to the HELMTable @@ -238,10 +237,8 @@ namespace serif::eos::helmholtz { and returns the calculated quantities in the input ***/ serif::eos::helmholtz::HELMEOSOutput get_helm_EOS(serif::eos::helmholtz::HELMEOSInput &q, const serif::eos::helmholtz::HELMTable &table) { - fourdst::config::Config& config = fourdst::config::Config::getInstance(); - auto logFile = config.get("EOS:Helm:LogFile", "log"); fourdst::logging::LogManager& logManager = fourdst::logging::LogManager::getInstance(); - quill::Logger* logger = logManager.getLogger(logFile); + quill::Logger* logger = logManager.getLogger("log"); fourdst::constant::Constants& constants = fourdst::constant::Constants::getInstance(); const double pi = std::numbers::pi; diff --git a/src/eos/public/EOS.h b/src/eos/public/EOS.h index 3466c8e..2b9b8ac 100644 --- a/src/eos/public/EOS.h +++ b/src/eos/public/EOS.h @@ -3,7 +3,7 @@ #include "EOSio.h" #include "helm.h" #include -#include "composition.h" +#include "fourdst/composition/composition.h" #include namespace serif::eos { diff --git a/src/meson.build b/src/meson.build index e9cedf9..666d0ea 100644 --- a/src/meson.build +++ b/src/meson.build @@ -11,8 +11,8 @@ subdir('probe') subdir('eos') subdir('meshIO') -# Resouce Manager Libraries -subdir('resource') +# Resouce Manager Libraries Disabled for dev +#subdir('resource') # Physics Libraries subdir('polytrope') diff --git a/src/polytrope/solver/meson.build b/src/polytrope/solver/meson.build index 3b52c56..eee90ad 100644 --- a/src/polytrope/solver/meson.build +++ b/src/polytrope/solver/meson.build @@ -35,7 +35,7 @@ dependencies = [ probe_dep, quill_dep, config_dep, - resourceManager_dep, +# resourceManager_dep, types_dep, ] diff --git a/src/polytrope/solver/private/polySolver.cpp b/src/polytrope/solver/private/polySolver.cpp index f3c199d..4a6082b 100644 --- a/src/polytrope/solver/private/polySolver.cpp +++ b/src/polytrope/solver/private/polySolver.cpp @@ -28,22 +28,24 @@ #include "mfem.hpp" #include "4DSTARTypes.h" -#include "config.h" -#include "const.h" +#include "fourdst/config/config.h" +// #include "fourdst/constants/const.h" #include "integrators.h" #include "mfem.hpp" #include "polytropeOperator.h" #include "polyCoeff.h" #include "probe.h" -#include "resourceManager.h" -#include "resourceManagerTypes.h" +// #include "resourceManager.h" +// #include "resourceManagerTypes.h" #include "utilities.h" #include "quill/LogMacros.h" -#include "logging.h" +#include "fourdst/logging/logging.h" namespace serif::polytrope { + static mesh::MeshIO loadedMesh("assets/dynamic/mesh/core_midres.msh"); + namespace laneEmden { double a (const int k, const double n) { // NOLINT(*-no-recursion) @@ -76,7 +78,7 @@ namespace laneEmden { PolySolver::PolySolver(mfem::Mesh& mesh, const double n, const double order) - : m_config(fourdst::config::Config::getInstance()), // Updated + : // m_config(fourdst::config::Config::getInstance()), // Updated m_logManager(fourdst::logging::LogManager::getInstance()), m_logger(m_logManager.getLogger("log")), m_polytropicIndex(n), @@ -104,11 +106,12 @@ mfem::Mesh& PolySolver::prepareMesh(const double n) { if (n > 4.99 || n < 0.0) { throw std::runtime_error("The polytropic index n must be less than 5.0 and greater than 0.0. Currently it is " + std::to_string(n)); } - const serif::resource::ResourceManager& rm = serif::resource::ResourceManager::getInstance(); - const serif::resource::types::Resource& genericResource = rm.getResource("mesh:polySphere"); - const auto &meshIO = std::get>(genericResource); - meshIO->LinearRescale(polycoeff::x1(n)); // Assumes polycoeff is now serif::polytrope::polycoeff - return meshIO->GetMesh(); + // Disabled for dev + // const serif::resource::ResourceManager& rm = serif::resource::ResourceManager::getInstance(); + // const serif::resource::types::Resource& genericResource = rm.getResource("mesh:polySphere"); + + + return loadedMesh.GetMesh(); } PolySolver::~PolySolver() = default; @@ -380,10 +383,10 @@ void PolySolver::setInitialGuess() const { (*m_phi)(phiCenterDofs[i]) = 0.0; } - if (m_config.get("Poly:Solver:ViewInitialGuess", false)) { - serif::probe::glVisView(*m_theta, m_mesh, "θ init"); - serif::probe::glVisView(*m_phi, m_mesh, "φ init"); - } + // if (m_config.get("Poly:Solver:ViewInitialGuess", false)) { + // serif::probe::glVisView(*m_theta, m_mesh, "θ init"); + // serif::probe::glVisView(*m_phi, m_mesh, "φ init"); + // } } @@ -392,25 +395,25 @@ void PolySolver::saveAndViewSolution(const mfem::BlockVector& state_vector) cons mfem::Vector& x_theta = x_block.GetBlock(0); mfem::Vector& x_phi = x_block.GetBlock(1); - if (m_config.get("Poly:Output:View", false)) { - serif::probe::glVisView(x_theta, *m_feTheta, "θ Solution"); - serif::probe::glVisView(x_phi, *m_fePhi, "ɸ Solution"); - } + // if (m_config.get("Poly:Output:View", false)) { + // serif::probe::glVisView(x_theta, *m_feTheta, "θ Solution"); + // serif::probe::glVisView(x_phi, *m_fePhi, "ɸ Solution"); + // } // --- Extract the Solution --- - if (m_config.get("Poly:Output:1D:Save", true)) { - const auto solutionPath = m_config.get("Poly:Output:1D:Path", "polytropeSolution_1D.csv"); - auto derivSolPath = "d" + solutionPath; - - const auto rayCoLatitude = m_config.get("Poly:Output:1D:RayCoLatitude", 0.0); - const auto rayLongitude = m_config.get("Poly:Output:1D:RayLongitude", 0.0); - const auto raySamples = m_config.get("Poly:Output:1D:RaySamples", 100); - - const std::vector rayDirection = {rayCoLatitude, rayLongitude}; - - serif::probe::getRaySolution(x_theta, *m_feTheta, rayDirection, raySamples, solutionPath); - // Probe::getRaySolution(x_phi, *m_fePhi, rayDirection, raySamples, derivSolPath); - } + // if (m_config.get("Poly:Output:1D:Save", true)) { + // const auto solutionPath = m_config.get("Poly:Output:1D:Path", "polytropeSolution_1D.csv"); + // auto derivSolPath = "d" + solutionPath; + // + // const auto rayCoLatitude = m_config.get("Poly:Output:1D:RayCoLatitude", 0.0); + // const auto rayLongitude = m_config.get("Poly:Output:1D:RayLongitude", 0.0); + // const auto raySamples = m_config.get("Poly:Output:1D:RaySamples", 100); + // + // const std::vector rayDirection = {rayCoLatitude, rayLongitude}; + // + // serif::probe::getRaySolution(x_theta, *m_feTheta, rayDirection, raySamples, solutionPath); + // // Probe::getRaySolution(x_phi, *m_fePhi, rayDirection, raySamples, derivSolPath); + // } } void PolySolver::setOperatorEssentialTrueDofs() const { @@ -420,15 +423,24 @@ void PolySolver::setOperatorEssentialTrueDofs() const { void PolySolver::LoadSolverUserParams(double &newtonRelTol, double &newtonAbsTol, int &newtonMaxIter, int &newtonPrintLevel, double &gmresRelTol, double &gmresAbsTol, int &gmresMaxIter, int &gmresPrintLevel) const { - newtonRelTol = m_config.get("Poly:Solver:Newton:RelTol", 1.e-4); - newtonAbsTol = m_config.get("Poly:Solver:Newton:AbsTol", 1.e-6); - newtonMaxIter = m_config.get("Poly:Solver:Newton:MaxIter", 10); - newtonPrintLevel = m_config.get("Poly:Solver:Newton:PrintLevel", 3); - gmresRelTol = m_config.get("Poly:Solver:GMRES:RelTol", 1.e-12); - gmresAbsTol = m_config.get("Poly:Solver:GMRES:AbsTol", 1.e-12); - gmresMaxIter = m_config.get("Poly:Solver:GMRES:MaxIter", 200); - gmresPrintLevel = m_config.get("Poly:Solver:GMRES:PrintLevel", -1); + // newtonAbsTol = m_config.get("Poly:Solver:Newton:AbsTol", 1.e-6); + // newtonMaxIter = m_config.get("Poly:Solver:Newton:MaxIter", 10); + // newtonPrintLevel = m_config.get("Poly:Solver:Newton:PrintLevel", 3); + // + // gmresRelTol = m_config.get("Poly:Solver:GMRES:RelTol", 1.e-12); + // gmresAbsTol = m_config.get("Poly:Solver:GMRES:AbsTol", 1.e-12); + // gmresMaxIter = m_config.get("Poly:Solver:GMRES:MaxIter", 200); + // gmresPrintLevel = m_config.get("Poly:Solver:GMRES:PrintLevel", -1); + + // The config system has changed, for now just hard code these. + newtonAbsTol = 1.0e-6; + newtonMaxIter = 10; + newtonPrintLevel = 3; + gmresRelTol = 1.0e-12; + gmresAbsTol = 1.0e-12; + gmresMaxIter = 200; + gmresPrintLevel = -1; LOG_DEBUG(m_logger, "Newton Solver (relTol: {:0.2E}, absTol: {:0.2E}, maxIter: {}, printLevel: {})", newtonRelTol, newtonAbsTol, newtonMaxIter, newtonPrintLevel); LOG_DEBUG(m_logger, "GMRES Solver (relTol: {:0.2E}, absTol: {:0.2E}, maxIter: {}, printLevel: {})", gmresRelTol, gmresAbsTol, gmresMaxIter, gmresPrintLevel); diff --git a/src/polytrope/solver/public/polySolver.h b/src/polytrope/solver/public/polySolver.h index bd00436..43fe6a0 100644 --- a/src/polytrope/solver/public/polySolver.h +++ b/src/polytrope/solver/public/polySolver.h @@ -27,10 +27,10 @@ #include "integrators.h" #include "4DSTARTypes.h" #include "polytropeOperator.h" -#include "config.h" +#include "fourdst/config/config.h" #include "meshIO.h" #include "quill/Logger.h" -#include "logging.h" +#include "fourdst/logging/logging.h" namespace serif { namespace polytrope { @@ -282,7 +282,7 @@ public: // Public methods private: // Private Attributes // --- Configuration and Logging --- - fourdst::config::Config& m_config; ///< Reference to the global configuration manager instance. + // fourdst::config::Config& m_config; ///< Reference to the global configuration manager instance. fourdst::logging::LogManager& m_logManager; ///< Reference to the global log manager instance. quill::Logger* m_logger; ///< Pointer to the specific logger instance for this class. @@ -619,4 +619,4 @@ private: // Private methods }; } // namespace polytrope -} // namespace serif \ No newline at end of file +} // namespace serif diff --git a/src/polytrope/utils/private/integrators.cpp b/src/polytrope/utils/private/integrators.cpp index 5d246bc..1189a4c 100644 --- a/src/polytrope/utils/private/integrators.cpp +++ b/src/polytrope/utils/private/integrators.cpp @@ -22,13 +22,13 @@ #include #include "integrators.h" -#include "config.h" +#include "fourdst/config/config.h" #include namespace serif::polytrope::polyMFEMUtils { NonlinearPowerIntegrator::NonlinearPowerIntegrator(const double n) : m_polytropicIndex(n), - m_epsilon(fourdst::config::Config::getInstance().get("Poly:Solver:Epsilon", 1.0e-8)) { + m_epsilon(1e-8) { if (m_polytropicIndex < 0.0) { throw std::invalid_argument("Polytropic index must be non-negative."); diff --git a/src/polytrope/utils/private/polytropeOperator.cpp b/src/polytrope/utils/private/polytropeOperator.cpp index 5a0c0ca..52a3477 100644 --- a/src/polytrope/utils/private/polytropeOperator.cpp +++ b/src/polytrope/utils/private/polytropeOperator.cpp @@ -26,7 +26,7 @@ #include "mfem_smout.h" #include -#include "config.h" +#include "fourdst/config/config.h" namespace serif { namespace polytrope { diff --git a/src/polytrope/utils/public/integrators.h b/src/polytrope/utils/public/integrators.h index c36584b..d9d50e3 100644 --- a/src/polytrope/utils/public/integrators.h +++ b/src/polytrope/utils/public/integrators.h @@ -22,10 +22,10 @@ #include "mfem.hpp" #include -#include "config.h" +#include "fourdst/config/config.h" #include "probe.h" #include "quill/Logger.h" -#include "logging.h" +#include "fourdst/logging/logging.h" /** @@ -71,7 +71,7 @@ namespace serif::polytrope { */ virtual void AssembleElementGrad (const mfem::FiniteElement &el, mfem::ElementTransformation &Trans, const mfem::Vector &elfun, mfem::DenseMatrix &elmat) override; private: - fourdst::config::Config& m_config = fourdst::config::Config::getInstance(); + // fourdst::config::Config& m_config = fourdst::config::Config::getInstance(); fourdst::logging::LogManager& m_logManager = fourdst::logging::LogManager::getInstance(); quill::Logger* m_logger = m_logManager.getLogger("log"); double m_polytropicIndex; diff --git a/src/polytrope/utils/public/polytropeOperator.h b/src/polytrope/utils/public/polytropeOperator.h index 473d388..af6a296 100644 --- a/src/polytrope/utils/public/polytropeOperator.h +++ b/src/polytrope/utils/public/polytropeOperator.h @@ -25,7 +25,7 @@ #include #include "probe.h" -#include "logging.h" +#include "fourdst/logging/logging.h" #include "quill/Logger.h" namespace serif::polytrope { @@ -396,4 +396,4 @@ private: void update_preconditioner(const mfem::Operator &grad) const; }; -} // namespace serif::polytrope \ No newline at end of file +} // namespace serif::polytrope diff --git a/src/probe/private/probe.cpp b/src/probe/private/probe.cpp index faef6a4..c1be228 100644 --- a/src/probe/private/probe.cpp +++ b/src/probe/private/probe.cpp @@ -30,7 +30,7 @@ #include "mfem.hpp" -#include "config.h" +#include "fourdst/config/config.h" #include "probe.h" #include @@ -40,7 +40,7 @@ #include "quill/LogMacros.h" #include "quill/Logger.h" -#include "logging.h" +#include "fourdst/logging/logging.h" namespace serif::probe { @@ -57,27 +57,29 @@ void wait(int seconds) { void glVisView(mfem::GridFunction& u, mfem::Mesh& mesh, const std::string& windowTitle, const std::string& keyset) { - fourdst::config::Config& config = fourdst::config::Config::getInstance(); quill::Logger* logger = fourdst::logging::LogManager::getInstance().getLogger("log"); - if (config.get("Probe:GLVis:Visualization", true)) { + // if (config.get("Probe:GLVis:Visualization", true)) { std::string usedKeyset; LOG_INFO(logger, "Visualizing solution using GLVis..."); LOG_INFO(logger, "Window title: {}", windowTitle); if (keyset.empty()) { - usedKeyset = config.get("Probe:GLVis:DefaultKeyset", ""); + // usedKeyset = config.get("Probe:GLVis:DefaultKeyset", ""); + usedKeyset = ""; } else { usedKeyset = keyset; } LOG_INFO(logger, "Keyset: {}", usedKeyset); - const auto vishost = config.get("Probe:GLVis:Host", "localhost"); - const auto visport = config.get("Probe:GLVis:Port", 19916); + // const auto vishost = config.get("Probe:GLVis:Host", "localhost"); + // const auto visport = config.get("Probe:GLVis:Port", 19916); + const std::string vishost = "localhost"; + const int visport = 19916; mfem::socketstream sol_sock(vishost.c_str(), visport); sol_sock.precision(8); sol_sock << "solution\n" << mesh << u << "window_title '" << windowTitle << "'\n" << "keys " << usedKeyset << "\n"; sol_sock << std::flush; - } + // } } void glVisView(mfem::Vector &vec, mfem::FiniteElementSpace &fes, const std::string &windowTitle, const std::string& keyset) { @@ -109,14 +111,15 @@ double getMeshRadius(mfem::Mesh& mesh) { std::pair, std::vector> getRaySolution(mfem::GridFunction& u, mfem::Mesh& mesh, const std::vector& rayDirection, int numSamples, std::string filename) { - fourdst::config::Config& config = fourdst::config::Config::getInstance(); + // fourdst::config::Config& config = fourdst::config::Config::getInstance(); fourdst::logging::LogManager& logManager = fourdst::logging::LogManager::getInstance(); quill::Logger* logger = logManager.getLogger("log"); LOG_INFO(logger, "Getting ray solution..."); // Check if the directory to write to exists // If it does not exist and MakeDir is true create it // Otherwise throw an exception - bool makeDir = config.get("Probe:GetRaySolution:MakeDir", true); + // bool makeDir = config.get("Probe:GetRaySolution:MakeDir", true); + bool makeDir = true; std::filesystem::path path = filename; if (makeDir) { @@ -203,4 +206,4 @@ std::pair, std::vector> getRaySolution(mfem::Vector DEPRECATION_WARNING_ON return getRaySolution(gf, *fes.GetMesh(), rayDirection, numSamples, filename); } -} // namespace Probe \ No newline at end of file +} // namespace Probe diff --git a/src/python/eos/meson.build b/src/python/eos/meson.build index e98ace6..d160ea5 100644 --- a/src/python/eos/meson.build +++ b/src/python/eos/meson.build @@ -5,7 +5,7 @@ bindings_headers = files('bindings.h') dependencies = [ eos_dep, config_dep, - resourceManager_dep, +# resourceManager_dep, python3_dep, pybind11_dep, ] diff --git a/src/python/meson.build b/src/python/meson.build index 84a9847..16d750c 100644 --- a/src/python/meson.build +++ b/src/python/meson.build @@ -1,8 +1 @@ -subdir('composition') -subdir('const') -subdir('config') - -subdir('mfem') -subdir('eos') -subdir('polytrope') -subdir('network') \ No newline at end of file +message('Python bindings currently disabled for development') diff --git a/src/python/mfem/meson.build b/src/python/mfem/meson.build index 6fae5c1..960db6c 100644 --- a/src/python/mfem/meson.build +++ b/src/python/mfem/meson.build @@ -10,7 +10,7 @@ bindings_headers = files( dependencies = [ config_dep, - resourceManager_dep, +# resourceManager_dep, python3_dep, pybind11_dep, mpi_dep, diff --git a/src/python/polytrope/meson.build b/src/python/polytrope/meson.build index 45ce25a..18eb6b1 100644 --- a/src/python/polytrope/meson.build +++ b/src/python/polytrope/meson.build @@ -5,7 +5,7 @@ bindings_headers = files('bindings.h') dependencies = [ polysolver_dep, config_dep, - resourceManager_dep, +# resourceManager_dep, python3_dep, pybind11_dep, ] diff --git a/src/resource/meson.build b/src/resource/meson.build index 7b4df2b..0288004 100644 --- a/src/resource/meson.build +++ b/src/resource/meson.build @@ -10,7 +10,6 @@ resourceManager_headers = files( ) dependencies = [ - yaml_cpp_dep, opatio_dep, eos_dep, quill_dep, @@ -37,4 +36,4 @@ resourceManager_dep = declare_dependency( ) # Make headers accessible -install_headers(resourceManager_headers, subdir : '4DSSE/resource') \ No newline at end of file +install_headers(resourceManager_headers, subdir : '4DSSE/resource') diff --git a/src/resource/private/resourceManager.cpp b/src/resource/private/resourceManager.cpp index 365b676..f08927a 100644 --- a/src/resource/private/resourceManager.cpp +++ b/src/resource/private/resourceManager.cpp @@ -29,7 +29,7 @@ #include "resourceManagerTypes.h" #include "debug.h" -#include "config.h" +#include "fourdst/config/config.h" #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) @@ -37,7 +37,8 @@ namespace serif::resource { ResourceManager::ResourceManager() { const std::string defaultDataDir = TOSTRING(DATA_DIR); - m_dataDir = m_config.get("Data:Dir", defaultDataDir); + // m_dataDir = m_config.get("Data:Dir", defaultDataDir); + m_dataDir = defaultDataDir; // -- Get the index file path using filesystem to make it a system safe path const std::string indexFilePath = m_dataDir + "/index.yaml"; // TODO Add checks to make sure data dir exists and index.yaml exists diff --git a/src/resource/public/resourceManager.h b/src/resource/public/resourceManager.h index e914fed..6a6faf8 100644 --- a/src/resource/public/resourceManager.h +++ b/src/resource/public/resourceManager.h @@ -25,9 +25,9 @@ #include #include "resourceManagerTypes.h" -#include "config.h" +#include "fourdst/config/config.h" #include "quill/Logger.h" -#include "logging.h" +#include "fourdst/logging/logging.h" /** * @class ResourceManager @@ -54,11 +54,11 @@ namespace serif::resource { */ ResourceManager& operator=(const ResourceManager&) = delete; - fourdst::config::Config& m_config = fourdst::config::Config::getInstance(); + // fourdst::config::Config& m_config = fourdst::config::Config::getInstance(); fourdst::logging::LogManager& m_logManager = fourdst::logging::LogManager::getInstance(); quill::Logger* m_logger = m_logManager.getLogger("log"); - fourdst::config::Config m_resourceConfig; + // fourdst::config::Config m_resourceConfig; std::string m_dataDir; std::unordered_map m_resources; diff --git a/subprojects/GridFire.wrap b/subprojects/GridFire.wrap index 0315252..e2a5097 100644 --- a/subprojects/GridFire.wrap +++ b/subprojects/GridFire.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://github.com/4D-STAR/GridFire.git -revision = v0.0.3a -depth = 1 \ No newline at end of file +revision = v0.7.4rc2 +depth = 1 diff --git a/subprojects/libcomposition.wrap b/subprojects/libcomposition.wrap index e279e73..fb126ba 100644 --- a/subprojects/libcomposition.wrap +++ b/subprojects/libcomposition.wrap @@ -1,7 +1,7 @@ [wrap-git] url = https://github.com/4D-STAR/libcomposition.git -revision = v1.0.1 +revision = v2.3.0 depth = 1 [provide] -libcomposition = composition_dep \ No newline at end of file +libcomposition = composition_dep diff --git a/subprojects/libconfig.wrap b/subprojects/libconfig.wrap index 0ee2c0d..ba46330 100644 --- a/subprojects/libconfig.wrap +++ b/subprojects/libconfig.wrap @@ -1,7 +1,7 @@ [wrap-git] url = https://github.com/4D-STAR/libconfig.git -revision = v1.0.0 +revision = v2.0.2 depth = 1 [provide] -libconfig = config_dep \ No newline at end of file +libconfig = config_dep diff --git a/subprojects/libconstants.wrap b/subprojects/libconstants.wrap index 1d42fa1..bdf9f60 100644 --- a/subprojects/libconstants.wrap +++ b/subprojects/libconstants.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/4D-STAR/libconstants.git -revision = v1.1 +revision = v1.1.1 depth = 1 [provide] diff --git a/subprojects/liblogging.wrap b/subprojects/liblogging.wrap index 5b37950..48bea5a 100644 --- a/subprojects/liblogging.wrap +++ b/subprojects/liblogging.wrap @@ -1,7 +1,7 @@ [wrap-git] url = https://github.com/4D-STAR/liblogging.git -revision = v1.0.1 +revision = v1.1.1 depth = 1 [provide] -liblogging = logging_dep \ No newline at end of file +liblogging = logging_dep diff --git a/tests/meson.build b/tests/meson.build index ec25dcb..979599b 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -4,10 +4,10 @@ gtest_main = dependency('gtest_main', required: true) gtest_nomain_dep = dependency('gtest', main: false, required : true) # Subdirectories for unit and integration tests -subdir('meshIO') -subdir('probe') -subdir('eos') -subdir('resource') +#subdir('meshIO') +#subdir('probe') +#subdir('eos') +#subdir('resource') subdir('poly') diff --git a/tests/poly/meson.build b/tests/poly/meson.build index d88e6b6..17a36e5 100644 --- a/tests/poly/meson.build +++ b/tests/poly/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, polysolver_dep, probe_dep, quill_dep, config_dep, gtest_main, resourceManager_dep], + dependencies: [gtest_dep, polysolver_dep, probe_dep, quill_dep, config_dep, gtest_main], install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly ) diff --git a/tests/poly/polyTest.cpp b/tests/poly/polyTest.cpp index 74635da..866510c 100644 --- a/tests/poly/polyTest.cpp +++ b/tests/poly/polyTest.cpp @@ -24,8 +24,8 @@ #include "quill/LogMacros.h" #include "mfem.hpp" #include "polySolver.h" -#include "logging.h" -#include "config.h" +#include "fourdst/logging/logging.h" +#include "fourdst/config/config.h" std::string CONFIG_FILENAME = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/testsConfig.yaml"; @@ -35,20 +35,16 @@ class polyTest : public ::testing::Test {}; TEST_F(polyTest, Solve) { using namespace serif::polytrope; - fourdst::config::Config& config = fourdst::config::Config::getInstance(); - config.loadConfig(CONFIG_FILENAME); fourdst::logging::LogManager& logManager = fourdst::logging::LogManager::getInstance(); quill::Logger* logger = logManager.getLogger("log"); LOG_INFO(logger, "Starting polytrope solve test 1..."); - config.loadConfig(CONFIG_FILENAME); - double polytropicIndex = config.get("Tests:Poly:Index", 1); - LOG_INFO(logger, "Solving polytrope with n = {:0.2f}", polytropicIndex); + // LOG_INFO(logger, "Solving polytrope with n = {:0.2f}", 1); - PolySolver polytrope(polytropicIndex, 1); + PolySolver polytrope(1, 1); LOG_INFO(logger, "Solving polytrope..."); EXPECT_NO_THROW(polytrope.solve()); LOG_INFO(logger, "Polytrope solved."); diff --git a/utils/meson.build b/utils/meson.build index 5cd625f..679bae9 100644 --- a/utils/meson.build +++ b/utils/meson.build @@ -1 +1 @@ -subdir('meshView') \ No newline at end of file +#subdir('meshView') \ No newline at end of file