fix(poly): have a much closer to working polytrope, still small divergence near core
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
eos:
|
eos:
|
||||||
helm: "eos/helm_table.dat"
|
helm: "eos/helm_table.dat"
|
||||||
mesh:
|
mesh:
|
||||||
polySphere: "mesh/core.msh"
|
polySphere: "mesh/core2.msh"
|
||||||
|
|||||||
Binary file not shown.
BIN
assets/dynamic/mesh/core2.msh
Normal file
BIN
assets/dynamic/mesh/core2.msh
Normal file
Binary file not shown.
@@ -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_)
|
PolySolver::PolySolver(double n, double order, mfem::Mesh& mesh_)
|
||||||
: logger(logManager.getLogger("log")),
|
: logger(logManager.getLogger("log")),
|
||||||
n(n),
|
n(n),
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <set>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "quill/LogMacros.h"
|
#include "quill/LogMacros.h"
|
||||||
|
|
||||||
@@ -264,16 +266,19 @@ namespace polyMFEMUtils {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConstraintIntegrator::AssembleElementMatrix(const mfem::FiniteElement &el, mfem::ElementTransformation &Trans, mfem::DenseMatrix &elmat) {
|
void ConstraintIntegrator::AssembleElementMatrix(const mfem::FiniteElement &el, mfem::ElementTransformation &Trans, mfem::DenseMatrix &elmat) {
|
||||||
int elemID = Trans.ElementNo;
|
int elemID = Trans.ElementNo;
|
||||||
|
|
||||||
// -- Check if the element is connected to the origin vertex --
|
// -- Check if the element is connected to the origin vertex --
|
||||||
int checkID = m_originConnectedElementIds.Find(elemID);
|
bool isConnected = m_originConnectedElementIds.Find(elemID) != -1 ? true : false;
|
||||||
if (checkID == -1) {
|
|
||||||
|
if (!isConnected) {
|
||||||
elmat = 0.0;
|
elmat = 0.0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// -- Compute the derivitives using MFEM's build in shape routines --
|
// -- Compute the derivitives using MFEM's build in shape routines --
|
||||||
|
|
||||||
int numDoF = el.GetDof();
|
int numDoF = el.GetDof();
|
||||||
@@ -312,7 +317,7 @@ namespace polyMFEMUtils {
|
|||||||
for (int dimID = 0; dimID < dim; dimID++) {
|
for (int dimID = 0; dimID < dim; dimID++) {
|
||||||
dotProduct += dshapePhysical(i, dimID) * dshapePhysical(j, dimID);
|
dotProduct += dshapePhysical(i, dimID) * dshapePhysical(j, dimID);
|
||||||
}
|
}
|
||||||
elmat(i, j) += m_gamma * dotProduct;
|
elmat(i, j) += m_gamma * dotProduct;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "probe.h"
|
#include "probe.h"
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ Debug: true
|
|||||||
Probe:
|
Probe:
|
||||||
GLVis:
|
GLVis:
|
||||||
Visualization: true
|
Visualization: true
|
||||||
# Host: "10.8.0.14"
|
Host: "10.28.92.45"
|
||||||
Host: "localhost"
|
# Host: "localhost"
|
||||||
Port: 19916
|
Port: 19916
|
||||||
DefaultKeyset: "iimmMMc"
|
DefaultKeyset: "iimmMcaa"
|
||||||
GetRaySolution:
|
GetRaySolution:
|
||||||
MakeDir: true
|
MakeDir: true
|
||||||
Poly:
|
Poly:
|
||||||
@@ -23,7 +23,7 @@ Poly:
|
|||||||
AbsTol: 1.0e-10
|
AbsTol: 1.0e-10
|
||||||
PrintLevel: 1
|
PrintLevel: 1
|
||||||
Constraint:
|
Constraint:
|
||||||
Gamma: 1e4
|
Gamma: 1e2
|
||||||
Output:
|
Output:
|
||||||
1D:
|
1D:
|
||||||
Save: true
|
Save: true
|
||||||
|
|||||||
Reference in New Issue
Block a user