ufl -> model
A few additional features need to discusse:-
-
Add the option to generate a source from a given exact solution If the exact solution is given in ufl form it should be possible to turn it into a grid function so that one can write code error = l2norm( scheme.solve(), UFLFuncion(grid, exact) )
With this the "error" method should be removed from the scheme class as well as the exact solution method
-
[] Should the "fluxDivergence" include the source, i.e., be a pointwise residual method? If not the estimater need to be changed
-
[] ---actually extend the ufl package by a Cinf space---
-
Add an intersectionSource and intersectionFlux methodto the model class so that ufl's codim one integrals can be used -
[] ---add a term A(u,grad u) : grad(grad(u)) vdx for non variational scheme (show case)---
-
[] If no tmpVars are used the coordinates and coefficients should still be evaluated only once if possible
-
[] Generate model from minimization of functional as available in ufl
-
how do we handle simple parameters, e.g., doubles or constant vectors? -
[] add a method before the model is generated which allows to fix the type of a coefficient to avoid virtualization, i.e.
uOld = spc.interpolate(lambda x: [ math.atan( (10.*x[0]*(1-x[0])*x[1]*(1-x[1]))**2 ) ], name="u_n") un = ufl.coefficient(space) a = inner( u-un, v) * dx model = importModel(grid, a == 0, \ [un.count), uOld], \ ).get()
Alternative: add a GridFunction class to dune.ufl which derived from ufl.Coefficient but takes a given grid function as argument. We could allow for code of the form:
spc = create.space(....) uold = spc.interpolate(....) un = dune.ufl.Function( uold ) u = dune.ufl.TrialFunction( spc ) v = dune.ufl.TestFunction( spc ) a = inner( u - un, v ) * dx
-
[] Extend ufl to allow for entering pde in strong form with special divergence operator
-
Add an assemble method to generate code directly from an ufl functional applied to a given grid function (partial done with integrate() method?