Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NekMatrixFwd.hpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: NekMatrixFwd.hpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Matrix Forward Declarations
33 //
34 //
35 //
36 ///////////////////////////////////////////////////////////////////////////////
37 
38 #ifndef NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_MATRIX_FWD_HPP
39 #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_MATRIX_FWD_HPP
40 
44 
45 #include <boost/shared_ptr.hpp>
46 #include <boost/type_traits.hpp>
47 
48 #include <boost/typeof/typeof.hpp>
49 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
50 
51 namespace Nektar
52 {
53  template<typename DataType>
54  class ConstMatrix;
55 
56  template<typename DataType>
57  class Matrix;
58 
59  template<typename DataType, typename MatType = StandardMatrixTag>
60  class NekMatrix;
61 
62  template<typename DataType, typename InnerMatrixType>
63  class NekMatrix<NekMatrix<DataType, InnerMatrixType>, ScaledMatrixTag>;
64 
65  template<typename DataType, typename InnerMatrixType>
66  class NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>;
67 
68  template<typename DataType>
69  class NekMatrix<DataType, StandardMatrixTag>;
70 
71  typedef boost::shared_ptr<NekMatrix<NekDouble, StandardMatrixTag> > SharedNekMatrixPtr;
73  typedef boost::shared_ptr<DNekScalMat> DNekScalMatSharedPtr;
74 
75  // Type registration must occur for the expression template machinery to
76  // automatically detect the types of matrix operations.
78 
79 #ifdef NEKTAR_USE_EXPRESSION_TEMPLATES
80  template<typename T>
81  struct IsMatrix : public boost::false_type {};
82 
83  template<typename DataType, typename MatrixType>
84  struct IsMatrix<NekMatrix<DataType, MatrixType> > : public boost::true_type {};
85 
86  template<typename DataType>
87  struct IsMatrix<ConstMatrix<DataType> > : public boost::true_type {};
88 
89  template<typename DataType>
90  struct IsMatrix<Matrix<DataType> > : public boost::true_type {};
91 #endif
92 
93 };
94 
95 #endif //NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_MATRIX_FWD_HPP
96 
97 /**
98  $Log: NekMatrixFwd.hpp,v $
99  Revision 1.15 2008/03/09 22:39:29 bnelson
100  Added IsMatrix.
101 
102  Revision 1.14 2007/08/16 02:08:12 bnelson
103  Removed typeof registration
104 
105  Revision 1.13 2007/07/25 23:47:45 bnelson
106  *** empty log message ***
107 
108  Revision 1.12 2007/07/22 23:03:28 bnelson
109  Backed out Nektar::ptr.
110 
111  Revision 1.11 2007/07/20 00:24:13 bnelson
112  Replaced boost::shared_ptr with Nektar::ptr
113 
114  Revision 1.10 2007/07/12 04:04:14 bnelson
115  *** empty log message ***
116 
117  Revision 1.9 2007/06/24 17:59:33 bnelson
118  *** empty log message ***
119 
120  Revision 1.8 2007/06/10 23:42:15 bnelson
121  Matrix updates.
122 
123  Revision 1.7 2007/03/29 18:59:05 bnelson
124  Refactoring in preparation for scaled matrices. Fixed transpose problem.
125 
126  Revision 1.6 2007/02/15 06:56:55 bnelson
127  *** empty log message ***
128 
129  Revision 1.5 2006/12/17 22:36:35 bnelson
130  Removed Macintosh line endings.
131 
132 **/
133 
134 
BOOST_TYPEOF_REGISTER_TEMPLATE(NekMatrix, 2)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
boost::shared_ptr< NekMatrix< NekDouble, StandardMatrixTag > > SharedNekMatrixPtr
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat