Back to index

salome-med  6.5.0
Classes | Namespaces | Functions
PerfTest.cxx File Reference

Test program which takes two meshes and calculates their intersection matrix. More...

#include "Interpolation3D.hxx"
#include "Interpolation3D.txx"
#include "MeshTestToolkit.txx"
#include "Log.hxx"
#include "VectorUtils.hxx"
#include "TestInterpKernelUtils.hxx"
#include "MEDMEM_Mesh.hxx"
#include "MEDNormalizedUnstructuredMesh.hxx"
#include <cassert>
#include <string>

Go to the source code of this file.

Classes

class  INTERP_TEST::PerfTestToolkit
 Specialization of MeshTestToolkit for the purposes of performance testing. More...

Namespaces

namespace  INTERP_TEST

Functions

int main (int argc, char **argv)
 Main method of the program.

Detailed Description

Test program which takes two meshes and calculates their intersection matrix.

USAGE : PerfTest mesh1 mesh2 where mesh1 and mesh2 are the names of two meshes located in the files mesh1.med, mesh2.med in {$MED_ROOT_DIR}/share/salome/resources/med/

Definition in file PerfTest.cxx.


Function Documentation

int main ( int  argc,
char **  argv 
)

Main method of the program.

Intersects the meshes and outputs some information about the calculation as well as the intersection matrix on std::cout.

Parameters:
argcnumber of arguments given to the program (should be 3, the user giving 2 mesh names)
argvvector to the arguments as strings.

Definition at line 133 of file PerfTest.cxx.

{
  using INTERP_TEST::PerfTestToolkit;

  assert(argc == 3);
  
  // load meshes
  const string mesh1 = argv[1];
  const string mesh2 = argv[2];

  const string mesh1path = mesh1 + ".med";
  const string mesh2path = mesh2 + ".med";

  IntersectionMatrix m;

  PerfTestToolkit testTools;

  testTools.calcIntersectionMatrix(mesh1path.c_str(), mesh1.c_str(), mesh2path.c_str(), mesh2.c_str(), m);

  testTools.dumpIntersectionMatrix(m);
    
  return 0;

}