Commit 312cc844 authored by Douglas Serson's avatar Douglas Serson

Adjust expansion from file to Hdf5

parent 67ed2eb6
......@@ -298,10 +298,20 @@ namespace Nektar
"A filename must be specified for the FILE "
"attribute of expansion");
// Create fieldIO object to load file
// need a serial communicator to avoid problems with
// shared file system
CommSharedPtr comm=
GetCommFactory().CreateInstance("Serial", 0, 0);
std::string iofmt = FieldIO::GetFileType(
filenameStr, comm);
FieldIOSharedPtr f = GetFieldIOFactory().CreateInstance(
iofmt,
comm,
pSession->GetSharedFilesystem());
// Load field definitions from file
std::vector<LibUtilities::FieldDefinitionsSharedPtr> fielddefs;
LibUtilities::FieldIO f(pSession->GetComm());
f.Import(filenameStr, fielddefs);
f->Import(filenameStr, fielddefs);
// Parse field definitions
for (int i = 0; i < fielddefs.size(); ++i)
......
......@@ -1067,8 +1067,10 @@ namespace Nektar
"attribute of expansion");
std::vector<LibUtilities::FieldDefinitionsSharedPtr> fielddefs;
LibUtilities::FieldIO f(m_session->GetComm());
f.Import(filenameStr, fielddefs);
LibUtilities::FieldIOSharedPtr f =
LibUtilities::FieldIO::CreateForFile(
m_session, filenameStr);
f->Import(filenameStr, fielddefs);
SetExpansions(fielddefs);
}
else
......
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