1 /* 2 *_________________________________________________________________________* 3 * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * 4 * DESCRIPTION: SEE READ-ME * 5 * FILE NAME: colmatmap.h * 6 * AUTHORS: See Author List * 7 * GRANTS: See Grants List * 8 * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * 9 * LICENSE: Please see License Agreement * 10 * DOWNLOAD: Free at www.rpi.edu/~anderk5 * 11 * ADMINISTRATOR: Prof. Kurt Anderson * 12 * Computational Dynamics Lab * 13 * Rensselaer Polytechnic Institute * 14 * 110 8th St. Troy NY 12180 * 15 * CONTACT: anderk5@rpi.edu * 16 *_________________________________________________________________________*/ 17 18 19 #ifndef COLMATMAP_H 20 #define COLMATMAP_H 21 22 #include "virtualcolmatrix.h" 23 24 class ColMatrix; 25 26 class ColMatMap : public VirtualColMatrix { 27 double** elements; 28 public: 29 ColMatMap(); 30 ~ColMatMap(); 31 ColMatMap(const ColMatMap& A); // copy constructor 32 ColMatMap(ColMatrix& A); // copy constructor 33 ColMatMap(int m); // size constructor 34 35 double& operator_1int (int i); // array access 36 double Get_1int(int i) const; 37 void Set_1int(int i, double value); 38 double BasicGet_1int(int i) const; 39 void BasicSet_1int(int i, double value); 40 void BasicIncrement_1int(int i, double value); 41 void SetElementPointer(int i, double* p); 42 double* GetElementPointer(int i); 43 void Dim(int m); 44 void Const(double value); 45 MatrixType GetType() const; 46 std::ostream& WriteData(std::ostream& c) const; 47 48 void AssignVM(const VirtualMatrix& A); 49 ColMatMap& operator=(const ColMatMap& A); // assignment operator 50 ColMatMap& operator=(const ColMatrix& A); // overloaded = 51 ColMatMap& operator=(const VirtualColMatrix& A); // overloaded = 52 ColMatMap& operator=(const VirtualMatrix& A); // overloaded = 53 ColMatMap& operator*=(double b); 54 55 // Fast Matrix Operators 56 friend void FastAssign(ColMatMap& A, ColMatMap& C); //C = A 57 friend void FastAssign(ColMatMap& A, ColMatrix& C); // C = A 58 friend void FastAssign(ColMatrix& A, ColMatMap& C); // C = A 59 friend void FastForwardEuler(ColMatMap& X,ColMatMap& Xdot, double dt); 60 friend void FastForwardEuler(ColMatMap& X,ColMatrix& Xdot, double dt); 61 friend void FastCKRK5(ColMatMap& X, ColMatrix& Xi, ColMatrix* f, double* c, double dt); 62 friend void FastFRK5(ColMatMap& X, ColMatrix& Xi, ColMatrix* f, double* c, double dt); 63 }; 64 65 #endif 66