diff --git a/assets/dynamic/index.yaml b/assets/dynamic/index.yaml index 97ee32f..d8326ad 100644 --- a/assets/dynamic/index.yaml +++ b/assets/dynamic/index.yaml @@ -1,4 +1,4 @@ eos: helm: "eos/helm_table.dat" mesh: - polySphere: "mesh/core.msh" \ No newline at end of file + polySphere: "mesh/core2.msh" diff --git a/assets/dynamic/mesh/core.msh b/assets/dynamic/mesh/core.msh index 28e3fd0..bda83cf 100644 Binary files a/assets/dynamic/mesh/core.msh and b/assets/dynamic/mesh/core.msh differ diff --git a/assets/dynamic/mesh/core2.msh b/assets/dynamic/mesh/core2.msh new file mode 100644 index 0000000..9967986 Binary files /dev/null and b/assets/dynamic/mesh/core2.msh differ diff --git a/src/poly/solver/private/polySolver.cpp b/src/poly/solver/private/polySolver.cpp index 3a73522..3e5f95a 100644 --- a/src/poly/solver/private/polySolver.cpp +++ b/src/poly/solver/private/polySolver.cpp @@ -63,9 +63,6 @@ namespace laneEmden { } } -// 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/core.msh"; - PolySolver::PolySolver(double n, double order, mfem::Mesh& mesh_) : logger(logManager.getLogger("log")), n(n), diff --git a/src/poly/utils/private/polyMFEMUtils.cpp b/src/poly/utils/private/polyMFEMUtils.cpp index 6c710b0..33f18b2 100644 --- a/src/poly/utils/private/polyMFEMUtils.cpp +++ b/src/poly/utils/private/polyMFEMUtils.cpp @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "quill/LogMacros.h" @@ -264,15 +266,18 @@ namespace polyMFEMUtils { } + void ConstraintIntegrator::AssembleElementMatrix(const mfem::FiniteElement &el, mfem::ElementTransformation &Trans, mfem::DenseMatrix &elmat) { int elemID = Trans.ElementNo; // -- Check if the element is connected to the origin vertex -- - int checkID = m_originConnectedElementIds.Find(elemID); - if (checkID == -1) { + bool isConnected = m_originConnectedElementIds.Find(elemID) != -1 ? true : false; + + if (!isConnected) { elmat = 0.0; return; } + // -- Compute the derivitives using MFEM's build in shape routines -- @@ -312,7 +317,7 @@ namespace polyMFEMUtils { for (int dimID = 0; dimID < dim; dimID++) { dotProduct += dshapePhysical(i, dimID) * dshapePhysical(j, dimID); } - elmat(i, j) += m_gamma * dotProduct; + elmat(i, j) += m_gamma * dotProduct; } } } diff --git a/src/poly/utils/public/polyMFEMUtils.h b/src/poly/utils/public/polyMFEMUtils.h index ca176b9..d194d8a 100644 --- a/src/poly/utils/public/polyMFEMUtils.h +++ b/src/poly/utils/public/polyMFEMUtils.h @@ -26,6 +26,7 @@ #include #include "config.h" #include "probe.h" +#include diff --git a/tests/testsConfig.yaml b/tests/testsConfig.yaml index 5b420cc..0032269 100644 --- a/tests/testsConfig.yaml +++ b/tests/testsConfig.yaml @@ -3,10 +3,10 @@ Debug: true Probe: GLVis: Visualization: true - # Host: "10.8.0.14" - Host: "localhost" + Host: "10.28.92.45" + # Host: "localhost" Port: 19916 - DefaultKeyset: "iimmMMc" + DefaultKeyset: "iimmMcaa" GetRaySolution: MakeDir: true Poly: @@ -23,7 +23,7 @@ Poly: AbsTol: 1.0e-10 PrintLevel: 1 Constraint: - Gamma: 1e4 + Gamma: 1e2 Output: 1D: Save: true