← Back to team overview

dolfin team mailing list archive

Re: [Bug 726487] Re: PETScMatrix vector resize uses wrong dim

 

On Monday February 28 2011 09:28:14 Garth Wells wrote:
> On 28/02/11 16:29, Johan Hake wrote:
> > The python LA unit test desperately need a revamp... We have removed the
> > Matrix slicing as it is broken in parallel and the present Matrix test
> > more or less just test the slicing.
> > 
> > However feel free to add more test classes. For example one could be
> > specific for testing parallel stuff. Something like:
> > 
> > class ParallelStuff(obejct):
> >     pass
> > 
> > ...
> > 
> > if has_la_backend("PETSc"):
> >     bases = (AbstractBaseTest, DataNotWorkingTester,\
> >     
> >              unittest.TestCase)
> >     
> >     bases += (ParallelStuff,) if MPI.num_processes()>1 ()
> >     PETScTester = type("PETScTester", bases, {"backend":"PETSc"})
> 
> I would suggest having Matrix.py to test plain matrix functionality,
> Vector.py to test plain vector functionality, etc. By plain I mean the
> functions in the C++ classes. We can then have something like
> Python_la.py to test Python/numpy/scipy magic.

Sounds good.

But I suggest we still create a separate parallel test class for testing 
parallel specific functionality.

Johan

> Garth
> 
> > Johan
> > 
> > On Monday February 28 2011 05:52:28 Joachim Haga wrote:
> >> Could certainly add a rectangular matrix to unit/la/python/test.py, but
> >> 
> >> it looks like the matrix tests are not run at all:
> >>     # FIXME: Matrix tests need to be updated once interface is sorted
> >>     out #def test_matrix_with_backend(self):
> >>     #    self.run_matrix_test(True)
> >>     
> >>     #def test_matrix_without_backend(self):
> >>     #    self.run_matrix_test(False)
> >> 
> >> ...could easily modify demo/undocumented/block-matrix instead, but that
> >> would be backend specific...

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/726487

Title:
  PETScMatrix vector resize uses wrong dim

Status in DOLFIN:
  New

Bug description:
  The size of vectors resized through PETScMatrix::resize is wrong for
  non-square matrices. The left and right matrices are switched. Patch
  attached.



Follow ups

References