[Dune] [Dune-Commit] dune-istl r1320 - releases/2.0/dune/istl
Martin Nolte
nolte at mathematik.uni-freiburg.de
Thu Oct 21 16:29:10 CEST 2010
Hi Oli,
shouldn't this go into the 2.0.1-branch?
Best,
Martin
On 10/21/2010 03:24 PM, sander at dune-project.org wrote:
> Author: sander
> Date: 2010-10-21 15:24:57 +0200 (Thu, 21 Oct 2010)
> New Revision: 1320
>
> Modified:
> releases/2.0/dune/istl/btdmatrix.hh
> Log:
> patch 1212 (make 1x1 matrices work) merged from the trunk
>
> Modified: releases/2.0/dune/istl/btdmatrix.hh
> ===================================================================
> --- releases/2.0/dune/istl/btdmatrix.hh 2010-10-20 00:25:35 UTC (rev 1319)
> +++ releases/2.0/dune/istl/btdmatrix.hh 2010-10-21 13:24:57 UTC (rev 1320)
> @@ -49,6 +49,18 @@
> explicit BTDMatrix(int size)
> : BCRSMatrix<B,A>(size, size, BCRSMatrix<B,A>::random)
> {
> + // special handling for 1x1 matrices
> + if (size==1) {
> +
> + this->BCRSMatrix<B,A>::setrowsize(0, 1);
> + this->BCRSMatrix<B,A>::endrowsizes();
> +
> + this->BCRSMatrix<B,A>::addindex(0, 0);
> + this->BCRSMatrix<B,A>::endindices();
> +
> + return;
> + }
> +
> // Set number of entries for each row
> this->BCRSMatrix<B,A>::setrowsize(0, 2);
>
> @@ -97,6 +109,12 @@
> template <class V>
> void solve (V& x, const V& rhs) const {
>
> + // special handling for 1x1 matrices. The generic algorithm doesn't work for them
> + if (this->N()==1) {
> + (*this)[0][0].solve(x[0],rhs[0]);
> + return;
> + }
> +
> // Make copies of the rhs and the right matrix band
> V d = rhs;
> V c(this->N()-1);
>
>
> Property changes on: releases/2.0/dune/istl/btdmatrix.hh
> ___________________________________________________________________
> Added: svn:mergeinfo
> + /trunk/dune/istl/btdmatrix.hh:1179,1212
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
--
Martin Nolte <nolte at mathematik.uni-freiburg.de>
Universität Freiburg phone: +49-761-203-5642
Abteilung für angewandte Mathematik fax: +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany
_______________________________________________
Dune-Commit mailing list
Dune-Commit at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune-commit
More information about the Dune
mailing list