Nutils 2.0 was released on February 18th, 2016.
These are the main additions and changes since Nutils 1 Bakmi.
The jump operator has been changed according to the following definition:
jump(f) = opposite(f) - f. In words, it represents the value of the argument
from the side that the normal is pointing toward, minus the value from the side
that the normal is pointing away from. Compared to the old definition this
means the sign is flipped.
The Topology base class no longer takes a list of elements in its constructor.
__iter__ method should be implemented by the derived class, as
__len__ for the number of elements, and getelem(index) to access
individual elements. The 'elements' attribute is deprecated.
nutils.topology.StructuredTopology object no longer accepts an array with
elements. Instead, an 'axes' argument is provided with information that allows
it to generate elements in the fly. The 'structure' attribute is deprecated. A
shape tuple is now a documented attribute.
Two global properties have been renamed as follows:
- dumpdir → outdir
- outdir → outrootdir
outrootdir defaults to ~/public_html and can be redefined from the
command line or in the .nutilsrc configuration file. The outdir defaults to the
current directory and is redefined by
util.run, nesting the name/date/time
subdirectory sequence under
The behaviour of
nutils.function.sum is inconsistent with that of the Numpy
counterparts. In case no axes argument is specified, Numpy sums over all axes,
whereas Nutils sums over the last axis. To undo this mistake and transition to
Numpy's behaviour, calling sum without an axes argument is deprecated and will
be forbidden in Nutils 3.0. In Nutils 4.0 it will be reintroduced with the
nutils.function.outer method allows arguments of different dimension by
left-padding the smallest prior to multiplication. There is no clear reason for
this generality and it hinders error checking. Therefore in future in
a.ndim must equal
b.ndim. In a brief transition
period non-equality emits a warning.
Relevant only for custom
nutils.function.Evaluable objects, the
method changes from constructor argument to instance/class method:
class MyEval( function.Evaluable): def __init__(self, ...): function.Evaluable(args=[...], shape=...) def evalf( self, ...): ...
args argument may only contain Evaluable objects. Static
information is to be passed through
At this point Nutils is pure Python. It is no longer necessary to run make to compile extension modules. The numeric.py module remains unchanged.
Touching elements of periodic domains are no longer part of the
topology. It is still available as boundary of an appropriate non-periodic
domain.boundary['left'] # no longer valid domain[:,:1].boundary['left'] # still valid
nutils.transform module provides objects and operations relating to
affine coordinate transformations.
The new command line switch
--tbexplore activates the traceback explorer on
program failure. To change the default behavior add
tbexplore=True to your
The new command line switch
--richoutput activates color and unicode output.
To change the default behavior add
richoutput=True to your .nutilsrc file.