Number of Shape functions problem

6 views
Skip to first unread message

ignat...@gmail.com

unread,
May 1, 2018, 6:53:16 AM5/1/18
to mofem Group
Hi all,

I am currently experiencing a problem with return of number of shape functions.

In my problem I couple two fields, say U and L.
In my doWork function in a UserDataOperator I have implemented, I evaluate end assembly part of the stiffness matrix (where there is OPROWCOL operator assigned).
I have assigned to the rows my L field that is of 2nd order and to cols my U field that is of 3rd order.
When the combination of entities is: row_type = MBEDGE and col_type = MBVERTEX, I would expect that the number of shape functions of the rows would be 1. 
Since for 2nd order field, 1st order hierarchical shape functions would be assigned to vertices and 2nd order would be assigned to edges.
Hence, edges would have only one associated shape function, or at least that is my understanding.


However when I use the piece of code: row_data.getN().size2()
the number that is returned is 2.
Furthermore, for the same case the number of indices I receive for the piece of code: row_data.getIndices().size()
is 1.

Could someone please help to understand this feature?

Thank you very much in advance.

Ignatios


Lukasz Kaczmraczyk

unread,
May 1, 2018, 7:10:15 AM5/1/18
to mofem Group
Hello,

That is correct and expected mofem behaviour, it returns shape functions for a maximal order for given base on the entity. Since you have a second 3rd order for displacements, for h1 space you gave 2 base function. And since you have a 2nd order for lambda, there is only one dof.

You can use this function to get a vector with base functions equal to the number of dofs

auto base_funtcion_at_gaus_pt  = data.getN(gg, data.getFieldData.size());

Reply all
Reply to author
Forward
0 new messages