unittests.cpp File Reference

#include "fquadratic.h"
#include "probefunction1d.h"
#include "unittests.h"
#include "numericmethods.h"
#include <fstream>
#include "constvelocitymodule.h"
#include "fcompoundvector.h"
#include "fplane.h"
#include "flashco2h2o.h"
#include "flashessential.h"
#include "flash.h"
#include "flashco2brine.h"
#include "units.h"
#include "flashsimpleblackoil.h"
Include dependency graph for unittests.cpp:

Go to the source code of this file.

Defines

#define TEST(EXP)

Functions

void testCellIndexInSequence (OrthoMesh &mesh)
void testFaceIndexInSequence (OrthoMesh &mesh)
void getValue (std::string str, double *d)

Define Documentation

#define TEST ( EXP   ) 
Value:
printf("Testing " #EXP ":");\
  if (EXP)\
    printf("...OK\n");\
  else\
  {printf("...ERROR\nQUITTING......\n");abort();}

Definition at line 16 of file unittests.cpp.


Function Documentation

void getValue ( std::string  str,
double *  d 
)

Definition at line 1162 of file unittests.cpp.

01163 {
01164   std::cout << str.c_str() << " ";
01165   std::cin  >> *d;
01166 
01167 }

void testCellIndexInSequence ( OrthoMesh mesh  ) 

Definition at line 302 of file unittests.cpp.

00303 {
00304   OrthoMesh::Cell_It cell = mesh.begin_cell();
00305   OrthoMesh::Cell_It endc = mesh.end_cell();
00306   unsigned index=0;
00307   printf("Testing Cell Indices continuity...");
00308   for (;cell!=endc;cell++,index++)
00309   {
00310     if (cell->index() != index)
00311     {
00312       printf("Error:\nIndice is not continuous in cell %u\n",cell->index());
00313     }
00314   }
00315   printf("Ok.\n");
00316 }

void testFaceIndexInSequence ( OrthoMesh mesh  ) 

Definition at line 319 of file unittests.cpp.

00320 {
00321   OrthoMesh::Face_It cell = mesh.begin_face();
00322   OrthoMesh::Face_It endc = mesh.end_face();
00323   unsigned index=0;
00324   printf("Testing Face Indices continuity...");
00325   for (;cell!=endc;cell++,index++)
00326   {
00327     if (cell->index() != index)
00328     {
00329       printf("Error:\nIndice is not continuous in face %u\n",cell->index());
00330     }
00331   }
00332   printf("Ok.\n");
00333 }

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:12:52 2012 for CO2INJECTION by  doxygen 1.6.3