Cannot access raw-matrix for mixed function spaces

Issue #497 invalid
Florian Bruckner created an issue

Hello,

if i try to access A.array() after the assembly within the demo_stokes-iterative.py example, a memory error is raised:

---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
<ipython-input-5-dc6137c9900a> in <module>()
----> 1 A.array()

/usr/lib/python2.7/dist-packages/dolfin/cpp/la.pyc in array(self)
    571         from numpy import zeros
    572         m_range = self.local_range(0);
--> 573         A = zeros((m_range[1] - m_range[0], self.size(1)))
    574         for i, row in enumerate(range(*m_range)):
    575             column, values = self.getrow(row)

MemoryError: 

doing the same within demo_poisson.py gives a correct output, so i could be a problem with the mixed function space.

greeting FloB

Comments (2)

  1. Jan Blechta

    I have a suspicion that you get really run out of memory when asking for A.array() which is dense.

  2. Chris Richardson

    A.array() is too big to fit in memory. If you change the problem size to UnitCubeMesh(2, 2, 2) for example, it will work.

  3. Log in to comment