Mfem: How to deduce fluxes in custom example 8?

Created on 10 Feb 2020  路  4Comments  路  Source: mfem/mfem

Hi there!
Please, would someone kindly enlighten me as to how to deduce the vector (flux) solution in the custom example 8? Or we just do as for the potential,
step 10:
$$
GridFunction xhat;
xhat.MakeRef(xhat_space, x.GetBlock(xhat_var), 1);
$$
Thank you much,
zaq

fem question

All 4 comments

I thought the static-condensation/hybridization are rather useful
when having kind of block form system... but looking at ex4 et ex8, I am confused.
Can someone explain to me why there is a need for using staticCondensation in ex4 but not in ex8?
Thank you,
zaq

Regarding your first question: the code above for xhat should work -- just need to set the last argument of MakeRef to 0 instead of 1. Note that the xhat GridFunction lives only on the mesh interface, so visualizing it in GLVis will not work -- it has to be extended to the interiors of all elements for that to work, e.g. in a Raviart-Thomas space.

Regarding your second question: the static condensation in MFEM is very standard -- it is applied at the level of the BilinearForm and it eliminates all DOFs in all elements that are internal to the element. The hybridization algorithm in MFEM is somewhat different from the classical hybridization algorithm, e.g. when applied to the mixed formulation of a Poisson problem. In MFEM hybridization is applied at the level of the BilinearForm (similar to static condensation) and requires you to specify a suitable Lagrange multiplier space that lives on the mesh interface. In addition one has to provide a special "jump" integrator that couples the multiplier space with the (broken) space on which the BilinearForm is defined. Then when hybridized BilinearForm is converted to a linear system by a call to FormLinearSystem, the resulting linear system is for the multiplier unknowns. In Example 4, this system is easier to solve than the original system and ultimately gives the same solution after recovery via RecoverFEMSolution. In Example 8, on the other hand, the discretized system does not consist of a single BilinearForm, so applying hybridization (or static condensation) to the block system is not readily available.

Thank you very much, @v-dobrev for the reply and detailed explanation.
That was really helpful. Just two more questions before closing this issue.

  1. Reagarding the RecoverFEMSolution(), what should be its return content when using hybridization?
    Does it give straightforwardly the THREE variables (lambda, pressure, velocities)? If so how are they ordered? byNODES? Otherwise, we get only the lambda solution and have to deduce the pressure by restriction, and velocities by what...?
  2. In the mini app extruder.cpp, how to extrude a segment into a triangle? Why GLVis can not display an extruded triangular mesh into tetra one? I tried and did not work for me.
    Thank you,
    zaq
  1. RecoverFEMSolution returns the solution GridFunction, the Lagrange multipliers are used only internally and in principle are not exposed to the user.

  2. The Extruder miniapp perform just Cartesian extension (i.e. the final domain is the Cartesian product of the initial domain with an interval). It can't extend an interval to a triangle.

The original question was answered, so I will close this issue. If you want to follow up on the above, please open separate issues, so it is easier for other users to search.

Was this page helpful?
0 / 5 - 0 ratings