Progress Bar

29 views
Skip to first unread message

Md. Golam Rashed

unread,
Aug 18, 2011, 1:16:04 PM8/18/11
to sfepy...@googlegroups.com
As analysis takes quite some time, it'll be helpful if there is a progress bar or progressing % showing.
example:
progress 1%
progress 2%
progress 3%
.
.
.
.
.
.
progress 15%
.
.
etc.

this feature will really help large problem.
is it possible to integrate this feature into sfepy???
Thanks

Robert Cimrman

unread,
Aug 19, 2011, 6:07:44 AM8/19/11
to sfepy...@googlegroups.com
Hi,

this is not possible in general, as we rely on external linear solvers (e.g.
umfpack), that do not support this feature. A progress bar might be feasible
for assembling, but that is in my experience only a minor part of the solving
process - most of the time is spent in the linear solver.

r.

Md. Golam Rashed

unread,
Aug 19, 2011, 12:39:58 PM8/19/11
to sfepy...@googlegroups.com
ok, i got it. it'd be very much helpful to have one.
however, i'm seeking theory behind sfepy. can you help me in this regard?
thanks.

Robert Cimrman

unread,
Aug 19, 2011, 1:17:38 PM8/19/11
to sfepy...@googlegroups.com

Well, the theory is well described in any finite element textbook, and even
on-line (e.g. the site Vladimir mentioned) - it's one of standard methods to
solve PDEs (partial differential equations). SfePy implements the basic version
without mesh adaptivity, and uses, for the moment, the most classical,
Lagrangian, basis for polynomial approximation on elements.

If you are really interested in the actual implementation, currently the best
way is to look at the source code in sfepy/fem, starting with
sfepy/fem/problemDef.py where the ProblemDefinition class is defined. But
before that, go through the tutorial (check especially "Sneak peek: what is
going on under the hood" and "Interactive Example: Linear Elasticity" sections).

There is no real "user" documentation of sfepy.fem yet. It would be nice to
have, but I do not have currently power to do it. But I can try to answer any
particular question, so if you have any, ask... :)

r.

Md. Golam Rashed

unread,
Aug 20, 2011, 4:35:19 AM8/20/11
to sfepy...@googlegroups.com
in solving PDE's which approach has been taken?
Galerkin method?

Robert Cimrman

unread,
Aug 20, 2011, 5:02:40 AM8/20/11
to sfepy...@googlegroups.com
Yes, FEM is a variant of Galerkin method with a special choice of the base - it contains functions with small compact support (tied with the mesh elements) leading to a sparse matrix problem.

r.
--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sfepy-devel/-/gDygdediVvAJ.
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.

Md. Golam Rashed

unread,
Aug 20, 2011, 1:13:17 PM8/20/11
to sfepy...@googlegroups.com
OK, so i think anyone with python knowledge can do 3D Finite Element Analysis in sfepy provided that they have the weak formulation of the governing PDE of physical problem and boundary conditions??

Robert Cimrman

unread,
Aug 20, 2011, 1:36:33 PM8/20/11
to sfepy...@googlegroups.com
Yes! Provided the terms used in the weak form of a PDE are already implemented in sfepy. If not, one needs to add them, which may be non-trivial.

r.

----- Reply message -----
From: "Md. Golam Rashed" <rashed...@gmail.com>
To: <sfepy...@googlegroups.com>
Subject: Progress Bar
--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sfepy-devel/-/ycPnjJ_hkjkJ.

Md. Golam Rashed

unread,
Aug 21, 2011, 9:26:53 AM8/21/11
to sfepy...@googlegroups.com
what extra step should i take in doing time-step analysis? i need to do an analysis which involves 300 time-steps, with 100 constants in each time-step. the problem is a multi-scale mass-heat transfer related.

Robert Cimrman

unread,
Aug 22, 2011, 7:10:55 AM8/22/11
to sfepy...@googlegroups.com

Check out the time-dependent examples, e.g.

examples/diffusion/time_poisson.py (long syntax)
examples/diffusion/laplace_time_ebcs.py (short syntax, changing boundary
condition nodes)

Basically, just define the time-stepping solver, and if it's a dynamic
simulation, add some terms with time derivatives of variables, like dT/dt in
the first example above.

What do you mean by "100 constants"?

r.

Md. Golam Rashed

unread,
Aug 22, 2011, 7:42:24 AM8/22/11
to sfepy...@googlegroups.com
well, technically they are not constants, they are variables with given values. but the values change in each time step, much like coefficient changing with time.

is the time-stepping solver different than the standard solver in sfepy? i thought sfepy has built-in time-stepping function.

Robert Cimrman

unread,
Aug 22, 2011, 7:52:53 AM8/22/11
to sfepy...@googlegroups.com

No, it is standard. The examples I mentioned show how to use it.

r.

Md. Golam Rashed

unread,
Aug 22, 2011, 8:44:34 AM8/22/11
to sfepy...@googlegroups.com
Thanks!
will ask you further if stumbled on again.

Md. Golam Rashed

unread,
Dec 24, 2011, 8:21:59 AM12/24/11
to sfepy...@googlegroups.com
bugging you again, for a really fine mesh and a complex problem, it takes large amount of time by sfepy. and as you've mentioned earlier, a progress bar is not suitable for the external solver of sfepy. but i wonder what if an approximated solving time can be estimated from assembly. From the size of the matrix and the processing power of CPU, can a solving time estimation be made (+/- 10% error)???

Robert Cimrman

unread,
Dec 25, 2011, 11:17:50 AM12/25/11
to sfepy...@googlegroups.com

Well, it really cannot be estimated reliably - the solution time depends
heavily on the condition number of the matrix, and it is possible (as
far as I recall), for a given matrix size and number of nonzeros, to
generate a matrix with arbitrarily high condition number -> solution
time from almost zero to infinity. So one could estimate time for a
particular problem, e.g. Poisson, or elasticity, but there is no general
way. Maybe sfepy could just print "solving..." so that you know you have
to wait?

r.

Md. Golam Rashed

unread,
Dec 26, 2011, 8:39:20 AM12/26/11
to sfepy...@googlegroups.com
well that would be nice, if all else is not possible.
can you make the "solving..." statement a dynamic one?
A 3 second loop, with each second "solving"+ 1 dot will be added, after 3 second loop will be restarted. again...
It'll show us that the program is running and not hanged or stuck.
thanks!

Robert Cimrman

unread,
Dec 27, 2011, 3:24:43 PM12/27/11
to sfepy...@googlegroups.com

Well, the problem is that sfepy cannot print anything when the solver
runs - it's still the same process. To do something dynamic like you
want would mean use threading. I would rather avoid such complication.

To conclude: it's easy to print "solving..." before the solver starts
(e.g. if the matrix size is big enough(?)), but nothing more.

Cheers,
r.

Md. Golam Rashed

unread,
Dec 28, 2011, 12:17:55 AM12/28/11
to sfepy...@googlegroups.com
well, the last thing we want is to make sfepy completed.
so just include the print "solving..." statement.

Md. Golam Rashed

unread,
Dec 28, 2011, 12:02:24 PM12/28/11
to sfepy...@googlegroups.com
correction:
well, the last thing we want is to make sfepy complicated.

Robert Cimrman

unread,
Jan 2, 2012, 6:38:16 AM1/2/12
to sfepy...@googlegroups.com
On 12/28/11 18:02, Md. Golam Rashed wrote:
> correction:
> well, the last thing we want is to make sfepy complicated.

Understood :)

> so just include the print "solving..." statement.

I have added 'verbose' option to Solver class, i.e. base class of all solvers.
Currently, only Newton solver uses it: add "'verbose' : True" to the nls.newton
solver options, and it will print 'solving linear system...'.

r.

Reply all
Reply to author
Forward
0 new messages