I am reading weak imposition by Lagrange multiplier. I don’t understand where the term \int_{\Gamma}\lambda v comes from in the first equations of weak imposition and why it is necessary. What’s the meaning of it? The rest of the first eq should come as in the usual formulation. The second eq should be a direct formulation on the Dirichlet bc. In the tutorial the author used blocked formulation. Can it also be written without this blocked method?
I am solving an elasticity problem. The systems read as \partial_i\sigma_{ij} + f_j = 0 on \Gamma n_i\sigma_{ij}=g_j on \partial \Gamma
where i=1,2, n_i is the boundary norm, \sigma_{ij} is a function of unknown u_1, u_2. Is it legal in principle, regardless of convergence, stability or any other potential numerical issue, to use Lagrange multiplier to impose this Dirichlet condition for \sigma_{ij}?
The way I derive the equation is through the minimization of the energy of the system. For the block formulation, in principle you could define a mixed element and use it instead of the block formulation. I dislike this, and that is why I do not propose it in the tutorial. You are welcome to try, and report any issue in the multiphenicsx bug tracker.
The unknown of an elasticity problem is the displacement u, while sigma in your formulation is a stress. Boundary conditions on u are Dirichlet conditions, boundary conditions on the stress are Neumann conditions. There is no need to use a Lagrange multiplier for sigma (Neumann), since that naturally becomes a boundary integral on the right-hand side.
The restriction on bulk and boundary are defined respectively. And
A = multiphenicsx.fem.petsc.assemble_matrix_block(a_cpp, bcs=[], restriction=(restriction, restriction))
it was used when generating the matrix block. And it is repeated twice… And
F = multiphenicsx.fem.petsc.assemble_vector_block(f_cpp, a_cpp, bcs=[], restriction=restriction)
ul = multiphenicsx.fem.petsc.create_vector_block(f_cpp, restriction=restriction)
it was used when generating vector block and to obtain the solution. I don’t really understand what restriction mean and meaning of it and why they are here. Can you say something about this? Thank you.
The session understand restrictions doesn’t work for me much… Im not sure if this is what I am asking…
A multiphenicsx.fem.DofMapRestriction selects a subset of the dofs in a function space, and is used to “define” an unknown that lives only on those dofs.
is used to extract out of all dofs in M.dofmap the ones associated to dofs_M_Gamma, i.e. (a few lines above) the ones that live on the boundary of the domain.
Call n1 the number of dofs in V (and actually, also in restriction_V, if you look at how dofs_V is defined), n2 the number of dofs in M, and n3 < n2 the number of dofs in restriction_M_Gamma.
Then,
B = dolfinx.fem.petsc.assemble_matrix_block(a_cpp, bcs=[])
would assemble a (n1 + n2) x (n1 + n2) matrix, with several zero rows and zero columns (all those associated to dofs in M but not in restriction_M_Gamma). Instead
A = multiphenicsx.fem.petsc.assemble_matrix_block(a_cpp, bcs=[], restriction=(restriction, restriction))
assembles a (n1 + n3) x (n1 + n3) matrix, which does not have any of those zero rows/cols.