libCEED
libCEED copied to clipboard
PETSc BPs with tetrahedral elements
DMPlex can read/create non-tensor meshes (see the simplex
argument to DMPlexCreateBoxMesh()
). PetscFEGetCellTabulation()
will return the (non-tensor) tabulated basis matrices.
We should add to examples/petsc/bps.c
:
- Add a run-time flag to pass the non-tensor representation to libCEED. This is just to measure how much we'd give up if we weren't exploiting the tensor product. I think this will sometimes be useful for comparisons, but we'll likely never want it in practice (beyond first order).
- Add
-simplex
to use a simplicial mesh.
Yes, I agree that this is a good idea. I have used it in my valeria/bps-on-a-sphere
branch and I think I also had it in my area example at some point (not anymore though).
With
CEED_EXTERN int CeedBasisGetQRef(CeedBasis basis, const CeedScalar **qref);
CEED_EXTERN int CeedBasisGetQWeights(CeedBasis basis,
const CeedScalar **qweight);
CEED_EXTERN int CeedBasisGetInterp(CeedBasis basis, const CeedScalar **interp);
CEED_EXTERN int CeedBasisGetInterp1D(CeedBasis basis,
const CeedScalar **interp1d);
CEED_EXTERN int CeedBasisGetGrad(CeedBasis basis, const CeedScalar **grad);
CEED_EXTERN int CeedBasisGetGrad1D(CeedBasis basis, const CeedScalar **grad1d);
Now in the public API, this should be pretty easy to add a non-tensor version of the basis when one of us gets some time (haha).
We added this in Ratel. Do we want someone to pull this work back over here for bps.c
when they get the chance?
I'd like to do that.
Cool! Basically, RatelCreateBasisFromPlex()
from this commit:
https://gitlab.com/micromorph/ratel/-/merge_requests/30/diffs?commit_id=81929f94fab8b238e5142abe5a65375bfc22c72e
needs to make its way back into examples/petsc/src/libceedsetup.c
But doing so will probably also mean updating CeedLevelTransferSetup()
to use CeedOperatorMultigridLevelCreate()
as well.
Since our use of DMPlexCreateBoxMesh()
is embedded deeply in bps.c
, we'll probably want to add a command line flag to swap back and forth between tensor and simplex hexes. However we do it would also need to go into multigrid.c
.
Thanks for the instruction, I'll start probably next week.