Assembling gradient jump at faces with FESystem

79 views
Skip to first unread message

Praveen C

unread,
Apr 25, 2024, 1:07:19 AM4/25/24
to Deal. II Googlegroup
Hello

In a continuous Galerkin method, I want to assemble terms involving jump in solution gradient and shape function gradient.

For this, FEInterfacesValues seems like a good choice. But the function

get_jump_in_function_gradients

https://www.dealii.org/current/doxygen/deal.II/classFEInterfaceValues.html#aef23f7eee71cc8cbf22ca2cfde9dcdd9

seems to work only for scalar FE, while I have an FESystem.

Is this not implemented for vector FE, and what other options are there to assemble such terms ?

best
praveen

Nils Schween

unread,
Apr 25, 2024, 3:21:28 AM4/25/24
to dea...@googlegroups.com
Dear Praveen,

I think FEInterfaceValues is not implemented for FESystem. In my case, it actually
just returned zeros without throwing an assertion. It is however more
than two years ago I experimented with it.

An alternative way to implement a face_worker without FEInterfaceValues
can be found in Step 12b, i.e. on
https://github.com/dealii/dealii/issues/15839.

Notice, it is probably best to focus on the face_worker only, because
the tutorial seem to contain outdated code, see
https://github.com/dealii/dealii/issues/15839

Regards,
Nils
--
Nils Schween
PhD Student

Phone: +49 6221 516 557
Mail: nils.s...@mpi-hd.mpg.de
PGP-Key: 4DD3DCC0532EE96DB0C1F8B5368DBFA14CB81849

Max Planck Institute for Nuclear Physics
Astrophysical Plasma Theory (APT)
Saupfercheckweg 1, D-69117 Heidelberg
https://www.mpi-hd.mpg.de/mpi/en/research/scientific-divisions-and-groups/independent-research-groups/apt

Nils Schween

unread,
Apr 25, 2024, 3:25:05 AM4/25/24
to dea...@googlegroups.com
I am sorry, I posted the wrong link.
The correct link to Step 12b is
https://dealii.org/developer/doxygen/deal.II/step_12b.html

Best,
Nils

Praveen C

unread,
Apr 25, 2024, 3:44:27 AM4/25/24
to Deal. II Googlegroup
Thanks Nils you for sharing your experience. I may have to look into MeshWorker, but currently I am using WorkStream. I think with FEInterfaceValues, we can still compute the gradients and then compute the jumps, which seems easier to implement, than switching to MeshWorker. I will give that a try first.

best
praveen
> --
> 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/877cglx5tc.fsf%40mpi-hd.mpg.de.

Wolfgang Bangerth

unread,
Apr 25, 2024, 7:55:50 AM4/25/24
to dea...@googlegroups.com
On 4/25/24 01:21, Nils Schween wrote:
>
> I think FEInterfaceValues is not implemented for FESystem. In my case, it actually
> just returned zeros without throwing an assertion. It is however more
> than two years ago I experimented with it.

That would be a bug. We'd love to have a small test case that illustrates this.

Best
W.

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


Praveen C

unread,
Apr 25, 2024, 9:33:35 AM4/25/24
to Deal. II Googlegroup
Hello Wolfgang

FEFaceValues has two types of functions

void get_function_values (const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const

void get_function_values (const InputVector &fe_function, std::vector< Vector< typename InputVector::value_type > > &values) const

But FEInterfaceValues only has the first one, which is for scalar FE.

void get_jump_in_function_values (const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const

It looks like vector FE case is not implemented fully.

best
praveen

Timo Heister

unread,
Apr 25, 2024, 10:34:10 AM4/25/24
to dea...@googlegroups.com
If you use an FESystem, you typically don't need the evaluation done over all components. Instead, use an FEValuesExtractor and you should have everything available:
I'd anything is wrong or missing, please open an issue.


--
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.

Nils Schween

unread,
Apr 26, 2024, 6:03:34 AM4/26/24
to dea...@googlegroups.com
Thank you!
It is good to know that the idea is to use FESystem, FEInterfaceVAlues
and FEValuesExtractor together. I did not know this.

However, our application is particular in that we actually do evaluate
all the components to our FESystem at each interface.

At the moment I do not have time to dig out my old code. But I will
check if I can still reproduce my claim that FEInterfaceValues returns
zeros without throwing an assertion if used in conjunction with FESystem
later this year and, in case it does, open issue.

I am sorry that I cannot do it now.

Best,
Nils
Reply all
Reply to author
Forward
0 new messages