Problem with FESystem and VectorTools::project_boundary_values_curl_conforming_l2 in 3d

53 views
Skip to first unread message

winnifried

unread,
Oct 29, 2019, 1:06:26 PM10/29/19
to deal.II User Group
Dear all,

I encountered the following issue while trying to solve a Maxwell eigenvalue problem in dealii v 9.1.1.

When using an FESystem<3> containing one FENedelec and other elements and trying to set boundary values
via

VectorTools::project_boundary_values_curl_conforming_l2

where the argument of first_vector_component is set to the starting component of the FENedelec.
The problem has two parts, the first is solved the second is not and input is appreciated.

Part 1 (solved):
When the FESystem contains two FENedelec of different degree.

Running the attached code (main.cc) ends in debug mode with the
error

The violated condition was:
    associated_edge_dofs == degree + 1
Additional information:
    Error: Unexpected number of 3D edge DoFs

triggered by line 31 (main.cc).

The error is caused by the fact, that in vector_tools.templates.h the degree is calculated using

fe.degree - 1

which for FESystem is the wrong value as it is the maximum degree and not the degree of the selected element.
It seems to me, that a fix for this is to use

fe.base_element(base_indices.first).degree - 1;

a few lines later once the user indicated base_element is known.
Once this is done, in debug mode in the attached example line 31 still gives an error since
in VectorTools::compute_face_projection_curl_conforming_l2 a 0-by-0 matrix for the face dofs is to be inverted.
I am not sure why this pops up as it did not appear with the original version using only FENedelec of lowest order.

Anyways this seems to be easy to fix. A patch for vector_tools.templates.h (in dealii v9.1.1) is attached
- it is not tested that the computed result is correct, only that this fixes the wrongly chosen degree and produces no errors.

Part 2 (input needed):
Unfortunately this did not solve the original problem in full. If the FESystem does not only contain FENedelec, but another FE_Q
and after applying the patch the original error "Unexpected number of 3D edge DoFs"
still pops up in line 42 of the attached example, this time not because the wrong degree is selected, but because the

if(((dynamic_cast<const FESystem<dim> *>(&fe) !=
                            nullptr) ...
               
statement in line 5440 of the patched vector_tools.templates.h is never true in this case.
Any input on why this might happen is appreciated - in particular whether the assumptions made on the ordering of the
dofs is correct for such FESystems.

Thanks
Winni
vector_tools.templates.h.patch
main.cc

Daniel Arndt

unread,
Oct 29, 2019, 3:46:26 PM10/29/19
to dea...@googlegroups.com
Winni,

Would you mind creating a pull request for the first issue you are reporting?

Best,
Daniel

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/1eea5fd0-6acb-40e1-b55d-43d94d8fe22d%40googlegroups.com.

Wolfgang Bangerth

unread,
Oct 29, 2019, 5:08:31 PM10/29/19
to dea...@googlegroups.com
On 10/29/19 1:46 PM, Daniel Arndt wrote:
>
> Would you mind creating a pull request for the first issue you are reporting?

Indeed -- and also open a github issue about the second, so that the issue
isn't forgotten.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Winnifried Wollner

unread,
Oct 30, 2019, 5:20:35 AM10/30/19
to dea...@googlegroups.com
Dear Wolfgang, dear Daniel,
sure I will do so.

Best
Winni

On 10/29/19 10:08 PM, Wolfgang Bangerth wrote:
> On 10/29/19 1:46 PM, Daniel Arndt wrote:
>>
>> Would you mind creating a pull request for the first issue you are reporting?
>
> Indeed -- and also open a github issue about the second, so that the issue
> isn't forgotten.
>
> Best
> W.
>
>

--
--------------------------------------------------------
Prof. Dr. Winnifried Wollner
Technische Universität Darmstadt
Fachereich Mathematik
Dolivostr. 15; 64293 Darmstadt; Germany
--------------------------------------------------------
Room : 119
Phone: +49 (0)6151 16-23434
Web : http://www2.mathematik.tu-darmstadt.de/~wollner
eMail: wol...@mathematik.tu-darmstadt.de
--------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages