On 03/11/2015 08:02 PM, Ronghai Wu wrote:
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)
Yes, sorry, I forgot your script is interactive. In SfePy prior to 2015.1 the option is {'problem' : 'linear'}. In 2015.1 it reads {'is_linear' : True}, as 'problem' was ambiguous.
and if using PETScKrylovSolver, do you exactly mean ? ls = PETScKrylovSolver({})
Essentially, yes. The above uses the default solver, preconditioner, tolerances and other options. You may need to experiment with those. Try, for example:
ls = PETScKrylovSolver({ 'method' : 'cg', 'precond' : 'icc' 'eps_r' : 1e-8, 'i_max' : 100, })
and use this as in your snippet above instead of ScipyDirect.
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
Here, the shift is the amplitude of the imposed Dirichlet conditions on gamma2. It serves as an example of how to pass extra arguments to the ebc functions. If you set shift to zero, it would be equivalent to set {'u.0' : 0.0} on the gamma2 boundary. Did I answer your question?
r.