Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 10 of file ExtractMultiFldFileInfo.cpp.

References Nektar::LibUtilities::Import().

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