Zoltan2
Toggle main menu visibility
Loading...
Searching...
No Matches
Zoltan2_IO.cpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Zoltan2: A package of combinatorial algorithms for scientific computing
4
//
5
// Copyright 2012 NTESS and the Zoltan2 contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
15
16
#include <
Zoltan2_IO.hpp
>
17
18
namespace
Zoltan2
{
19
20
void
addNumberToFileName
(
int
number, std::string fname, std::string &newf)
21
{
22
std::ostringstream id;
23
id
<<
"_"
;
24
id
.width(6);
25
id
.fill(
'0'
);
26
id
<< number;
27
28
std::ostringstream localFileName;
29
std::string::size_type loc = fname.find(
'.'
);
30
31
if
(loc == std::string::npos)
32
localFileName << fname <<
id
.str();
33
else
34
localFileName << fname.substr(0, loc) <<
id
.str() << fname.substr(loc);
35
36
newf = localFileName.str();
37
}
38
39
}
// namespace Zoltan2
40
Zoltan2_IO.hpp
Declaration of methods to assist in file input/output.
Zoltan2
Created by mbenlioglu on Aug 31, 2020.
Definition
Zoltan2_AlgHybrid2GL.hpp:47
Zoltan2::addNumberToFileName
void addNumberToFileName(int number, std::string fname, std::string &newf)
Helper method to add number to a file name.
Definition
Zoltan2_IO.cpp:20
core
src
util
Zoltan2_IO.cpp
Generated by
1.17.0