/[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 580 by gross, Wed Mar 8 05:45:51 2006 UTC revision 615 by elspeth, Wed Mar 22 02:12:00 2006 UTC
# Line 1  Line 1 
1  // $Id$  // $Id$
2  /*  /*
3   ******************************************************************************   ************************************************************
4   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *                                                          *
6   *                                                                            *   *              http://www.access.edu.au                    *
7   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
8   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
9   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
10   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
11   * license agreement with ACcESS.                                             *   ************************************************************
  *                                                                            *  
  ******************************************************************************  
12  */  */
13    
14  #include "DataExpanded.h"  #include "DataExpanded.h"
# Line 467  DataExpanded::copyAll(const boost::pytho Line 465  DataExpanded::copyAll(const boost::pytho
465  void  void
466  DataExpanded::eigenvalues(DataAbstract* ev)  DataExpanded::eigenvalues(DataAbstract* ev)
467  {  {
468      int sampleNo,dataPointNo;
469    int numSamples = getNumSamples();    int numSamples = getNumSamples();
470    int numDataPointsPerSample = getNumDPPSample();    int numDataPointsPerSample = getNumDPPSample();
471    DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);    DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
# Line 476  DataExpanded::eigenvalues(DataAbstract* Line 475  DataExpanded::eigenvalues(DataAbstract*
475    DataArrayView& thisView=getPointDataView();    DataArrayView& thisView=getPointDataView();
476    DataArrayView& evView=ev->getPointDataView();    DataArrayView& evView=ev->getPointDataView();
477    #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)    #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
478    for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {    for (sampleNo = 0; sampleNo < numSamples; sampleNo++) {
479      for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {      for (dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
480           DataArrayView::eigenvalues(thisView,getPointOffset(sampleNo,dataPointNo),           DataArrayView::eigenvalues(thisView,getPointOffset(sampleNo,dataPointNo),
481                                      evView,ev->getPointOffset(sampleNo,dataPointNo));                                      evView,ev->getPointOffset(sampleNo,dataPointNo));
482      }      }
# Line 488  DataExpanded::eigenvalues_and_eigenvecto Line 487  DataExpanded::eigenvalues_and_eigenvecto
487  {  {
488    int numSamples = getNumSamples();    int numSamples = getNumSamples();
489    int numDataPointsPerSample = getNumDPPSample();    int numDataPointsPerSample = getNumDPPSample();
490      int sampleNo,dataPointNo;
491    DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);    DataExpanded* temp_ev=dynamic_cast<DataExpanded*>(ev);
492    if (temp_ev==0) {    if (temp_ev==0) {
493      throw DataException("Error - DataExpanded::eigenvalues_and_eigenvectors: casting to DataExpanded failed (propably a programming error).");      throw DataException("Error - DataExpanded::eigenvalues_and_eigenvectors: casting to DataExpanded failed (propably a programming error).");
# Line 500  DataExpanded::eigenvalues_and_eigenvecto Line 500  DataExpanded::eigenvalues_and_eigenvecto
500    DataArrayView& evView=ev->getPointDataView();    DataArrayView& evView=ev->getPointDataView();
501    DataArrayView& VView=V->getPointDataView();    DataArrayView& VView=V->getPointDataView();
502    #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)    #pragma omp parallel for private(sampleNo,dataPointNo) schedule(static)
503    for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {    for (sampleNo = 0; sampleNo < numSamples; sampleNo++) {
504      for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {      for (dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
505           DataArrayView::eigenvalues_and_eigenvectors(thisView,getPointOffset(sampleNo,dataPointNo),           DataArrayView::eigenvalues_and_eigenvectors(thisView,getPointOffset(sampleNo,dataPointNo),
506                                                       evView,ev->getPointOffset(sampleNo,dataPointNo),                                                       evView,ev->getPointOffset(sampleNo,dataPointNo),
507                                                       VView,V->getPointOffset(sampleNo,dataPointNo),                                                       VView,V->getPointOffset(sampleNo,dataPointNo),

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

  ViewVC Help
Powered by ViewVC 1.1.26