OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
matrix_block.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-2009 by Guido Kanschat
6 // Copyright (C) 2006-2014 by Energy Systems Design Laboratory, University of Alberta
7 //
8 // This software is distributed under the MIT License
9 // For more information, see the README file in /doc/LICENSE
10 //
11 // - Class: matrix_block.h
12 // - Description: This class implements MATRIX object wrapper
13 // - Developers: Guido Kanschat, Texas A&M University
14 // Valentin N. Zingan, University of Alberta
15 // Marc Secanell, University of Alberta
16 // - Id: $Id: matrix_block.h 2605 2014-08-15 03:36:44Z secanell $
17 //
18 // ----------------------------------------------------------------------------
19 
20 #ifndef _FUEL_CELL_APPLICATION_CORE_MATRIX_BLOCK_H_
21 #define _FUEL_CELL_APPLICATION_CORE_MATRIX_BLOCK_H_
22 
23 #include <deal.II/lac/full_matrix.h>
24 
25 using namespace dealii;
26 
27 namespace FuelCell
28 {
29 namespace ApplicationCore
30 {
31 
39 template<typename MATRIX>
41 {
45  MATRIX matrix;
46 
51  unsigned int row;
52 
57  unsigned int column;
58 
59 
60 
61  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62 
63 
64 
69  :
70  row(static_cast<unsigned int>(-1)),
71  column(static_cast<unsigned int>(-1))
72  { }
73 
74 
75 
79  MatrixBlock(unsigned int row,
80  unsigned int column)
81  :
82  row(row),
83  column(column)
84  { }
85 
86 
87 
92  :
93  matrix(M.matrix),
94  row(M.row),
95  column(M.column)
96  { }
97 };
98 
102 typedef std::vector< MatrixBlock< FullMatrix<double> > > MatrixVector;
103 
107 typedef std::vector< Vector<double> > VectorVector;
108 
109 } // ApplicationCore
110 
111 } // FuelCell
112 
113 #endif
MatrixBlock(unsigned int row, unsigned int column)
Constructor.
Definition: matrix_block.h:79
unsigned int row
Row coordinate in the global block matrix.
Definition: matrix_block.h:51
MatrixBlock()
Constructor.
Definition: matrix_block.h:68
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
MatrixBlock(const MatrixBlock< MATRIX > &M)
Copy constructor.
Definition: matrix_block.h:91
MATRIX matrix
The matrix itself.
Definition: matrix_block.h:45
std::vector< Vector< double > > VectorVector
The std::vector of dealii::Vectors used in the mesh loops.
Definition: matrix_block.h:107
A wrapper around a MATRIX object, storing the coordinates in the global block matrix as well...
Definition: matrix_block.h:40
unsigned int column
Column coordinate in the global block matrix.
Definition: matrix_block.h:57