26 const int nin_field = v.
nin();
27 const int nex_field = v.
nex();
32 if ((nin_file == 0) || (nex_file == 0)) {
39 vout.
detailed(
m_vl,
"%s: file format: nin=%d, nex=%d, Lvol=%ld\n", __func__, nin_file, nex_file, Lvol);
40 vout.
detailed(
m_vl,
"%s: field format: nin=%d, nex=%d, Lvol=%ld\n", __func__, nin_field, nex_field, v.
nvol());
48 vtmp.
reset(nin_field, Lvol, nex_field);
50 std::fstream config(filename.c_str(), std::ios::in);
51 if (!config.is_open()) {
52 vout.
crucial(
m_vl,
"Error at %s: file open error: %s may not exist.\n", __func__, filename.c_str());
58 for (
int j = 0; j < nex_file; ++j) {
59 for (long_t isite = 0; isite < Lvol; ++isite) {
60 for (
int i = 0; i < nin_file; ++i) {
80 vtmp.
set(s, isite, t, val);
90 vout.
crucial(
m_vl,
"Warning at %s: file size larger than expected.\n", __func__);
106 const int nin_field = v.
nin();
107 const int nex_field = v.
nex();
112 if ((nin_file == 0) || (nex_file == 0)) {
113 nin_file = nin_field;
114 nex_file = nex_field;
119 vout.
detailed(
m_vl,
"%s: file format: nin=%d, nex=%d, Lvol=%ld\n", __func__, nin_file, nex_file, Lvol);
120 vout.
detailed(
m_vl,
"%s: field format: nin=%d, nex=%d, Lvol=%ld\n", __func__, nin_field, nex_field, v.
nvol());
125 vtmp.
reset(nin_field, Lvol, nex_field);
133 std::fstream config(filename.c_str(), std::ios::out);
134 if (!config.is_open()) {
135 vout.
crucial(
m_vl,
"Error at %s: file open error: %s\n", __func__, filename.c_str());
139 config.setf(std::ios_base::scientific, std::ios_base::floatfield);
140 config.precision(14);
144 for (
int j = 0; j < nex_file; ++j) {
145 for (long_t isite = 0; isite < Lvol; ++isite) {
146 for (
int i = 0; i < nin_file; ++i) {
149 val = vtmp.
cmp(s, isite, t);
150 config << val << std::endl;