test(tests): misc updates (all minor)
This commit is contained in:
@@ -20,18 +20,12 @@
|
||||
// *********************************************************************** */
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "quill/LogMacros.h"
|
||||
#include "mfem.hpp"
|
||||
#include "resourceManager.h"
|
||||
#include "resourceManagerTypes.h"
|
||||
|
||||
#include "polySolver.h"
|
||||
#include "polyCoeff.h"
|
||||
#include "probe.h"
|
||||
#include "config.h"
|
||||
#include "meshIO.h"
|
||||
|
||||
std::string CONFIG_FILENAME = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/testsConfig.yaml";
|
||||
|
||||
@@ -44,23 +38,15 @@ TEST_F(polyTest, Solve) {
|
||||
Probe::LogManager& logManager = Probe::LogManager::getInstance();
|
||||
quill::Logger* logger = logManager.getLogger("log");
|
||||
|
||||
ResourceManager& rm = ResourceManager::getInstance();
|
||||
const Resource& resource = rm.getResource("mesh:polySphere");
|
||||
const auto &meshIO = std::get<std::unique_ptr<MeshIO>>(resource);
|
||||
|
||||
LOG_INFO(logger, "Starting polytrope solve test 1...");
|
||||
config.loadConfig(CONFIG_FILENAME);
|
||||
|
||||
double polytropicIndex = config.get<double>("Tests:Poly:Index", 1);
|
||||
double polyRadius = polycoeff::x1(polytropicIndex);
|
||||
LOG_INFO(logger, "Solving polytrope with n = {:0.2f}", polytropicIndex);
|
||||
meshIO->LinearRescale(polyRadius);
|
||||
mfem::Mesh& mesh = meshIO->GetMesh();
|
||||
double radius = Probe::getMeshRadius(mesh);
|
||||
LOG_INFO(logger, "Mesh radius: {:0.4f} (target={:0.4f})", radius, polyRadius);
|
||||
|
||||
|
||||
PolySolver polytrope(polytropicIndex, 1, mesh);
|
||||
PolySolver polytrope(polytropicIndex, 1);
|
||||
LOG_INFO(logger, "Solving polytrope...");
|
||||
EXPECT_NO_THROW(polytrope.solve());
|
||||
LOG_INFO(logger, "Polytrope solved.");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "resourceManager.h"
|
||||
#include "config.h"
|
||||
#include "eosIO.h"
|
||||
#include "helm.h"
|
||||
#include "resourceManager.h"
|
||||
#include "resourceManagerTypes.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
Reference in New Issue
Block a user