[petsc-dev] Making FE fields in the beginning
Geoffrey Irving
irving at naml.us
Wed Nov 27 12:43:22 CST 2013
Currently, FE fields on a DMPlex are created with the function
DMPlexProjectFunction
This function has three issues:
1. It doesn't take a void* argument, and therefore requires global
variables if you need to pass in additional data.
2. It operates one quadrature point and a time, so is inefficient in
situations where evaluation overhead can be amortized across multiple
points (especially from scripts). For the workhorse FE routines this
is inconvenient but acceptable since the goal is probably OpenCL, but
it'd would be nice to have access to python and numpy in the setup
phase.
3. It doesn't pass a cell argument, so data in an existing mesh fields
requires a hierarchy traversal to access.
I'm going to make an alternate version of DMPlexProjectFunction that
addresses these issues. If you think it's too early to know the best
way to do this in core petsc, I can put the routine in my code for now
and we can revisit migrating it into petsc later. I'm fine either
way. Concretely, these issues are solved by
1. Adding a void* argument.
2. Batching quadrature point evaluation.
3. Passing the cell index.
so there aren't a lot of choices to get wrong. Really the only choice
is who chooses the batch size.
Geoffrey
More information about the petsc-dev
mailing list