Hi
I'm a beginner to MFEM and try to use it for electromagnetic modelling.
I'm struggling to find a way to impose constraints, such as the the sum of current density in a domain is equal to the given total current : 鈭獼ds=I.
I'm trying to use the Hybridization to add the Lagrange multiplier to add this constraint :
[A Ct] [J] [ f ]
[C 0 ] [位] = [ I ]
However, it seems the Hybridization class in MFEM forces the RHS part I to be zero, and the RHS cannot be edited, as in https://arxiv.org/abs/1801.08914., 2.3 :
[A Ct] [x] [ f ]
[C 0 ] [位] = [ 0 ]
Did I understand it correctly ? If yes, how could I add constraints to the LHS variables like that ?
Thanks very much !
@chakshinglee, do you think you can help with this issue?
The Hybridization class in MFEM is intended to impose continuity constraints for basis functions on element interface. For example, for a basis function ``v" in the Raviart Thomas FE space that is supported in two elements, we split it into two parts (v1 and v2) and each of which is supported only in one element, and then the matrix C enforces a certain constraint on v1 and v2 on the element interface that effectively combines the two to restore v.
For example, NormalTraceJumpIntegrator in ex4p is an implementation of Example 2.2 in https://arxiv.org/abs/1801.08914. While you have the flexibility to implement another constraint, however, the constraint is supposed to enforce continuity of basis functions between neighboring elements.
Therefore, the Hybridization class is not suitable for enforcing the constraint on sum of current density.
Now, in order to obtain the system that you described, I suggest to make use of BlockOperator as in ex5p. That is, you assemble A and C separately, and then put them into a block system. I guess you already know how to assemble A. For C, if you don't want to implement a new class, you probably can first assemble a mass matrix using VectorFEMassIntegrator, and then its column sum (1 by n matrix) should be the constraint matrix.
Many thanks for your explanation regarding the Hybridization class. It really clarifies the difference between the constraints for continuity on the element interfaces and the "macroscale" constraints I'm looking for. I'll try to use the block system to implement my constraints and then come back when it works.
Thanks !
Closing this issue for now. Feel free to reopen if you have any further questions.
Most helpful comment
Many thanks for your explanation regarding the Hybridization class. It really clarifies the difference between the constraints for continuity on the element interfaces and the "macroscale" constraints I'm looking for. I'll try to use the block system to implement my constraints and then come back when it works.
Thanks !