OpSetBc and Own Operators

54 views
Skip to first unread message
Assigned to inz.karol...@gmail.com by lik...@wp.pl

Rich Olley

unread,
Sep 28, 2021, 6:47:30 AM9/28/21
to MoFEM Q&A

Hello,

I was wondering how are own implemented operators taking into account indices changes triggered by OpSetBc from forms integrators?

Also, is inheriting from the Assembly struct from forms integrators the only way to do so?

Thank you

Richard

Lukasz Kaczmraczyk

unread,
Sep 28, 2021, 7:09:57 AM9/28/21
to MoFEM Q&A
Hi Richard,

OpSetBc works in such a way, that when you call VecSetValuse or MatSetValuse, indices that you like to skip, are marked as -1. OpSetBc is search for indices that are on boundary, e,g. when you have set velocities and set -1 on them. 

The idea is that DOFs on the boundary where you set essential boundary conditions are governed by different equations than other DOFs in the volume. So if you assemble volume you skip DOFs on volume, set -1 on them, and when you assemble boundary equation you do the opposite.

Answering the second part of your equation. No, but you have to use 

constexpr auto VecSetValues = MoFEM::VecSetValues<EssentialBcStorage>;
constexpr auto MatSetValues = MoFEM::MatSetValues<EssentialBcStorage>;

to assemble the right-hand vector and left-hand side matrix. Specialized VecSetValues and MatSetValues, do the actual job setting element by element, entity by entity -1 to DOFs. OpSetBc stores information on entities to be used by Specialized VecSetValues and MatSetValues.

Regards,
Lukasz

Rich Olley

unread,
Sep 28, 2021, 7:59:59 AM9/28/21
to MoFEM Q&A
Hello Lukasz,

Thank you for the clear answer and explanation.

Richard

Reply all
Reply to author
Forward
0 new messages