/[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 774 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 775 by ksteube, Mon Jul 10 04:00:08 2006 UTC
# Line 463  DataExpanded::copyAll(const boost::pytho Line 463  DataExpanded::copyAll(const boost::pytho
463    }    }
464  }  }
465  void  void
466    DataExpanded::symmetric(DataAbstract* ev)
467    {
468      int sampleNo,dataPointNo;
469      int numSamples = getNumSamples();
470      int numDataPointsPerSample = getNumDPPSample();
471      DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
472      if (temp_ev==0) {
473        throw DataException("Error - DataExpanded::symmetric: casting to DataExpanded failed (propably a programming error).");
474      }
475      DataArrayView& thisView=getPointDataView();
476      DataArrayView& evView=ev->getPointDataView();
477      #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
478      for (sampleNo = 0; sampleNo < numSamples; sampleNo++) {
479        for (dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
480             DataArrayView::symmetric(thisView,getPointOffset(sampleNo,dataPointNo),
481                                        evView,ev->getPointOffset(sampleNo,dataPointNo));
482        }
483      }
484    }
485    void
486    DataExpanded::nonsymmetric(DataAbstract* ev)
487    {
488      int sampleNo,dataPointNo;
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::nonsymmetric: casting to DataExpanded failed (propably a programming error).");
494      }
495      DataArrayView& thisView=getPointDataView();
496      DataArrayView& evView=ev->getPointDataView();
497      #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
498      for (sampleNo = 0; sampleNo < numSamples; sampleNo++) {
499        for (dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
500             DataArrayView::nonsymmetric(thisView,getPointOffset(sampleNo,dataPointNo),
501                                        evView,ev->getPointOffset(sampleNo,dataPointNo));
502        }
503      }
504    }
505    void
506    DataExpanded::matrixtrace(DataAbstract* ev, int axis_offset)
507    {
508      int sampleNo,dataPointNo;
509      int numSamples = getNumSamples();
510      int numDataPointsPerSample = getNumDPPSample();
511      DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
512      if (temp_ev==0) {
513        throw DataException("Error - DataExpanded::matrixtrace: casting to DataExpanded failed (propably a programming error).");
514      }
515      DataArrayView& thisView=getPointDataView();
516      DataArrayView& evView=ev->getPointDataView();
517      #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
518      for (sampleNo = 0; sampleNo < numSamples; sampleNo++) {
519        for (dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
520             DataArrayView::matrixtrace(thisView,getPointOffset(sampleNo,dataPointNo),
521                                        evView,ev->getPointOffset(sampleNo,dataPointNo),axis_offset);
522        }
523      }
524    }
525    void
526    DataExpanded::transpose(DataAbstract* ev, int axis_offset)
527    {
528      int sampleNo,dataPointNo;
529      int numSamples = getNumSamples();
530      int numDataPointsPerSample = getNumDPPSample();
531      DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
532      if (temp_ev==0) {
533        throw DataException("Error - DataExpanded::transpose: casting to DataExpanded failed (propably a programming error).");
534      }
535      DataArrayView& thisView=getPointDataView();
536      DataArrayView& evView=ev->getPointDataView();
537      #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
538      for (sampleNo = 0; sampleNo < numSamples; sampleNo++) {
539        for (dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
540             DataArrayView::transpose(thisView,getPointOffset(sampleNo,dataPointNo),
541                                        evView,ev->getPointOffset(sampleNo,dataPointNo),axis_offset);
542        }
543      }
544    }
545    void
546  DataExpanded::eigenvalues(DataAbstract* ev)  DataExpanded::eigenvalues(DataAbstract* ev)
547  {  {
548    int sampleNo,dataPointNo;    int sampleNo,dataPointNo;

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

  ViewVC Help
Powered by ViewVC 1.1.26