/[escript]/branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/escript/test/DataArrayView/DataArrayViewTestCase.cpp revision 122 by jgs, Thu Jun 9 05:38:05 2005 UTC trunk/escript/test/DataArrayView/DataArrayViewTestCase.cpp revision 468 by jgs, Wed Jan 25 06:50:39 2006 UTC
# Line 14  Line 14 
14  #include "escript/Data/DataArray.h"  #include "escript/Data/DataArray.h"
15  #include "escript/Data/DataArrayView.h"  #include "escript/Data/DataArrayView.h"
16  #include "escript/Data/DataAlgorithm.h"  #include "escript/Data/DataAlgorithm.h"
17  #include "esysUtils/EsysException.h"  #include "EsysException.h"
18    
19  #include "DataArrayViewTestCase.h"  #include "DataArrayViewTestCase.h"
20    
# Line 2174  void DataArrayViewTestCase::testReductio Line 2174  void DataArrayViewTestCase::testReductio
2174        dataView()=p;        dataView()=p;
2175    
2176        // apply a reduction operation to this data point and check the results        // apply a reduction operation to this data point and check the results
2177        assert(dataView.reductionOp(DataAlgorithmAdapter<FMax>(numeric_limits<double>::max()*-1))==p);        FMax fmax_func;
2178          assert(dataView.reductionOp(fmax_func,numeric_limits<double>::max()*-1)==p);
2179    
2180        if (p<npoints-1) {        if (p<npoints-1) {
2181          dataView.incrOffset();          dataView.incrOffset();
# Line 2211  void DataArrayViewTestCase::testReductio Line 2212  void DataArrayViewTestCase::testReductio
2212        }        }
2213    
2214        // apply a reduction operation to this data point and check the results        // apply a reduction operation to this data point and check the results
2215        assert(dataView.reductionOp(DataAlgorithmAdapter<FMin>(numeric_limits<double>::max()))==dataView.index(0,0));        FMin fmin_func;
2216          assert(dataView.reductionOp(fmin_func,numeric_limits<double>::max())==dataView.index(0,0));
2217    
2218        if (p<npoints-1) {        if (p<npoints-1) {
2219          dataView.incrOffset();          dataView.incrOffset();
# Line 2254  void DataArrayViewTestCase::testReductio Line 2256  void DataArrayViewTestCase::testReductio
2256        }        }
2257    
2258        // apply a reduction operation to this data point and check the results        // apply a reduction operation to this data point and check the results
2259        assert(dataView.reductionOp(DataAlgorithmAdapter<AbsMax>(0))==dataView.index(8,7,4,10));        AbsMax absmax_func;
2260          assert(dataView.reductionOp(absmax_func,0)==dataView.index(8,7,4,10));
2261    
2262        if (p<npoints-1) {        if (p<npoints-1) {
2263          dataView.incrOffset();          dataView.incrOffset();

Legend:
Removed from v.122  
changed lines
  Added in v.468

  ViewVC Help
Powered by ViewVC 1.1.26