Large Matrices Error
When I try to write a stiffness matrix for large mesh to file, I get the following error
"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/
A = zeros((m_range[1] - m_range[0], self.size(1)))
MemoryError
"
I get the error specifically at A=A.array(). My guess is that numpy cannot create an array that large because of memory requirement.
Is there any easy way to go around this error for large matrices. My code is below.
from dolfin import *
import numpy
import scipy.io
# Create mesh and define function space
mesh=BoxMesh(0, 0, 0, 2, 0.7, 0.3, 400, 140, 60);
V = FunctionSpace(mesh, 'CG', 1)
u = TrialFunction(V)
v = TestFunction(V)
a1 = u*v*dx
a2 = -inner(
A = assemble(a1)
B = assemble(a2)
A = A.array()
B = B.array()
scipy.io.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Oluwaseun Sharomi
- Solved:
- Last query:
- Last reply: