Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
ExtractMultiFldFileInfo.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <SpatialDomains/MeshGraph.h>
Include dependency graph for ExtractMultiFldFileInfo.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 9 of file ExtractMultiFldFileInfo.cpp.

References Nektar::LibUtilities::Import().

{
if(argc != 2)
{
fprintf(stderr,"Usage: ExtractMultiFileInfo file.fld \n" );
exit(1);
}
//default meshgraph
//----------------------------------------------
// Import fieldfile.
string fieldfile(argv[argc-1]);
vector<LibUtilities::FieldDefinitionsSharedPtr> fielddef;
vector<vector<NekDouble> > fielddata;
LibUtilities::Import(fieldfile,fielddef,fielddata);
//----------------------------------------------
cout << "<MultipleFldFiles FileName=\"" << fieldfile << "\" >";
cout << fielddef[0]->m_elementIDs[0];
for(int f = 0; f < fielddef.size(); ++f)
{
for(int i = 1; i < fielddef[f]->m_elementIDs.size(); ++i)
{
cout << "," <<fielddef[f]->m_elementIDs[i];
}
}
cout << "<\\MultipleFldFiles>" << endl;
return 0;
}