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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 576 - (show annotations)
Fri Mar 3 08:28:42 2006 UTC (13 years, 8 months ago) by gross
File MIME type: text/plain
File size: 2317 byte(s)
some steps towards eigenvalue and eigenvector calculation
1 // $Id$
2 /*
3 ******************************************************************************
4 * *
5 * COPYRIGHT ACcESS 2004 - All Rights Reserved *
6 * *
7 * This software is the property of ACcESS. No part of this code *
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 *
10 * by any unauthorised person is illegal unless that person has a software *
11 * license agreement with ACcESS. *
12 * *
13 ******************************************************************************
14 */
15
16 #if !defined escript_LocalOps_H
17 #define escript_LocalOps_H
18
19 namespace escript {
20
21
22 /**
23 \brief
24 solves a 1x1 eigenvalue A*V=ev*V problem
25
26 \param A00 Input - A_00
27 \param ev0 Output - eigenvalue
28 */
29 inline
30 void eigenvalues1(const double A00,double* ev0) {
31
32 *ev0=1.;
33
34 }
35 /**
36 \brief
37 solves a 2x2 eigenvalue A*V=ev*V problem for symmetric A
38
39 \param A00 Input - A_00
40 \param A01 Input - A_01
41 \param A11 Input - A_11
42 \param ev0 Output - smallest eigenvalue
43 \param ev1 Output - largest eigenvalue
44 */
45 inline
46 void eigenvalues2(const double A00,const double A01
47 ,const double A11,
48 double* ev0, double* ev1) {
49
50 *ev0=1.;
51 *ev1=2.;
52 }
53 /**
54 \brief
55 solves a 3x3 eigenvalue A*V=ev*V problem for symmetric A
56
57 \param A00 Input - A_00
58 \param A01 Input - A_01
59 \param A02 Input - A_02
60 \param A11 Input - A_11
61 \param A12 Input - A_12
62 \param A22 Input - A_22
63 \param ev0 Output - smallest eigenvalue
64 \param ev1 Output - eigenvalue
65 \param ev2 Output - largest eigenvalue
66 */
67 inline
68 void eigenvalues3(const double A00, const double A01, const double A02,
69 const double A11, const double A12,
70 const double A22,
71 double* ev0, double* ev1,double* ev2) {
72
73 *ev0=1.;
74 *ev1=2.;
75 *ev2=3.;
76
77 }
78
79 } // end of namespace
80 #endif

  ViewVC Help
Powered by ViewVC 1.1.26