File: fastmatrixops.h

package info (click to toggle)
lammps 20220106.git7586adbb6a%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 348,064 kB
  • sloc: cpp: 831,421; python: 24,896; xml: 14,949; f90: 10,845; ansic: 7,967; sh: 4,226; perl: 4,064; fortran: 2,424; makefile: 1,501; objc: 238; lisp: 163; csh: 16; awk: 14; tcl: 6
file content (97 lines) | stat: -rw-r--r-- 5,534 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
 *_________________________________________________________________________*
 *      POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE     *
 *      DESCRIPTION: SEE READ-ME                                           *
 *      FILE NAME: fastmatrixops.h                                         *
 *      AUTHORS: See Author List                                           *
 *      GRANTS: See Grants List                                            *
 *      COPYRIGHT: (C) 2005 by Authors as listed in Author's List          *
 *      LICENSE: Please see License Agreement                              *
 *      DOWNLOAD: Free at www.rpi.edu/~anderk5                             *
 *      ADMINISTRATOR: Prof. Kurt Anderson                                 *
 *                     Computational Dynamics Lab                          *
 *                     Rensselaer Polytechnic Institute                    *
 *                     110 8th St. Troy NY 12180                           *
 *      CONTACT:        anderk5@rpi.edu                                    *
 *_________________________________________________________________________*/

#ifndef FASTMATRIXOPS_H
#define FASTMATRIXOPS_H
#include "matrices.h"

void FastCross(Vect3& a, Vect3& b, Vect3& c);
void FastSimpleRotation(Vect3& v, double q, Mat3x3& C);
void FastQuaternions(ColMatrix& q, Mat3x3& C);
void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot);
void FastLDLT(Matrix& A, Matrix& LD); // C is the LDL^T decomposition of A (SPD)
void FastLDLT(Mat6x6& A, Mat6x6& LD); // C is the LDL^T decomposition of A (SPD)
void FastLDLTSubs(Matrix& LD, Matrix& B, Matrix& C); // Appropriate Forward and Back Substitution
void FastLDLTSubsLH(Matrix& B, Matrix& LD, Matrix& C); // Left handed Forward and Back Substitution
void FastLDLTSubs(Mat6x6& LD, Mat6x6& B, Mat6x6& C); // Appropriate Forward and Back Substitution
void FastLDLTSubs(Mat6x6& LD, Vect6& B, Vect6& C); // Appropriate Forward and Back Substitution
void FastLU(Matrix& A, Matrix& LU, int *indx); // LU is the LU decomposition of A
void FastLU(Mat3x3& A, Mat3x3& LU, int *indx); // LU is the LU decomposition of A
void FastLU(Mat4x4& A, Mat4x4& LU, int *indx); // LU is the LU decomposition of A
void FastLU(Mat6x6& A, Mat6x6& LU, int *indx); // LU is the LU decomposition of A
void FastLUSubs(Matrix& LU, Matrix& B, Matrix& C, int *indx); // Appropriate Forward and Back Substitution
void FastLUSubs(Mat3x3& LU, Matrix& B, Matrix& C, int *indx); // Appropriate Forward and Back Substitution
void FastLUSubs(Mat4x4& LU, Matrix& B, Matrix& C, int *indx); // Appropriate Forward and Back Substitution
void FastLUSubs(Mat6x6& LU, Matrix& B, Matrix& C, int *indx); // Appropriate Forward and Back Substitution
// The following LUSubsLH routine is incomplete at the moment.
void FastLUSubsLH(Matrix& B, Matrix& LU, Matrix& C, int *indx); // Appropriate Forward and Back Substitution
void FastTripleSum(Vect3& a, Vect3& b, Vect3& c, Vect3& d); // d = a+b+c
void FastTripleSumPPM(Vect3& a, Vect3& b, Vect3& c, Vect3& d); // d = a+b-c

void FastMult(Matrix& A, Matrix& B, Matrix& C);  // C = A*B
void FastTMult(Matrix& A, Matrix& B, Matrix& C);  // C = A^T*B

void FastMult(Mat3x3& A, Vect3& B, Vect3& C);  // C = A*B
void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); // C = A*B
void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); // C = A*B
void FastMult(double a, Vect3& B, Vect3& C);  // C = a*B
void FastNegMult(Mat3x3& A, Vect3& B, Vect3& C);  // C = A*B
void FastNegTMult(Mat3x3& A, Vect3& B, Vect3& C);  // C = A*B

void FastMult(Mat4x4& A, Vect4& B, Vect4& C);  // C = A*B
void FastTMult(Mat4x4& A, Vect4& B, Vect4& C);  // C = A^T*B
void FastMult(double a, Vect4& B, Vect4& C);  // C = a*B
void FastNegMult(Mat4x4& A, Vect4& B, Vect4& C);  // C = A*B
void FastNegTMult(Mat4x4& A, Vect4& B, Vect4& C);  // C = A*B

void FastMultT(Matrix& A, Matrix& B, Mat6x6& C);  // C = A*B^T
void FastMult(Mat6x6& A, Matrix& B, Matrix& C);   // C = A*B
void FastTMult(Matrix& A, Vect6& B, ColMatrix& C);// C = A^T*B
void FastMult(Matrix& A, ColMatrix& B, Vect6& C); // C = A*B

void FastMult(Mat3x3& A, Mat3x3& B, Mat3x3& C);  // C = A*B
void FastMultT(Mat3x3& A, Mat3x3& B, Mat3x3& C);  // C = A*B

void FastMult(Mat4x4& A, Mat4x4& B, Mat4x4& C);  // C = A*B
void FastMultT(Mat4x4& A, Mat4x4& B, Mat4x4& C);  // C = A*B

void FastMult(Mat6x6& A, Mat6x6& B, Mat6x6& C);  // C = A*B
void FastMultT(Mat6x6& A, Mat6x6& B, Mat6x6& C);  // C = A*B^T
void FastTMult(Mat6x6& A, Mat6x6& B, Mat6x6& C);  // C = A^T*B

void FastMult(Mat6x6& A, Vect6& B, Vect6& C);  // C = A*B
void FastTMult(Mat6x6& A, Vect6& B, Vect6& C);  // C = A^T*B

void FastAdd(Vect3& A, Vect3& B, Vect3& C);     // C = A+B
void FastAdd(Vect4& A, Vect4& B, Vect3& C);     // C = A+B
void FastAdd(Mat6x6& A, Mat6x6& B, Mat6x6& C);  // C = A+B
void FastAdd(Vect6& A, Vect6& B, Vect6& C);     // C = A+B

void FastSubt(Vect3& A, Vect3& B, Vect3& C);    // C = A-B
void FastSubt(Vect4& A, Vect4& B, Vect4& C);    // C = A-B
void FastSubt(Mat6x6& A, Mat6x6& B, Mat6x6& C); // C = A-B
void FastSubt(Vect6& A, Vect6& B, Vect6& C);    // C = A-B

void FastAssign(ColMatMap& A, ColMatMap& C);  // C = A
void FastAssign(ColMatrix& A, ColMatrix& C);  // C = A
void FastAssign(Vect3& A, Vect3& C);          // C = A
void FastAssign(ColMatrix&A, Vect3& C);
void FastAssign(Vect4& A, Vect4& C);          // C = A
void FastAssignT(Mat3x3& A, Mat3x3& C);       // C = A^T
void FastAssignT(Mat4x4& A, Mat4x4& C);       // C = A^T

#endif