Commit 0e69efe9 authored by Douglas Serson's avatar Douglas Serson

Merge branch 'feature/FieldConvert_multiple_output' into 'master'

Enabling more than one output from the FieldConvert

See merge request !844
parents 63323b63 b44198cd
......@@ -34,6 +34,7 @@ v5.0.0
- Add input module for Semtex field files (!777)
- Fixed interppoints module (!760)
- Move StreamFunction utility to a FieldConvert module (!809)
- Enable output to multiple files (!844)
**Documentation**:
- Added the developer-guide repository as a submodule (!751)
......
......@@ -219,6 +219,8 @@ void OutputFileBase::Process(po::variables_map &vm)
}
}
}
// Restore m_exp
exp.swap(m_f->m_exp);
}
else
{
......
......@@ -284,7 +284,13 @@ int main(int argc, char* argv[])
if (i < nInput || i == modcmds.size() - 1)
{
//assume all modules are input unless last, or specified to be :out
module.first = (i < nInput ? eInputModule : eOutputModule);
if (tmp1.size() > 1 && tmp1.back()=="out")
{
module.first = eOutputModule;
tmp1.pop_back();
}
// If no colon detected, automatically detect mesh type from
// file extension. Otherwise override and use tmp1[1] as the
......@@ -299,7 +305,7 @@ int main(int argc, char* argv[])
// with input files.
string guess;
if (i < nInput)
if (module.first == eInputModule)
{
guess = InputModule::GuessFormat(tmp1[0]);
}
......@@ -329,15 +335,15 @@ int main(int argc, char* argv[])
}
module.second = ext;
tmp1.push_back(string(i < nInput ? "infile=" :
tmp1.push_back(string(module.first == eInputModule ? "infile=" :
"outfile=") +tmp1[0]);
}
}
else
{
module.second = tmp1[1];
tmp1.push_back(string(i < nInput ? "infile=" : "outfile=")
+tmp1[0]);
tmp1.push_back(string(module.first == eInputModule ? "infile=" : "outfile=")
+ tmp1[0]);
offset++;
}
}
......@@ -351,7 +357,7 @@ int main(int argc, char* argv[])
mod = GetModuleFactory().CreateInstance(module, f);
modules.push_back(mod);
if (i < nInput)
if (module.first == eInputModule)
{
inputModule = std::dynamic_pointer_cast<InputModule>(mod);
inputModule->AddFile(module.second, tmp1[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment