]> https://gitweb.dealii.org/ - dealii.git/commitdiff
helper function
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 17 Mar 2005 00:14:09 +0000 (00:14 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 17 Mar 2005 00:14:09 +0000 (00:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@10177 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/pointer_matrix.h

index 2a27125a471b793ec489792fee443916a822ce6a..37a9890cb1a8780a804f919f13b42019bdde46bd 100644 (file)
@@ -145,6 +145,26 @@ private:
   SmartPointer<const MATRIX> m;
 };
 
+
+/**
+ * This function helps you creating a PointerMatrixBase object if you
+ * do not want to provide the full template arguments of
+ * PointerMatrix.
+ *
+ * The result is a PointerMatrixBase* pointing to <tt>matrix</tt>. The
+ * <TT>VECTOR</tt> argument is a dummy just used to determine the
+ * template arguments.
+ *
+ * @relates PointerMatrixBase
+ */
+template <class MATRIX, class VECTOR>
+inline
+PointerMatrixBase<VECTOR>*
+new_pointer_matrix_base(MATRIX& matrix, const VECTOR&)
+{
+  return new PointerMatrix<MATRIX, VECTOR>(&matrix);
+}
+
 /*@}*/
 //----------------------------------------------------------------------//
 

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.