/[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 799 by ksteube, Mon Jul 10 04:00:08 2006 UTC revision 800 by gross, Tue Aug 8 11:23:18 2006 UTC
# Line 479  DataTagged::nonsymmetric(DataAbstract* e Line 479  DataTagged::nonsymmetric(DataAbstract* e
479    DataArrayView::nonsymmetric(getDefaultValue(),0,temp_ev->getDefaultValue(),0);    DataArrayView::nonsymmetric(getDefaultValue(),0,temp_ev->getDefaultValue(),0);
480  }  }
481  void  void
482  DataTagged::matrixtrace(DataAbstract* ev, int axis_offset)  DataTagged::trace(DataAbstract* ev, int axis_offset)
483  {  {
484    DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);    DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
485    if (temp_ev==0) {    if (temp_ev==0) {
486      throw DataException("Error - DataTagged::matrixtrace casting to DataTagged failed (probably a programming error).");      throw DataException("Error - DataTagged::trace casting to DataTagged failed (probably a programming error).");
487    }    }
488    const DataTagged::DataMapType& thisLookup=getTagLookup();    const DataTagged::DataMapType& thisLookup=getTagLookup();
489    DataTagged::DataMapType::const_iterator i;    DataTagged::DataMapType::const_iterator i;
# Line 492  DataTagged::matrixtrace(DataAbstract* ev Line 492  DataTagged::matrixtrace(DataAbstract* ev
492        temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());        temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
493        DataArrayView thisView=getDataPointByTag(i->first);        DataArrayView thisView=getDataPointByTag(i->first);
494        DataArrayView evView=temp_ev->getDataPointByTag(i->first);        DataArrayView evView=temp_ev->getDataPointByTag(i->first);
495        DataArrayView::matrixtrace(thisView,0,evView,0, axis_offset);        DataArrayView::trace(thisView,0,evView,0, axis_offset);
496    }    }
497    DataArrayView::matrixtrace(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);    DataArrayView::trace(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);
498  }  }
499    
500  void  void
501  DataTagged::transpose(DataAbstract* ev, int axis_offset)  DataTagged::transpose(DataAbstract* ev, int axis_offset)
502  {  {
# Line 514  DataTagged::transpose(DataAbstract* ev, Line 515  DataTagged::transpose(DataAbstract* ev,
515    }    }
516    DataArrayView::transpose(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);    DataArrayView::transpose(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);
517  }  }
518    
519    void
520    DataTagged::swap(DataAbstract* ev, int axis_offset)
521    {
522      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
523      if (temp_ev==0) {
524        throw DataException("Error - DataTagged::swap casting to DataTagged failed (probably a programming error).");
525      }
526      const DataTagged::DataMapType& thisLookup=getTagLookup();
527      DataTagged::DataMapType::const_iterator i;
528      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
529      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
530          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
531          DataArrayView thisView=getDataPointByTag(i->first);
532          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
533          DataArrayView::swap(thisView,0,evView,0, axis_offset);
534      }
535      DataArrayView::swap(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);
536    }
537    
538  void  void
539  DataTagged::eigenvalues(DataAbstract* ev)  DataTagged::eigenvalues(DataAbstract* ev)
540  {  {

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

  ViewVC Help
Powered by ViewVC 1.1.26