Back to index

salome-med  6.5.0
MEDMEMTest_Extractor.cxx File Reference
#include "MEDMEMTest.hxx"
#include "MEDMEM_Extractor.hxx"
#include "MEDMEM_Meshing.hxx"
#include <cppunit/TestAssert.h>

Go to the source code of this file.


static void test_extractLine (Extractor *extractor, const double *coords, const double *direction, int nbSegments, const char *name, const string &result_file)
 test extractLine()

Function Documentation

static void test_extractLine ( Extractor *  extractor,
const double *  coords,
const double *  direction,
int  nbSegments,
const char *  name,
const string &  result_file 
) [static]

test extractLine()

Definition at line 40 of file MEDMEMTest_Extractor.cxx.

  FIELD<double>* resField =0;
  CPPUNIT_ASSERT_NO_THROW( resField = extractor->extractLine(coords,direction));
  CPPUNIT_ASSERT( bool( resField ) == bool( nbSegments > 0 ));

  // store extracted field
  if ( resField )
      const GMESH* mesh = resField->getSupport()->getMesh();
      mesh->write( MED_DRIVER, result_file, name );
      resField->write(MED_DRIVER, result_file );

      CPPUNIT_ASSERT_EQUAL( nbSegments, resField->getSupport()->getNumberOfElements(MED_ALL_ELEMENTS));
      CPPUNIT_ASSERT_EQUAL( nbSegments+1, resField->getSupport()->getMesh()->getNumberOfNodes());

Here is the call graph for this function: