/[escript]/trunk/escript/test/DataTestCase.cpp
ViewVC logotype

Diff of /trunk/escript/test/DataTestCase.cpp

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

revision 1131 by gross, Tue May 8 05:52:21 2007 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1  // $Id$  
2  /*  /* $Id$ */
3   *****************************************************************************  
4   *                                                                           *  /*******************************************************
5   *       COPYRIGHT  ACcESS  -  All Rights Reserved                           *   *
6   *                                                                           *   *           Copyright 2003-2007 by ACceSS MNRF
7   * This software is the property of ACcESS. No part of this code             *   *       Copyright 2007 by University of Queensland
8   * may be copied in any form or by any means without the expressed written   *   *
9   * consent of ACcESS.  Copying, use or modification of this software         *   *                http://esscc.uq.edu.au
10   * by any unauthorised person is illegal unless that person has a software   *   *        Primary Business: Queensland, Australia
11   * license agreement with ACcESS.                                            *   *  Licensed under the Open Software License version 3.0
12   *                                                                           *   *     http://www.opensource.org/licenses/osl-3.0.php
13   *****************************************************************************   *
14  */   *******************************************************/
15    
16  #include <iostream>  #include <iostream>
17  #if (defined _WIN32) && (defined __INTEL_COMPILER)  #if (defined _WIN32) && (defined __INTEL_COMPILER)
18  #include <mathimf.h>  #include <mathimf.h>
# Line 758  void DataTestCase::testOperations() { Line 759  void DataTestCase::testOperations() {
759    resultTag.copy(baseTag.powD(power));    resultTag.copy(baseTag.powD(power));
760    for (int i=0;i<shape[0];i++) {    for (int i=0;i<shape[0];i++) {
761      for (int j=0;j<shape[1];j++) {      for (int j=0;j<shape[1];j++) {
762        double arg=dataView.index(i,j);        tmp=pow(dataView.index(i,j),3.0);
       tmp=pow(arg,3.0);  
763        assert(std::abs(resultEx.getPointDataView()(i,j) - tmp) <= REL_TOL*std::abs(tmp));        assert(std::abs(resultEx.getPointDataView()(i,j) - tmp) <= REL_TOL*std::abs(tmp));
764        assert(std::abs(resultCon.getPointDataView()(i,j)- tmp) <= REL_TOL*std::abs(tmp));        assert(std::abs(resultCon.getPointDataView()(i,j)- tmp) <= REL_TOL*std::abs(tmp));
765        assert(std::abs(resultTag.getPointDataView()(i,j)- tmp) <= REL_TOL*std::abs(tmp));        assert(std::abs(resultTag.getPointDataView()(i,j)- tmp) <= REL_TOL*std::abs(tmp));

Legend:
Removed from v.1131  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26