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

Function GetCenter

Diagnostics/DustCollapse/main.cpp:348–360  ·  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

346
347// Get the center from the job info file and return as a Real Vector
348Vector<Real> GetCenter (const string pltfile) {
349 auto center_str = GetVarFromJobInfo(pltfile, "center");
350
351 // split string
352 std::istringstream iss {center_str};
353 Vector<Real> center;
354
355 std::string s;
356 while (std::getline(iss, s, ','))
357 center.push_back(stod(s));
358
359 return center;
360}

Callers 1

main.cppFile · 0.70

Calls 1

GetVarFromJobInfoFunction · 0.70

Tested by

no test coverage detected