Commit 0e7d742c authored by Spencer Sherwin's avatar Spencer Sherwin

Merge branch 'ticket/53-avg_hdf5' into 'master'

Fix FilterFieldConvert for Hdf5 output

Closes #53

See merge request !781
parents 900acb8b 90f4c308
......@@ -24,6 +24,7 @@ v4.4.1
- Fix interpolation issue with Lagrange basis functions (!768)
- Fix issue with average fields not working with different polynomial order
fields (!776)
- Fix Hdf5 output in FilterFieldConvert (!781)
**FieldConvert:**
- Fix issue with field ordering in the interppointdatatofld module (!754)
......
......@@ -69,12 +69,30 @@ void OutputFld::Process(po::variables_map &vm)
// Extract the output filename and extension
string filename = m_config["outfile"].as<string>();
// Get IO format
std::string iofmt("Xml");
if(m_f->m_session)
{
if (m_f->m_session->DefinesSolverInfo("IOFormat"))
{
iofmt = m_f->m_session->GetSolverInfo("IOFormat");
}
if (m_f->m_session->DefinesCmdLineArgument("io-format"))
{
iofmt =
m_f->m_session->GetCmdLineArgument<std::string>("io-format");
}
}
if(m_config["format"].m_beenSet)
{
iofmt = m_config["format"].as<string>();
}
// Set up communicator and FieldIO object.
LibUtilities::CommSharedPtr c = m_f->m_session ? m_f->m_session->GetComm() :
LibUtilities::GetCommFactory().CreateInstance("Serial", 0, 0);
LibUtilities::FieldIOSharedPtr fld =
LibUtilities::GetFieldIOFactory().CreateInstance(
m_config["format"].as<string>(), c, true);
LibUtilities::GetFieldIOFactory().CreateInstance(iofmt, c, true);
if (m_f->m_writeBndFld)
{
......
......@@ -149,6 +149,10 @@ FilterFieldConvert::FilterFieldConvert(
modcmds.push_back(m_outputFile);
// Create modules
CreateModules(modcmds);
// Strip options from m_outputFile
vector<string> tmp;
boost::split(tmp, m_outputFile, boost::is_any_of(":"));
m_outputFile = tmp[0];
}
FilterFieldConvert::~FilterFieldConvert()
......
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