On 2013-10-31 09:42, Mikael Mortensen wrote:
Dear all,
I have been inspired by the new LocalSolver class of Garth and I'm
currently trying out ideas to compute "projections" locally without
going through a global coefficient matrix and a global linear algebra
solve. I just wanted to ask if anyone has any experience with this? If
so, I would be very interested to hear about it. I'm particularly
interested in speeding up the following:
V = FunctionSpace(mesh, "CG", 1)
p = Function(V)
dpdx = project(p.dx(0), V)
My first efforts on using a local averaging operator has been put in
branch
https://bitbucket.org/fenics-project/dolfin/branch/mikael/local-average-operator
[1]. For small problems I have found it to be 4-5 times faster than
the regular project shown above, and the accuracy is vey similar.
This can already be done with LocalSolver. For projection onto a
continuous basis, it is mathematically unsound because it depends on the
order in which cells are visited, but it is useful for post-processing
very large problems.
For projection onto a discontinuous basis, LocalSolver gives the same
result as the global projection algorithm, but uses virtually no memory
and I would expect is more than 4-5 times faster.
For cell-wise averages, just use LocalSolver and a P0 basis.
I don't think we should make simple wrappers for unsound operations,
even when the operation can be useful. A user should 'know' when they're
doing something that's fishy. We could consider
V = FunctionSpace(mesh, "CG", 1)
p = Function(V)
dpdx = local_project(p.dx(0)) # project onto P0 basis
Garth
Best regards
Mikael
------------
Dr. Mikael Mortensen
Associate Professor
Department of Mathematics
Mechanics Division
University of Oslo
Phone: +47-22855866
Mob: +47-41407201
Email: [email protected]
Links:
------
[1]
https://bitbucket.org/fenics-project/dolfin/branch/mikael/local-average-operator
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics