Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Matrix.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: Matrix.h,v 1.4 2008/12/06 08:45:23 mtcampbe Exp $
24 
29 #ifndef __MATRIX_H__
30 #define __MATRIX_H__
31 
32 #include "mopbasic.h"
33 
35 
36 
38 
42 class Matrix{
43  friend std::ostream &operator <<(std::ostream &, const Matrix &);
44 public:
45 
47  Matrix() {}
48 
50  ~Matrix() {}
51 
53  double& operator() (int, int);
54 
56  double operator() (int, int) const;
57 
59  const Matrix &operator = (const Matrix &);
60 
62 
67  const Matrix &operator ^= (const Matrix &);
68 
70  void info ();
71 protected:
72  int rows_;
73  int cols_;
74  double data_[9];
75 };
76 
78 
82 class J_Matrix : public Matrix {
83 
84 public:
85 
86  // Constructor
87  J_Matrix() {}
88 
89  // Destructor
90  ~J_Matrix() {}
91 
92  // Constructor from noal coords and number of columns
93  //
94  // \param pnts[] A Vector_3 array of ordered nodal points.
95  // \param cols Columns in the Jacobian. Should be 2 for triangles or quadrilaterals
96  // and 3 for tetrahedrons or hexahedrons.
97  J_Matrix(Vector_3<double> pnts[],int cols);
98 
100 
104  double det();
105 };
106 
108 
109 #endif
110 
111 
112 
113 
114 
115 
#define MOP_END_NAMESPACE
Definition: mopbasic.h:29
double det(const Matrix3D &A)
#define MOP_BEGIN_NAMESPACE
Definition: mopbasic.h:28
std::ostream & operator<<(std::ostream &os, const COM_exception &ex)
Print out a given exception.
void info()
Print informations about CImg environement variables.
Definition: CImg.h:5702