Dear Chengjiang,

This is a good question. This case is supported, but one needs to work slightly harder (and I admit we do not show this case). You should do as follows:

std::vector<Quadrature<1>> quad;
    quad.push_back(QGauss<1>(fe_degree + 1));
    quad.push_back(QGaussLobatto<1>(fe_degree + 2));
    mf_data.reinit(MappingQ1<dim>{},
                   dof,
                   constraints,
                   quad,
                   typename MatrixFree<dim, number>::AdditionalData(
                     MatrixFree<dim, number>::AdditionalData::none));

I added a test with this code now to make sure this feature keeps working: https://github.com/dealii/dealii/pull/18148 . If you want to construct the quadrature objects in place, you should be able to do so by casting both objects in the initializer list to Quadrature<1>.

Best regards,
Martin

Am 19.02.25 um 07:40 schrieb Chengjiang Yin:
Hi all,

I notice that the overloaded member function of MatrixFree::reinit <https://www.dealii.org/current/doxygen/deal.II/classMatrixFree.html#adf70156869fbd945c40fb5d2cb0b921e> says MatrixFree support multi-component finite elements together with multiple quadrature formulas.

However the quadratures are input by *std::vector<QuadratureType>*. Since std::vector does not have polymorphism, does this mean _only the same type of quadrature with different quadrature degrees are supported_? ( for example std::vector{QGauss<1>(2), QGauss<1>(3)}, but not std::vector{QGauss<1>(2), QGaussLobatto<1>(3)} )

I have checked the tutorials and test cases and didn't find any example of using this reinit function.

Regards
Chengjiang Yin
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/dealii/7e995192-78a4-44a4-8cdd-d12450858ae7n%40googlegroups.com <https://groups.google.com/d/msgid/dealii/7e995192-78a4-44a4-8cdd-d12450858ae7n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/d7de654a-0cd4-41c8-8a94-fad845690d0d%40rub.de.

Reply via email to