On 12/20/10 17:45, Andre Smit wrote:
Robert - in the new example I notice you are not using presolve in the solver definition or definition the history term for the displacement variable:
'ls' : ('ls.scipy_direct', { 'presolve' : True }),
presolve set to True means that, for linear problems ('problem' : 'linear' in newton configuration), the matrix is assembled and factorized before the time-stepping starts - the factors are then reused in each time step to quickly solve the linear systems.
It also assumes that the matrix is the same in each time step - this is not the case here, as 'mu' changes... So presolve does not have sense in this example.
variables = { 'u' : ('unknown field', 'displacement', 0., 'previous'), 'v' : ('test field', 'displacement', 'u'), }
but consistently used these for other time step problems. Any reason? This really emphasizes my lack of understanding of the internals.
For linear problems with constant matrix, the most efficient would be:
solvers = { 'ls' : ('ls.scipy_direct', {'presolve' : True }), 'newton' : ('nls.newton', { 'i_max' : 1, 'eps_a' : 1e-10, 'eps_r' : 1.0, 'problem' : 'linear'}), 'ts' : ('ts.simple', {'t0' : 0.0, 't1' : 1.0, 'dt' : None, 'n_step' : 5, 'quasistatic' : True, # or False }), }
I have just fixed a small bug with 'quasistatic' : True
r.