/[escript]/trunk/escript/src/DataTagged.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataTagged.cpp

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

revision 800 by gross, Tue Aug 8 11:23:18 2006 UTC revision 804 by gross, Thu Aug 10 01:12:16 2006 UTC
# Line 517  DataTagged::transpose(DataAbstract* ev, Line 517  DataTagged::transpose(DataAbstract* ev,
517  }  }
518    
519  void  void
520  DataTagged::swap(DataAbstract* ev, int axis_offset)  DataTagged::swapaxes(DataAbstract* ev, int axis0, int axis1)
521  {  {
522    DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);    DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
523    if (temp_ev==0) {    if (temp_ev==0) {
524      throw DataException("Error - DataTagged::swap casting to DataTagged failed (probably a programming error).");      throw DataException("Error - DataTagged::swapaxes casting to DataTagged failed (probably a programming error).");
525    }    }
526    const DataTagged::DataMapType& thisLookup=getTagLookup();    const DataTagged::DataMapType& thisLookup=getTagLookup();
527    DataTagged::DataMapType::const_iterator i;    DataTagged::DataMapType::const_iterator i;
# Line 530  DataTagged::swap(DataAbstract* ev, int a Line 530  DataTagged::swap(DataAbstract* ev, int a
530        temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());        temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
531        DataArrayView thisView=getDataPointByTag(i->first);        DataArrayView thisView=getDataPointByTag(i->first);
532        DataArrayView evView=temp_ev->getDataPointByTag(i->first);        DataArrayView evView=temp_ev->getDataPointByTag(i->first);
533        DataArrayView::swap(thisView,0,evView,0, axis_offset);        DataArrayView::swapaxes(thisView,0,evView,0,axis0,axis1);
534    }    }
535    DataArrayView::swap(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);    DataArrayView::swapaxes(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis0,axis1);
536  }  }
537    
538  void  void

Legend:
Removed from v.800  
changed lines
  Added in v.804

  ViewVC Help
Powered by ViewVC 1.1.26