]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add a test and a channgelog 6046/head
authorDenis Davydov <davydden@gmail.com>
Sat, 17 Mar 2018 03:05:35 +0000 (04:05 +0100)
committerDenis Davydov <davydden@gmail.com>
Sun, 18 Mar 2018 16:09:32 +0000 (17:09 +0100)
doc/news/changes/minor/20180317DenisDavydov [new file with mode: 0644]
tests/lapack/full_matrix_35.cc [new file with mode: 0644]
tests/lapack/full_matrix_35.output [new file with mode: 0644]

diff --git a/doc/news/changes/minor/20180317DenisDavydov b/doc/news/changes/minor/20180317DenisDavydov
new file mode 100644 (file)
index 0000000..6f8327a
--- /dev/null
@@ -0,0 +1,4 @@
+New: Add LAPACKFullMatrix<number>::set(const size_type, const size_type, const number)
+to set an element of the matrix.
+<br>
+(Denis Davydov, 2018/03/17)
diff --git a/tests/lapack/full_matrix_35.cc b/tests/lapack/full_matrix_35.cc
new file mode 100644 (file)
index 0000000..8b590d6
--- /dev/null
@@ -0,0 +1,40 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2014 - 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Tests LAPACKFullMatrix::set(i,j,a)
+
+#include "../tests.h"
+#include <deal.II/lac/lapack_full_matrix.h>
+
+#include <iostream>
+#include <tuple>
+
+template <typename NumberType>
+void test(const unsigned int n=3, const unsigned int k=6)
+{
+  LAPACKFullMatrix<NumberType> A(n,k);
+  A.set(0,1,2.);
+  AssertThrow(A(0,1) == 2., ExcInternalError());
+
+  deallog << "OK" << std::endl;
+}
+
+int main()
+{
+  initlog();
+  test<double>();
+
+}
diff --git a/tests/lapack/full_matrix_35.output b/tests/lapack/full_matrix_35.output
new file mode 100644 (file)
index 0000000..c722e36
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL:OK

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.