24 std::regex pattern(
"\\{([a-zA-Z0-9_\\.]+)(\\s*,\\s*\"([^\"]*)\")?\\}");
27 auto matches_begin = std::sregex_iterator(input.begin(), input.end(), pattern);
28 auto matches_end = std::sregex_iterator();
31 for (std::sregex_iterator i = matches_begin; i != matches_end; ++i)
33 std::smatch match = *i;
34 std::string variable_name = match[1].str();
35 std::string formatting_string = match[3].str();
37 if (!formatting_string.empty()) {
40 std::vector<std::string> variable_value;
41 pp.
queryarr(variable_name.c_str(),variable_value);
51 if (!
t)
t = std::time(0);
52 std::tm * now = std::localtime(&
t);
53 int year = now->tm_year+1900;
54 int month = now->tm_mon+1;
55 int day = now->tm_mday;
56 int hour = now->tm_hour;
57 int minute = now->tm_min;
58 int second = now->tm_sec;
59 int microsecond = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count() % 1000000;
66 std::string _Y = ss.str();
71 ss << std::setfill(
'0') << std::setw(2) << month;
72 std::string _m = ss.str();
77 ss << std::setfill(
'0') << std::setw(2) << day;
78 std::string _d = ss.str();
83 ss << std::setfill(
'0') << std::setw(2) << hour;
84 std::string _H = ss.str();
89 ss << std::setfill(
'0') << std::setw(2) << minute;
90 std::string _M = ss.str();
95 ss << std::setfill(
'0') << std::setw(2) << second;
96 std::string _S = ss.str();
103 std::string _f = ss.str();
108 ss << AMREX_SPACEDIM;
109 std::string _D = ss.str();
125 amrex::ParallelDescriptor::Bcast(cstr.data(), cstr.size(), amrex::ParallelDescriptor::IOProcessorNumber(), MPI_COMM_WORLD);
126 filename = std::string(cstr.begin(),cstr.end());