-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teach FiniteElement how to fill MF::ShapeInfo #9544
Comments
This is a good idea! I guess then we can also eliminate this mess: dealii/source/multigrid/mg_transfer_internal.cc Lines 713 to 722 in 1f3f4df
and maybe part of this: dealii/source/multigrid/mg_transfer_internal.cc Lines 582 to 640 in 1f3f4df
|
I just wanted to suggest the same! |
I hope that we can do; however, this means we need to add another field to the |
@kronbichler Let me know if I can do something or try something out. I have simply copied those two code snippets to my new transfer operators, but I am not happy with that... I will have a look at my code maybe I find some additional requirements! |
The evaluator side also relates to #7039 that should be generalized/restructured in one go. |
This PR will involve some time we don't have at the time. Adjusting the milestone. |
In #14385 we noticed that the cases where we need special treatments, to be addressed by this PR, just keep increasing. I think we should aim for this effort before the next release. |
This is a place where this would be useful: dealii/source/dofs/dof_accessor_set.cc Lines 253 to 254 in e8f5713
since we could replace the full matrix-vector product by sum factorization. |
The information for the tensor product information of certain
FiniteElement
classes is extracted in the structinternal::MatrixFreeFunctions::ShapeInfo
from a given finite element object and a 1D quadrature formula. We do this by some dynamic cast magic indealii/include/deal.II/matrix_free/shape_info.templates.h
Lines 103 to 128 in 1f3f4df
The real solution is to add this as an interface to the
FiniteElement
classes and let them return tensor product information. I plan to do this in three steps:include/deal.II/matrix_free/shape_info.{h,templates.h}
files to thefe/
subfolder, extract it from the internal namespace and give it a proper name. I was thinking along the linesFiniteElementTensorProductInformation
. I would put a template for the number type on this class but not the dimension as a tensor product element is in principle not restricted to a particular dimension.FiniteElement<dim,spacedim>::extract_tensor_product_information(const Quadrature<1> &quadrature, const unsigned int base_element_index = 0)
that returns aFiniteElementTensorProductInformation<double>
. ForFESystem
, the data is filled partly by the children.MatrixFree
by copying to the chosenNumber
type there (e.g.VectorizedArray<float>
) and create an alias at the existingShapeInfo
place.What I want to discuss here before I start is the naming (any suggestions?) and how exactly we would like to set up the interface. One can think of this class/struct as a collection of arrays with evaluation of 1D shape functions along a 1D quadrature and for various combinations of faces/subfaces, so it is pretty low-level and a bit similar to the
InternalDataBase
objects inFiniteElement
, but without the inheritance within the class.The text was updated successfully, but these errors were encountered: