/[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 774 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 775 by ksteube, Mon Jul 10 04:00:08 2006 UTC
# Line 443  DataTagged::extractData(ifstream& archiv Line 443  DataTagged::extractData(ifstream& archiv
443    return(m_data.extractData(archiveFile, noValues));    return(m_data.extractData(archiveFile, noValues));
444  }  }
445  void  void
446    DataTagged::symmetric(DataAbstract* ev)
447    {
448      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
449      if (temp_ev==0) {
450        throw DataException("Error - DataTagged::symmetric casting to DataTagged failed (probably a programming error).");
451      }
452      const DataTagged::DataMapType& thisLookup=getTagLookup();
453      DataTagged::DataMapType::const_iterator i;
454      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
455      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
456          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
457          DataArrayView thisView=getDataPointByTag(i->first);
458          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
459          DataArrayView::symmetric(thisView,0,evView,0);
460      }
461      DataArrayView::symmetric(getDefaultValue(),0,temp_ev->getDefaultValue(),0);
462    }
463    void
464    DataTagged::nonsymmetric(DataAbstract* ev)
465    {
466      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
467      if (temp_ev==0) {
468        throw DataException("Error - DataTagged::nonsymmetric casting to DataTagged failed (probably a programming error).");
469      }
470      const DataTagged::DataMapType& thisLookup=getTagLookup();
471      DataTagged::DataMapType::const_iterator i;
472      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
473      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
474          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
475          DataArrayView thisView=getDataPointByTag(i->first);
476          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
477          DataArrayView::nonsymmetric(thisView,0,evView,0);
478      }
479      DataArrayView::nonsymmetric(getDefaultValue(),0,temp_ev->getDefaultValue(),0);
480    }
481    void
482    DataTagged::matrixtrace(DataAbstract* ev, int axis_offset)
483    {
484      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
485      if (temp_ev==0) {
486        throw DataException("Error - DataTagged::matrixtrace casting to DataTagged failed (probably a programming error).");
487      }
488      const DataTagged::DataMapType& thisLookup=getTagLookup();
489      DataTagged::DataMapType::const_iterator i;
490      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
491      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
492          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
493          DataArrayView thisView=getDataPointByTag(i->first);
494          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
495          DataArrayView::matrixtrace(thisView,0,evView,0, axis_offset);
496      }
497      DataArrayView::matrixtrace(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);
498    }
499    void
500    DataTagged::transpose(DataAbstract* ev, int axis_offset)
501    {
502      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
503      if (temp_ev==0) {
504        throw DataException("Error - DataTagged::transpose casting to DataTagged failed (probably a programming error).");
505      }
506      const DataTagged::DataMapType& thisLookup=getTagLookup();
507      DataTagged::DataMapType::const_iterator i;
508      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
509      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
510          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
511          DataArrayView thisView=getDataPointByTag(i->first);
512          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
513          DataArrayView::transpose(thisView,0,evView,0, axis_offset);
514      }
515      DataArrayView::transpose(getDefaultValue(),0,temp_ev->getDefaultValue(),0,axis_offset);
516    }
517    void
518  DataTagged::eigenvalues(DataAbstract* ev)  DataTagged::eigenvalues(DataAbstract* ev)
519  {  {
520    DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);    DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);

Legend:
Removed from v.774  
changed lines
  Added in v.775

  ViewVC Help
Powered by ViewVC 1.1.26