Is i possible to reduce RAM required for computation?
An example of the code I use is as follows:
from fenics import * mesh = UnitCubeMesh(8, 9, 10) V = FunctionSpace(mesh, 'P', 1) u_Left = Constant(1) def boundary_Left(x, on_boundary): tol = 1e-14 return on_boundary and near(x, 0, tol) bc_L = DirichletBC(V, u_Left, boundary_Left) u_Right = Constant(0) def boundary_Right(x, on_boundary): tol = 1e-14 return on_boundary and near(x, 1, tol) bc_R = DirichletBC(V, u_Right, boundary_Right) u = TrialFunction(V) v = TestFunction(V) f = Constant(0) conductivity = Constant(1) a = conductivity*dot(grad(u), grad(v))*dx L = f*v*dx u = Function(V) solve(a == L, u, [bc_L, bc_R])
I'm solving the problem in 3D. The UnitCubeMesh size is 200 x 220 x 100.
I set the conductivity variable using the expression (chapter 4.3.1 on page 88 of https://fenicsproject.org/pub/tutorial/pdf/fenics-tutorial-vol1.pdf)
Running a smaller task, I extrapolated that to accomplish this task I need 128 GB of RAM. Is it possible to reduce the amount of RAM required, for example, by using an iterative solver or in some other way?
shows you the available iterative solvers.
shows you the available preconditioners().
You can apply them e.g. by calling
solve(a == L, u, [bc_L, bc_R],"gmres","ilu")