Nektar++
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().

10 {
11  if(argc != 2)
12  {
13  fprintf(stderr,"Usage: ExtractMultiFileInfo file.fld \n" );
14  exit(1);
15  }
16 
17  //default meshgraph
19 
20  //----------------------------------------------
21  // Import fieldfile.
22  string fieldfile(argv[argc-1]);
23  vector<LibUtilities::FieldDefinitionsSharedPtr> fielddef;
24  vector<vector<NekDouble> > fielddata;
25  LibUtilities::Import(fieldfile,fielddef,fielddata);
26 
27  //----------------------------------------------
28 
29  cout << "<MultipleFldFiles FileName=\"" << fieldfile << "\" >";
30 
31  cout << fielddef[0]->m_elementIDs[0];
32 
33  for(int f = 0; f < fielddef.size(); ++f)
34  {
35  for(int i = 1; i < fielddef[f]->m_elementIDs.size(); ++i)
36  {
37  cout << "," <<fielddef[f]->m_elementIDs[i];
38  }
39  }
40  cout << "<\\MultipleFldFiles>" << endl;
41  return 0;
42 }
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > ElementiDs)
Imports an FLD file.
Definition: FieldIO.cpp:106
Base class for a spectral/hp element mesh.
Definition: MeshGraph.h:183