/[escript]/trunk/escript/test/DataTaggedTestCase.cpp
ViewVC logotype

Diff of /trunk/escript/test/DataTaggedTestCase.cpp

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

revision 518 by jgs, Tue Feb 14 05:18:09 2006 UTC revision 524 by jgs, Tue Feb 14 05:55:46 2006 UTC
# Line 4003  void DataTaggedTestCase::testSetSlice() Line 4003  void DataTaggedTestCase::testSetSlice()
4003    
4004      // rank 1 slice      // rank 1 slice
4005    
4006      //viewShape.clear();      viewShape.clear();
4007      //viewShape.push_back(1);      viewShape.push_back(1);
4008    
4009      //DataArrayView::ValueType viewData3(1);      DataArrayView::ValueType viewData3(1);
4010      //for (int i=0;i<viewShape[0];i++) {      viewData3[0]=0.0;
4011      //  viewData3[i]=0.0;      DataArrayView myView3(viewData3,viewShape);
     //}  
     //DataArrayView myView3(viewData3,viewShape);  
4012    
4013      //DataTagged myData3(keys,values,myView3,FunctionSpace());      DataTagged myData3(keys,values,myView3,FunctionSpace());
4014    
4015      //region.clear();      region.clear();
4016      //region_element.first=0;      region_element.first=1;
4017      //region_element.second=1;      region_element.second=2;
4018      //region.push_back(region_element);      region.push_back(region_element);
4019    
4020      //cout << myData3.toString() << endl;      myData1.setSlice(&myData3, region);
4021    
4022      //myData3.setSlice(&myData2, region);      //cout << myData1.toString() << endl;
4023    
4024      //cout << myData3.toString() << endl;      assert(myData1.getTagLookup().size()==0);
4025    
4026        assert(myData1.getLength()==3);
4027    
4028        myDataView = myData1.getDefaultValue();
4029        assert(!myDataView.isEmpty());
4030        assert(myDataView.getOffset()==0);
4031        assert(myDataView.getRank()==1);
4032        assert(myDataView.noValues()==3);
4033        assert(myDataView.getShape().size()==1);
4034        assert(myDataView(0)==3.0);
4035        assert(myDataView(1)==0.0);
4036        assert(myDataView(2)==5.0);
4037    
4038      // scalar slice      // scalar slice
4039    

Legend:
Removed from v.518  
changed lines
  Added in v.524

  ViewVC Help
Powered by ViewVC 1.1.26