Back to index

salome-med  6.5.0
Functions
MESHgeneral.cxx File Reference
#include "MEDMEM_Mesh.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 28 of file MESHgeneral.cxx.

                                  {

  const string MedFile = "pointe.med" ;
  const string MeshName = "maa1" ;
  
  // create a MESH object by reading it on file :
  MESH myMesh(MED_DRIVER,MedFile,MeshName) ;

  string Name = myMesh.getName() ;
  if (Name != MeshName) {
    cout << "Error when reading mesh name : We ask for mesh #"
         << MeshName <<"# and we get mesh #"<< Name <<"#"<< endl << endl ;
    return -1;
  }

  cout << "Mesh name : " << Name  << endl << endl ; 

  int SpaceDimension = myMesh.getSpaceDimension() ;
  int MeshDimension = myMesh.getMeshDimension() ;
  
  cout << "Space Dimension : " << SpaceDimension << endl << endl ; 
  cout << "Mesh Dimension : " << MeshDimension << endl << endl ; 

  return 0 ;
}