]> https://gitweb.dealii.org/ - dealii.git/commitdiff
preparation for unit points
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 22 Jan 2001 16:42:58 +0000 (16:42 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 22 Jan 2001 16:42:58 +0000 (16:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@3763 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 9a035a2957fabc62443367203fcc8c002d4e049f..19c9b94fd65f039b9f34d79e496bb97eed115a0b 100644 (file)
@@ -156,6 +156,15 @@ class FullMatrix : public Subscriptor
               const unsigned int         i=0,
               const unsigned int         j=0);
     
+
+                                     /**
+                                     * Fill matrix with an array of numbers.
+                                     * The array is arranged line by line. No
+                                     * range checking is performed.
+                                     */
+    template<typename number2>
+      void fill (const number2* entries);
+    
                                     /**
                                      * Set dimension to $m\times n$ and
                                      * allocate memory if necessary. Forget
index 477778d13b3ebf1add2eca870b79a7ca93a03443..0ab5ded09e389e8ef30a69ef4088a52dbb861eba 100644 (file)
@@ -457,6 +457,16 @@ void FullMatrix<number>::fill (const FullMatrix<number2>& src,
 }
 
 
+template <typename number>
+template <typename number2>
+void FullMatrix<number>::fill (const number2* entries)
+{
+    if (dim_range*dim_image != 0)
+    std::copy (entries, entries+dim_image*dim_range, val);
+}
+
+
+
 template <typename number>
 void FullMatrix<number>::add_row (const unsigned int i,
                                  const number s,
index af01bed87e3ddb8c9b6561ac82bea19439f672e4..f7a2ff1dd1b3824686cc5b89b68b728ef8e848d6 100644 (file)
@@ -34,6 +34,7 @@ template void FullMatrix<TYPEMAT>::add_diag (const TYPEMAT, const FullMatrix<TYP
 #define TYPEVEC double
 #define TYPERES double
 
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
 template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
@@ -47,6 +48,7 @@ template double FullMatrix<TYPEMAT>::least_squares(Vector<TYPEVEC>&, Vector<TYPE
 #undef TYPEVEC
 #define TYPEVEC float
 
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
 template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
index 3ad09c4b2980829b32db40f46c97acfc32495404..684ff616d763079296c9e6ab7d60c7f796fb6d7b 100644 (file)
@@ -33,6 +33,7 @@ template void FullMatrix<TYPEMAT>::add_diag (const TYPEMAT, const FullMatrix<TYP
 #define TYPEVEC double
 #define TYPERES double
 
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
 template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
@@ -46,6 +47,7 @@ template double FullMatrix<TYPEMAT>::least_squares(Vector<TYPEVEC>&, Vector<TYPE
 #undef TYPEVEC
 #define TYPEVEC float
 
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
 template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
 template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;

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.