From e3b21833d72fe739d26ae9d39bb23f52fe73cd29 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 17 Mar 2018 04:05:35 +0100 Subject: [PATCH] add a test and a channgelog --- doc/news/changes/minor/20180317DenisDavydov | 4 +++ tests/lapack/full_matrix_35.cc | 40 +++++++++++++++++++++ tests/lapack/full_matrix_35.output | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 doc/news/changes/minor/20180317DenisDavydov create mode 100644 tests/lapack/full_matrix_35.cc create mode 100644 tests/lapack/full_matrix_35.output diff --git a/doc/news/changes/minor/20180317DenisDavydov b/doc/news/changes/minor/20180317DenisDavydov new file mode 100644 index 0000000000..6f8327a998 --- /dev/null +++ b/doc/news/changes/minor/20180317DenisDavydov @@ -0,0 +1,4 @@ +New: Add LAPACKFullMatrix::set(const size_type, const size_type, const number) +to set an element of the matrix. +
+(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 index 0000000000..8b590d6c0d --- /dev/null +++ b/tests/lapack/full_matrix_35.cc @@ -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 + +#include +#include + +template +void test(const unsigned int n=3, const unsigned int k=6) +{ + LAPACKFullMatrix A(n,k); + A.set(0,1,2.); + AssertThrow(A(0,1) == 2., ExcInternalError()); + + deallog << "OK" << std::endl; +} + +int main() +{ + initlog(); + test(); + +} diff --git a/tests/lapack/full_matrix_35.output b/tests/lapack/full_matrix_35.output new file mode 100644 index 0000000000..c722e36257 --- /dev/null +++ b/tests/lapack/full_matrix_35.output @@ -0,0 +1,2 @@ + +DEAL:OK -- 2.39.5