MCPcopy Create free account
hub / github.com/Kitware/VTK / GetRawFileName

Method GetRawFileName

IO/IOSS/vtkIOSSReaderInternal.h:245–263  ·  view source on GitHub ↗

* Useful for printing error messages etc. */

Source from the content-addressed store, hash-verified

243 * Useful for printing error messages etc.
244 */
245 std::string GetRawFileName(const DatabaseHandle& handle, bool shortname = false) const
246 {
247 auto iter = this->DatabaseNames.find(handle.first);
248 if (iter == this->DatabaseNames.end())
249 {
250 throw std::runtime_error("bad database handle!");
251 }
252
253 const int& fileid = handle.second;
254 auto dbasename = shortname ? vtksys::SystemTools::GetFilenameName(handle.first) : handle.first;
255
256 auto& dinfo = iter->second;
257 if (dinfo.ProcessCount > 0)
258 {
259 return Ioss::Utils::decode_filename(
260 dbasename, dinfo.ProcessCount, *std::next(dinfo.Ranks.begin(), fileid));
261 }
262 return dbasename;
263 }
264
265 /**
266 * For spatially partitioned files, this returns the partition identifier for

Callers 5

GetRegionMethod · 0.95
GetTopologyMethod · 0.95
GetGeometryMethod · 0.95
ReadMeshMethod · 0.80
ReadMeshMethod · 0.80

Calls 4

nextFunction · 0.50
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected