Yes, it is linear elasticity problem.
If using linear Newton solver, do you exactly mean ?
ls = ScipyDirect({})
nls_status = IndexedStruct()
nls = Newton({'problem' : 'linear'}, lin_solver=ls, status=nls_status)
pb = Problem('elasticity', equations=eqs, nls=nls, ls=ls)
and if using PETScKrylovSolver, do you exactly mean ?
ls = PETScKrylovSolver({})
pb = Problem('elasticity', equations=eqs, ls=ls)
Another question in the ''Interactive Example: Linear Elasticity'' : In [23]: bc_fun = Function(’shift_u_fun’, shift_u_fun, extra_args={’shift’ : 0.01}) In [24]: shift_u = EssentialBC(’shift_u’, gamma2, {’u.0’ : bc_fun}) is this shift a necessity to get correct result? I mean without this, if the result will be ridiculous or basically right? Thanks
在 2015年3月11日星期三 UTC+1下午4:14:30,Robert Cimrman写道:
On 03/09/2015 10:22 PM, Ronghai Wu wrote:
Thanks a lot. My complete problem is actually a dynamic problem, at every time-step run sfepy as stress-strain solver. However, when the mesh is large such as 513*513, sfepy runs slowly, especially during solving equlibrium equation from iter 0 to iter 1. The solving process takes roughly 1 min/time-step. I am wondering is there any good idea to improve the running speed?
The problem is linear, right? Then try setting the 'is_linear' option of the Newton solver [1] to True. Then the matrix is assembled only once, and, in case you use the ls.scipy_direct solver, also prefactorized. So the first time step will be slow, but the other steps fast. If the problem is too big for the direct solver, try using and iterative solver instead. I have a good experience with the ones in petsc [2].
r.
[1] http://sfepy.org/doc-devel/src/sfepy/solvers/nls.html?highlight=is_linear [2]
http://sfepy.org/doc-devel/src/sfepy/solvers/ls.html#sfepy.solvers.ls.PETScK... <http://www.google.com/url?q=http%3A%2F%2Fsfepy.org%2Fdoc-devel%2Fsrc%2Fsfepy%2Fsolvers%2Fls.html%23sfepy.solvers.ls.PETScKrylovSolver&sa=D&sntz=1&usg=AFQjCNGLXWR-zmz9fJJoYchqeeLIrxlbpw>