API issues
-
~~sequnced vtk writer:
vtk = grid.writeVTK("twophaseB", ...number=0)``` vtk.write("twophaseB", count)
why do we repeat the name here (and the counter). Should we introduce
vtk.write()
which works in the case thatnumber
was passed to the constructor ofgrid.writeVTK
~~ One can usesequencedVTK
-
the first argument inPassing thefem.adapt(hgrid,[solution])
seems redundant since the df's have to know thegridpart
and therefore thehgrid
anyway. Sofem.adapt(solution1,solution2,...,solutionN)
seems more Pythonic.hgrid
as first argument is deprecated, use eitherfem.adapt([df1,df2,...])
or even simplerfem.adapt(df1,df2,...)
-
Now we always have
hgrid.mark(mark) fem.adapt(hgrid,[solution]) fem.loadBalance(hgrid,[solution])
which is fine but we could add a auxiliary method
fem.adapt(mark,solution1,...,solutionN)
to do this in one go. Also we could consider reducing the cost of the callback, e.g.,mark=Adapt(strategy, uflExpr, refTol, crsTol, maxLevel) fem.adapt(mark,solution1,...,solutionN)
-
At the moment to construct amodel
by passing in an equation but actually an expression is enough. Especially when only setting up operators (ref estimator) this looks weird. So a model could just take an expression which is then understood to translate to
==0
when put into a scheme.