fix(poly): polytrope converges to solution

first commit where the polytrope module converges to a solution. I have not yet validated if it is a correct solution
This commit is contained in:
2025-02-20 16:05:02 -05:00
parent 776174c093
commit 9925f56e34
3 changed files with 22 additions and 7 deletions

View File

@@ -9,6 +9,8 @@
#include "polyMFEMUtils.h"
#include "polyCoeff.h"
#include "warning_control.h"
// TODO: Come back to this and think of a better way to get the mesh file
const std::string SPHERICAL_MESH = std::string(getenv("MESON_SOURCE_ROOT")) + "/src/resources/mesh/sphere.msh";
@@ -111,10 +113,11 @@ void PolySolver::solve(){
// --- Extract the Solution ---
mfem::Vector u_sol_view(U.GetData(), lambdaDofOffset);
#pragma GCC diagnostic push // MFEM is using deprecated functions, I cant do anything about it so I will ignore the warning
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
u->SetData(u_sol_view);
#pragma GCC diagnostic pop
DEPRECATION_WARNING_OFF // DISABLE DEPRECATION WARNING
u->SetData(u_sol_view);
DEPRECATION_WARNING_ON // REENABLE DEPRECATION WARNING
double lambda = U[lambdaDofOffset];
std::cout << "λ = " << lambda << std::endl;