← Back to team overview

ufl team mailing list archive

Re: [HG UFL] Add function set_loglevel in output.py and change printing in ad.py to ufl_debug.

 

On Mon, Jan 12, 2009 at 10:17:53PM +0100, UFL wrote:
> One or more new changesets pushed to the primary ufl repository.
> A short summary of the last three changesets is included below.
> 
> changeset:   497:da99d5c093fb248990c351324a4e49bd28c877c5
> tag:         tip
> user:        Anders Logg <logg@xxxxxxxxx>
> date:        Mon Jan 12 22:14:47 2009 +0100
> files:       ufl/algorithms/ad.py ufl/output.py
> description:
> Add function set_loglevel in output.py and change printing in ad.py to ufl_debug.

Changed to

  log.set_level(INFO)
  log.set_level(DEBUG)
  etc

in new log.py module.

This is not yet used in UFL, but I suggest we move to it.

I've added some new features copied from the old log module (debug.py)
in FFC:

1. Writing messages and inreasing/decreasing indentation:

   begin("Analyzing form")
   <nested print statements>
   end()

2. One-liners for checks and similar:

  info("Checking whether form is valid...")
  if <check>:
     info("yes")
  else:
     info("no")

Results in

  Checking whether form is valid...  yes

-- 
Anders


> changeset:   496:d0277a7178913b6aabfe2a61d587171b5fc194c8
> user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
> date:        Mon Jan 12 13:25:17 2009 +0100
> files:       ROADMAP ufl/algorithms/forward_ad.py ufl/indexing.py
> description:
> minor details
> 
> 
> changeset:   495:cf4de6795ca6c369314983e26bed0aa58e783e8d
> user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
> date:        Mon Jan 12 11:07:12 2009 +0100
> files:       test/indices.py test/test.py ufl/indexing.py
> description:
> Implemented support for implicit sums of tensor
> expressions in Indexed, not only scalars.
> This makes v.dx(i)[i] and A[i,:][i] valid
> expressions. Altough these look a bit weird,
> they are perfectly valid operations that
> will be documented clearly using pen-and-paper
> syntax.
> 
> ----------------------------------------------------------------------
> For more details, visit http://www.fenics.org/hg/ufl

> _______________________________________________
> UFL-dev mailing list
> UFL-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/ufl-dev

Attachment: signature.asc
Description: Digital signature


Follow ups

References