From: kanschat Date: Tue, 13 Mar 2012 00:27:20 +0000 (+0000) Subject: add add function like for sparse matrix X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03869d9b0523f6a64cc20e9d417a3f1b59a39fe4;p=dealii-svn.git add add function like for sparse matrix git-svn-id: https://svn.dealii.org/trunk@25269 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/full_matrix.h b/deal.II/include/deal.II/lac/full_matrix.h index 73dc2b4b56..35bd45e912 100644 --- a/deal.II/include/deal.II/lac/full_matrix.h +++ b/deal.II/include/deal.II/lac/full_matrix.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -799,6 +799,12 @@ class FullMatrix : public Table<2,number> const unsigned int src_offset_i = 0, const unsigned int src_offset_j = 0); + /** + * Adda single element at the + * given position. + */ + void add(const unsigned int row, const unsigned int column, const number value); + /** * A(i,1...n) += * s*A(j,1...n). Simple @@ -1614,6 +1620,15 @@ FullMatrix::end (const unsigned int r) const +template +inline +void +FullMatrix::add (const unsigned int r, const unsigned int c, const number v) +{ + this->operator()(r,c) += v; +} + + template template inline