experiment: inspect surface carrier and isolate closure bound crossing
This commit is contained in:
@@ -28,7 +28,7 @@ struct Options {
|
||||
double n = 1., angularMomentum = 0., atol = 0., rtol = 1e-8, linearTolerance = .03;
|
||||
int maxNewton = 12, maxLinear = 200, restart = 40, probeRestart = 40;
|
||||
bool probes = false, noCentral = false;
|
||||
bool pressureProbe = false, shapeCurvature = false;
|
||||
bool pressureProbe = false, shapeCurvature = false, surfaceTrace = false;
|
||||
std::vector<int> captureIterations;
|
||||
std::string mesh = "sandbox.smesh";
|
||||
std::filesystem::path output, probeState, probeDirection, replayCandidate;
|
||||
@@ -74,6 +74,8 @@ Options Parse(int argc, char **argv) {
|
||||
o.pressureProbe = true;
|
||||
else if (a == "--shape-curvature")
|
||||
o.shapeCurvature = true;
|
||||
else if (a == "--surface-trace")
|
||||
o.surfaceTrace = true;
|
||||
else if (a == "--probes")
|
||||
o.probes = true;
|
||||
else if (a == "--no-central")
|
||||
@@ -98,7 +100,7 @@ Options Parse(int argc, char **argv) {
|
||||
throw std::invalid_argument("Invalid options");
|
||||
if (o.probeRestart != 40 && o.probeRestart != 160)
|
||||
throw std::invalid_argument("--probe-restart must be 40 or 160");
|
||||
if ((o.pressureProbe || o.shapeCurvature) && (o.probeState.empty() || o.probeDirection.empty()))
|
||||
if ((o.pressureProbe || o.shapeCurvature || o.surfaceTrace) && (o.probeState.empty() || o.probeDirection.empty()))
|
||||
throw std::invalid_argument("Focused probes require --probe-state and --probe-direction");
|
||||
if ((!o.probeDirection.empty() || !o.replayCandidate.empty()) && o.probeState.empty())
|
||||
throw std::invalid_argument("A supplied direction or candidate requires --probe-state");
|
||||
@@ -225,6 +227,8 @@ void FocusedProbes(State &s, const fem::FEM &f, const Options &o, const mfem::Ve
|
||||
for (const auto &[key, value] : experiment::plateau_diagnostics::MeasureEnthalpyStep(s, f, o.n, &physicalBase))
|
||||
bounds << key << ',' << value << '\n';
|
||||
bounds.flush();
|
||||
if (o.surfaceTrace)
|
||||
experiment::plateau_diagnostics::ProbeSurfaceTrace(s, f, o.n, base, direction, o.output);
|
||||
if (o.pressureProbe)
|
||||
experiment::plateau_diagnostics::ProbePressureObstruction(s, f, o.n, base, direction, o.output);
|
||||
if (o.shapeCurvature)
|
||||
@@ -363,7 +367,8 @@ template <class Context> int RunContext(Context &context, const Options &o, cons
|
||||
metadata << "probe_direction=" << o.probeDirection << '\n';
|
||||
if (!o.replayCandidate.empty())
|
||||
metadata << "replay_candidate=" << o.replayCandidate << '\n';
|
||||
metadata << "pressure_probe=" << o.pressureProbe << "\nshape_curvature=" << o.shapeCurvature << '\n';
|
||||
metadata << "pressure_probe=" << o.pressureProbe << "\nshape_curvature=" << o.shapeCurvature
|
||||
<< "\nsurface_trace=" << o.surfaceTrace << '\n';
|
||||
metadata.flush();
|
||||
solver::detail::StellarEquilibriumContextDiagnostics::WithState(context, [&](auto &s, const fem::FEM &f) {
|
||||
const auto snapshot = LoadVector(o.probeState, s.AcceptedPhysicalState().Size());
|
||||
|
||||
Reference in New Issue
Block a user