/[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 541 by jgs, Mon Feb 20 06:50:39 2006 UTC revision 594 by gross, Tue Mar 14 23:36:08 2006 UTC
# Line 421  DataTagged::extractData(ifstream& archiv Line 421  DataTagged::extractData(ifstream& archiv
421  {  {
422    return(m_data.extractData(archiveFile, noValues));    return(m_data.extractData(archiveFile, noValues));
423  }  }
424    void
425    DataTagged::eigenvalues(DataAbstract* ev)
426    {
427      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
428      if (temp_ev==0) {
429        throw DataException("Error - DataTagged::eigenvalues casting to DataTagged failed (propably a programming error).");
430      }
431      const DataTagged::DataMapType& thisLookup=getTagLookup();
432      DataTagged::DataMapType::const_iterator i;
433      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
434      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
435          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
436          DataArrayView thisView=getDataPointByTag(i->first);
437          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
438          DataArrayView::eigenvalues(thisView,0,evView,0);
439      }
440      DataArrayView::eigenvalues(getDefaultValue(),0,temp_ev->getDefaultValue(),0);
441    }
442    void
443    DataTagged::eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol)
444    {
445      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
446      if (temp_ev==0) {
447        throw DataException("Error - DataTagged::eigenvalues_and_eigenvectors casting to DataTagged failed (propably a programming error).");
448      }
449      DataTagged* temp_V=dynamic_cast<DataTagged*>(V);
450      if (temp_V==0) {
451        throw DataException("Error - DataTagged::eigenvalues_and_eigenvectors casting to DataTagged failed (propably a programming error).");
452      }
453      const DataTagged::DataMapType& thisLookup=getTagLookup();
454      DataTagged::DataMapType::const_iterator i;
455      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
456      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
457          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
458          temp_V->addTaggedValue(i->first,temp_V->getDefaultValue());
459          DataArrayView thisView=getDataPointByTag(i->first);
460          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
461          DataArrayView VView=temp_V->getDataPointByTag(i->first);
462          DataArrayView::eigenvalues_and_eigenvectors(thisView,0,evView,0,VView,0,tol);
463      }
464      DataArrayView::eigenvalues_and_eigenvectors(getDefaultValue(),0,
465                                                  temp_ev->getDefaultValue(),0,
466                                                  temp_V->getDefaultValue(),0,
467                                                  tol);
468    
469    
470    }
471    
472    
473  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.541  
changed lines
  Added in v.594

  ViewVC Help
Powered by ViewVC 1.1.26