Thanks - where can I retrieve the number of quadrature points used for an element (n_qp)? If I remember correctly an SfePy model can comprise different elements e.g. a mixture of quads and tris.



On Mon, Dec 20, 2010 at 3:08 PM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Yes, the function should return a value of mu in each quadrature point. So the "fill" line initializes those values to a constant 1, which is then modified according to the strain, also evaluated in the quadrature points.

And all is for all quad. points, for all elements at once.

So essentialy, mu = tile(mu, n_element * n_qp)

I see that many more things need to be documented :)

r.

----- Reply message -----
From: "Andre Smit" <freev...@gmail.com>
To: <sfepy...@googlegroups.com>
Subject: material_nonlinearity example
Date: Mon, Dec 20, 2010 20:44


Robert

In the get_pars function you prepare the mu or val matrix:


    if mode != 'qp': return

    val = nm.empty((coors.shape[0], 1, 1), dtype=nm.float64)
    val.fill(1e0)

I'm trying to make sense of this. Are you repeating the material parameter for each gauss point? So for example, for a quad, there are 4 gauss points and essentially mu = tile(mu,4) and reshaped?   

a

On Mon, Dec 20, 2010 at 11:08 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
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.

--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To post to this group, send email to sfepy...@googlegroups.com.
To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.




--
Andre

--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To post to this group, send email to sfepy...@googlegroups.com.
To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.

--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To post to this group, send email to sfepy...@googlegroups.com.
To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.



--
Andre