On 4/6/24 16:24, Mohamad Ghadban wrote:
*
*
But when I changed the first FESystem into:
*FESystem[FE_Q(1)^2-**FE_Q(1)^1**]*
it worked fine because the number of base elements in both FESystems is now the same. My question is then, is this assertion necessary?

Julian's suggestion works, but if you have two variables that are defined everywhere and one that is defined in only part of the domain, then what you are suggesting (working with only three components) makes sense to me.

You've already found how to make that work without getting the assertion. As to the question of whether the assertion is necessary: Perhaps not, but the function in question (FESystem::compare_for_domination()) might be substantially more complicated to implement. The way it is implemented is to assume that the two elements you are comparing have the same number of base elements and multiplicities, and in that case determining which element dominates is a question of determining which base element dominates. If you wanted to remove the assertion (patches as always welcome!) you have to break things into smaller components and compare those for domination. Here, if you have
  FESystem[FE_Q(1)^3]
and
  FESystem[FE_Q(1)^2-FE_Nothing^1]
that would not be too difficult. I bet that could be done in 25 extra lines of code (again: patches are very much welcome!) but the difficult case is you have
  FESystem[FE_Q(1)^3]
and
  FESystem[FESystem[FE_Q(1),FE_Q(1)]-FE_Nothing^1]
for example.

Best
 Wolfgang

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


--
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 on the web visit 
https://groups.google.com/d/msgid/dealii/32538aef-9787-40ea-af0e-f230177e0c45%40colostate.edu.

Reply via email to