MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / GetCenter

Function GetCenter

Diagnostics/Sedov/main.cpp:457–469  ·  view source on GitHub ↗

Get the center from the job info file and return as a Real Vector

Source from the content-addressed store, hash-verified

455
456// Get the center from the job info file and return as a Real Vector
457Vector<Real> GetCenter (const std::string pltfile) {
458 auto center_str = GetVarFromJobInfo(pltfile, "center");
459
460 // split string
461 std::istringstream iss {center_str};
462 Vector<Real> center;
463
464 std::string s;
465 while (std::getline(iss, s, ','))
466 center.push_back(stod(s));
467
468 return center;
469}
470
471//
472// Print usage info

Callers 1

mainFunction · 0.70

Calls 1

GetVarFromJobInfoFunction · 0.70

Tested by

no test coverage detected