/[escript]/trunk/escript/src/LocalOps.h
ViewVC logotype

Diff of /trunk/escript/src/LocalOps.h

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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 2548 by jfenwick, Mon Jul 20 06:20:06 2009 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2009 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #if !defined escript_LocalOps_H  #if !defined escript_LocalOps_H
16  #define escript_LocalOps_H  #define escript_LocalOps_H
17  #ifdef __INTEL_COMPILER  #if defined(_WIN32) && defined(__INTEL_COMPILER)
18  #   include <mathimf.h>  #   include <mathimf.h>
19  #else  #else
20  #   include <math.h>  #   include <math.h>
# Line 24  Line 23 
23  #   define M_PI           3.14159265358979323846  /* pi */  #   define M_PI           3.14159265358979323846  /* pi */
24  #endif  #endif
25    
26    
27    /**
28    \file LocalOps.h
29    \brief Describes binary operations performed on double*.
30    
31    For operations on DataAbstract see BinaryOp.h.
32    For operations on DataVector see DataMaths.h.
33    */
34    
35  namespace escript {  namespace escript {
36    
37    
# Line 300  void  normalizeVector3(double* V0,double Line 308  void  normalizeVector3(double* V0,double
308    
309     \param A00 Input - A_00     \param A00 Input - A_00
310     \param A01 Input - A_01     \param A01 Input - A_01
311       \param A02 Input - A_02
312     \param A11 Input - A_11     \param A11 Input - A_11
313       \param A12 Input - A_12
314       \param A22 Input - A_22
315     \param ev0 Output - smallest eigenvalue     \param ev0 Output - smallest eigenvalue
316     \param ev1 Output - eigenvalue     \param ev1 Output - eigenvalue
317       \param ev2 Output -
318     \param V00 Output - eigenvector componenent coresponding to ev0     \param V00 Output - eigenvector componenent coresponding to ev0
319     \param V10 Output - eigenvector componenent coresponding to ev0     \param V10 Output - eigenvector componenent coresponding to ev0
320       \param V20 Output -
321     \param V01 Output - eigenvector componenent coresponding to ev1     \param V01 Output - eigenvector componenent coresponding to ev1
322     \param V11 Output - eigenvector componenent coresponding to ev1     \param V11 Output - eigenvector componenent coresponding to ev1
323       \param V21 Output -
324       \param V02 Output -
325       \param V12 Output -
326       \param V22 Output -
327     \param tol Input - tolerance to identify to eigenvalues     \param tol Input - tolerance to identify to eigenvalues
328  */  */
329  inline  inline
# Line 389  void  eigenvalues_and_eigenvectors3(cons Line 406  void  eigenvalues_and_eigenvectors3(cons
406           } else {           } else {
407              const register double S00=A00-(*ev0);              const register double S00=A00-(*ev0);
408              const register double absS00=fabs(S00);              const register double absS00=fabs(S00);
409              if (fabs(S00)>m) {              if (absS00>m) {
410                  vectorInKernel3__nonZeroA00(S00,A01,A02,A01,A11-(*ev0),A12,A02,A12,A22-(*ev0),V00,V10,V20);                  vectorInKernel3__nonZeroA00(S00,A01,A02,A01,A11-(*ev0),A12,A02,A12,A22-(*ev0),V00,V10,V20);
411              } else if (absA02<m) {              } else if (absA02<m) {
412                  vectorInKernel3__nonZeroA00(A01,A11-(*ev0),A12,S00,A01,A02,A02,A12,A22-(*ev0),V00,V10,V20);                  vectorInKernel3__nonZeroA00(A01,A11-(*ev0),A12,S00,A01,A02,A02,A12,A22-(*ev0),V00,V10,V20);
# Line 399  void  eigenvalues_and_eigenvectors3(cons Line 416  void  eigenvalues_and_eigenvectors3(cons
416              normalizeVector3(V00,V10,V20);;              normalizeVector3(V00,V10,V20);;
417              const register double T00=A00-(*ev2);              const register double T00=A00-(*ev2);
418              const register double absT00=fabs(T00);              const register double absT00=fabs(T00);
419              if (fabs(T00)>m) {              if (absT00>m) {
420                   vectorInKernel3__nonZeroA00(T00,A01,A02,A01,A11-(*ev2),A12,A02,A12,A22-(*ev2),V02,V12,V22);                   vectorInKernel3__nonZeroA00(T00,A01,A02,A01,A11-(*ev2),A12,A02,A12,A22-(*ev2),V02,V12,V22);
421              } else if (absA02<m) {              } else if (absA02<m) {
422                   vectorInKernel3__nonZeroA00(A01,A11-(*ev2),A12,T00,A01,A02,A02,A12,A22-(*ev2),V02,V12,V22);                   vectorInKernel3__nonZeroA00(A01,A11-(*ev2),A12,T00,A01,A02,A02,A12,A22-(*ev2),V02,V12,V22);

Legend:
Removed from v.1388  
changed lines
  Added in v.2548

  ViewVC Help
Powered by ViewVC 1.1.26