/[escript]/branches/arrexp_2137_win/escript/src/DataTagged.cpp
ViewVC logotype

Diff of /branches/arrexp_2137_win/escript/src/DataTagged.cpp

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

revision 579 by jgs, Mon Feb 20 06:50:39 2006 UTC revision 580 by gross, Wed Mar 8 05:45:51 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    cout << i->first << thisView(0,0) << "\n";
439          DataArrayView::eigenvalues(thisView,0,evView,0);
440      }
441      DataArrayView::eigenvalues(getDefaultValue(),0,temp_ev->getDefaultValue(),0);
442    }
443    void
444    DataTagged::eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol)
445    {
446      DataTagged* temp_ev=dynamic_cast<DataTagged*>(ev);
447      if (temp_ev==0) {
448        throw DataException("Error - DataTagged::eigenvalues_and_eigenvectors casting to DataTagged failed (propably a programming error).");
449      }
450      DataTagged* temp_V=dynamic_cast<DataTagged*>(V);
451      if (temp_V==0) {
452        throw DataException("Error - DataTagged::eigenvalues_and_eigenvectors casting to DataTagged failed (propably a programming error).");
453      }
454      const DataTagged::DataMapType& thisLookup=getTagLookup();
455      DataTagged::DataMapType::const_iterator i;
456      DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
457      for (i=thisLookup.begin();i!=thisLookupEnd;i++) {
458          temp_ev->addTaggedValue(i->first,temp_ev->getDefaultValue());
459          temp_V->addTaggedValue(i->first,temp_V->getDefaultValue());
460          DataArrayView thisView=getDataPointByTag(i->first);
461          DataArrayView evView=temp_ev->getDataPointByTag(i->first);
462          DataArrayView VView=temp_V->getDataPointByTag(i->first);
463          DataArrayView::eigenvalues_and_eigenvectors(thisView,0,evView,0,VView,0,tol);
464      }
465      DataArrayView::eigenvalues_and_eigenvectors(getDefaultValue(),0,
466                                                  temp_ev->getDefaultValue(),0,
467                                                  temp_V->getDefaultValue(),0,
468                                                  tol);
469    
470    
471    }
472    
473    
474  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.579  
changed lines
  Added in v.580

  ViewVC Help
Powered by ViewVC 1.1.26