#include "FaceOffset_3.h"
#include "../Rocblas/include/Rocblas.h"
#include "../Rocsurf/include/Rocsurf.h"
#include <algorithm>
Go to the source code of this file.
|
double | SQR (double x) |
|
void | dsytrd3 (double A[3][3], double Q[3][3], double d[3], double e[2]) |
|
int | dsyevq3 (double A[3][3], double Q[3][3], double w[3]) |
|
int dsyevq3 |
( |
double |
A[3][3], |
|
|
double |
Q[3][3], |
|
|
double |
w[3] |
|
) |
| |
Definition at line 462 of file quadric_analysis.C.
References dsytrd3(), i, k, s, SQR(), and sqrt().
486 double g, r, p, f, b,
s, c, t;
497 for (
int l=0; l < 2; l++)
504 for (m=l; m < 2; m++)
506 g = fabs(w[m])+fabs(w[m+1]);
507 if (fabs(e[m]) + g == g)
517 g = (w[l+1] - w[l]) / (e[l] + e[l]);
520 g = w[m] - w[l] + e[l]/(g + r);
522 g = w[m] - w[l] + e[l]/(g - r);
526 for (
int i=m-1;
i >= l;
i--)
530 if (fabs(f) > fabs(g))
546 r = (w[
i] - g)*s + 2.0*c*b;
552 for (
int k=0;
k < 3;
k++)
555 Q[
k][
i+1] = s*Q[
k][
i] + c*t;
556 Q[
k][
i] = c*Q[
k][
i] - s*t;
void dsytrd3 |
( |
double |
A[3][3], |
|
|
double |
Q[3][3], |
|
|
double |
d[3], |
|
|
double |
e[2] |
|
) |
| |
Definition at line 386 of file quadric_analysis.C.
References i, j, q, SQR(), and sqrt().
404 for (
int i=0;
i < 3;
i++)
407 for (
int j=0;
j <
i;
j++)
408 Q[i][
j] = Q[
j][i] = 0.0;
427 for (
int i=1;
i < 3;
i++)
429 f = A[1][
i] * u[1] + A[
i][2] * u[2];
433 K *= 0.5 *
SQR(omega);
435 for (
int i=1;
i < 3;
i++)
436 q[
i] = q[
i] - K * u[
i];
439 d[1] = A[1][1] - 2.0*q[1]*u[1];
440 d[2] = A[2][2] - 2.0*q[2]*u[2];
443 for (
int j=1;
j < 3;
j++)
446 for (
int i=1;
i < 3;
i++)
447 Q[
i][
j] = Q[
i][
j] - f*u[
i];
451 e[1] = A[1][2] - q[1]*u[2] - u[1]*q[2];
455 for (
int i=0;
i < 3;
i++)