Back to index

salome-med  6.5.0
Functions
test_MEDMEM_PolyDriverMedMeshRead.cxx File Reference
#include "MEDMEM_define.hxx"
#include "MEDMEM_Mesh.hxx"
#include "MEDMEM_MedMeshDriver.hxx"

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 30 of file test_MEDMEM_PolyDriverMedMeshRead.cxx.

{
  if (argc <3) // after 3, ignored !
    {
      cerr << "Usage : " << argv[0] 
           << " filename meshname" << endl << endl;
      exit(-1);
    }

  string filename = argv[1];
  string meshname = argv[2];

  MESH * myMesh = new MESH;
  myMesh->setName(meshname);
  MED_MESH_RDONLY_DRIVER myMeshReadDriver(filename,myMesh);
  myMeshReadDriver.setMeshName(meshname);
  myMeshReadDriver.open();
  myMeshReadDriver.read();
  myMeshReadDriver.close();

  cout << * myMesh << endl;

  myMesh->removeReference();
  return 0;
}