]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
invert and assignment from matrices with different entry type
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2002 11:04:55 +0000 (11:04 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2002 11:04:55 +0000 (11:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@5507 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/full_matrix.templates.h
deal.II/lac/source/full_matrix.double.cc
deal.II/lac/source/full_matrix.float.cc

index 6bc4bc72e7253481bfceb663383a055e99c30729..5c841f3b70b3d1fdf5438f580c784edccfd6f730 100644 (file)
@@ -118,6 +118,16 @@ class FullMatrix : public vector2d<number>
                const unsigned int cols,
                const number* entries);
 
+                                    /**
+                                     * Assignment operator.
+                                     */
+    FullMatrix<number>& operator = (const FullMatrix<number>&);
+    
+                                    /**
+                                     * Variable assignment operator.
+                                     */
+    template<typename number2>
+    FullMatrix<number>& operator = (const FullMatrix<number2>&);
     
                                     /**
                                      * Comparison operator. Be
@@ -448,7 +458,8 @@ class FullMatrix : public vector2d<number>
                                      * @ref{gauss_jordan} is invoked
                                      * implicitly.
                                      */
-    void invert (const FullMatrix<number> &M);
+    template <typename number2>
+    void invert (const FullMatrix<number2> &M);
 
                                     /**
                                      * Apply the Jacobi
index d044fc6a103c6ec00a4db3ff6507b5e41ac30a19..bba5d9850cd972d09ff39e02e456812e880025d6 100644 (file)
@@ -52,6 +52,25 @@ FullMatrix<number>::FullMatrix (const FullMatrix &m) :
 {}
 
 
+template <typename number>
+FullMatrix<number>&
+FullMatrix<number>::operator = (const FullMatrix<number>& M)
+{
+  vector2d<number>::operator=(M);
+  return *this;
+}
+
+
+template <typename number>
+template <typename number2>
+FullMatrix<number>&
+FullMatrix<number>::operator = (const FullMatrix<number2>& M)
+{
+  vector2d<number>::operator=(M);
+  return *this;
+}
+
+
 template <typename number>
 bool
 FullMatrix<number>::all_zero () const
@@ -1126,8 +1145,9 @@ FullMatrix<number>::relative_symmetry_norm2 () const
 
 
 template <typename number>
+template <typename number2>
 void
-FullMatrix<number>::invert (const FullMatrix<number> &M)
+FullMatrix<number>::invert (const FullMatrix<number2> &M)
 {
   Assert (data() != 0, ExcEmptyMatrix());
   
index 1e6e01348fe2f69c9fb59861c7b22788ef1e9cf7..940b5a5f3aa56d5856f86a72fc48e9a2b48302f2 100644 (file)
@@ -28,6 +28,7 @@ template void FullMatrix<TYPEMAT>::Tadd (const TYPEMAT, const FullMatrix<TYPEMAT
 template void FullMatrix<TYPEMAT>::mmult (FullMatrix<TYPEMAT2>&, const FullMatrix<TYPEMAT2>&, const bool) const;
 template void FullMatrix<TYPEMAT>::Tmmult (FullMatrix<TYPEMAT2>&, const FullMatrix<TYPEMAT2>&, const bool) const;
 template void FullMatrix<TYPEMAT>::add_diag (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
+template void FullMatrix<TYPEMAT>::invert (const FullMatrix<TYPEMAT2>&);
 
 
 #define TYPEVEC double
index c050ecf3315ddc0f8b4288e8654d584e5ff6fcfa..b8a2128031be287037209037999f5af2756bfe10 100644 (file)
@@ -27,7 +27,7 @@ template void FullMatrix<TYPEMAT>::Tadd (const TYPEMAT, const FullMatrix<TYPEMAT
 template void FullMatrix<TYPEMAT>::mmult (FullMatrix<TYPEMAT2>&, const FullMatrix<TYPEMAT2>&, const bool) const;
 template void FullMatrix<TYPEMAT>::Tmmult (FullMatrix<TYPEMAT2>&, const FullMatrix<TYPEMAT2>&, const bool) const;
 template void FullMatrix<TYPEMAT>::add_diag (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
-
+template void FullMatrix<TYPEMAT>::invert (const FullMatrix<TYPEMAT2>&);
 
 #define TYPEVEC double
 #define TYPERES double

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.