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

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

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

revision 480 by jgs, Wed Feb 1 05:15:12 2006 UTC revision 580 by gross, Wed Mar 8 05:45:51 2006 UTC
# Line 464  DataExpanded::copyAll(const boost::pytho Line 464  DataExpanded::copyAll(const boost::pytho
464      }      }
465    }    }
466  }  }
467    void
468    DataExpanded::eigenvalues(DataAbstract* ev)
469    {
470      int numSamples = getNumSamples();
471      int numDataPointsPerSample = getNumDPPSample();
472      DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
473      if (temp_ev==0) {
474        throw DataException("Error - DataExpanded::eigenvalues: casting to DataExpanded failed (propably a programming error).");
475      }
476      DataArrayView& thisView=getPointDataView();
477      DataArrayView& evView=ev->getPointDataView();
478      #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
479      for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {
480        for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
481             DataArrayView::eigenvalues(thisView,getPointOffset(sampleNo,dataPointNo),
482                                        evView,ev->getPointOffset(sampleNo,dataPointNo));
483        }
484      }
485    }
486    void
487    DataExpanded::eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol)
488    {
489      int numSamples = getNumSamples();
490      int numDataPointsPerSample = getNumDPPSample();
491      DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
492      if (temp_ev==0) {
493        throw DataException("Error - DataExpanded::eigenvalues_and_eigenvectors: casting to DataExpanded failed (propably a programming error).");
494      }
495      DataExpanded* temp_V=dynamic_cast<DataExpanded*>(V);
496      if (temp_V==0) {
497        throw DataException("Error - DataExpanded::eigenvalues_and_eigenvectors: casting to DataExpanded failed (propably a programming error).");
498      }
499      DataArrayView& thisView=getPointDataView();
500      DataArrayView& evView=ev->getPointDataView();
501      DataArrayView& VView=V->getPointDataView();
502      #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
503      for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {
504        for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
505             DataArrayView::eigenvalues_and_eigenvectors(thisView,getPointOffset(sampleNo,dataPointNo),
506                                                         evView,ev->getPointOffset(sampleNo,dataPointNo),
507                                                         VView,V->getPointOffset(sampleNo,dataPointNo),
508                                                         tol);
509        }
510      }
511    }
512    
513  }  // end of namespace  }  // end of namespace

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

  ViewVC Help
Powered by ViewVC 1.1.26