<div dir="ltr">Hi,<div><br></div><div>Still hoping somebody can point me in the right direction to do this. I now think I probably do not need the D1 operator since I want to add equations for the variables directly, but:</div><div><br></div><div><span style="font-size:13px"> // Constraints as Lagrange Multipliers</span><br style="font-size:13px"><span style="font-size:13px"> Galerkin { [ TensorDiag[ 1, 1, 1 ] * Dof{l} , {u} ] ;</span><br style="font-size:13px"><span style="font-size:13px"> In Fixation ;</span><br style="font-size:13px"><span style="font-size:13px"> Jacobian Vol ; Integration GradGrad ; }</span><br style="font-size:13px"><span style="font-size:13px"> Galerkin { [ TensorDiag[ 1, 1, 1 ] * Dof{u} , {l} ] ;</span><br style="font-size:13px"><span style="font-size:13px"> In Fixation ;</span><br style="font-size:13px"><span style="font-size:13px"> Jacobian Vol ; Integration GradGrad ; }</span><br></div><div><span style="font-size:13px"><br></span></div><div>still results in zero rows in the matrix. I've now resorted to exporting the matrix to Matlab, adding the equations there and solving. This appears to work but is not really ideal...</div><div><br></div><div>Maybe I need one of the GlobalEquations for this (I have a hard time understanding these...)</div><div><br></div><div>Any thoughts or help very much appreciated!</div><div><br></div><div>Best regards,</div><div><br></div><div>Jasper</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 12:17 PM, Jasper <span dir="ltr"><<a href="mailto:funkybob@gmail.com" target="_blank">funkybob@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>Does anybody have an idea how to implement a Lagrange multiplier in GetDP instead of a constraint? In this case for a mechanical problem. I've tried adding the following:<br><br>To the FunctionSpace add the variables for the Lagrange multiplier [ lxn, lyn, lzn ] that support the nodes defined in region "Fixation":<br><br> { Name H_l_Mec3D ; Type Vector ;<br> BasisFunction {<br> { Name txn ; NameOfCoef lxn ; Function BF_NodeX ;<br> Support Fixation ; Entity NodesOf[ All ] ; }<br> { Name tyn ; NameOfCoef lyn ; Function BF_NodeY ;<br> Support Fixation ; Entity NodesOf[ All ] ; }<br> { Name tzn ; NameOfCoef lzn ; Function BF_NodeZ ;<br> Support Fixation ; Entity NodesOf[ All ] ; }<br> }<br> Constraint {<br> }<br> } <br><br>Then in the Formulation I add the equations (identity matrix for now) on the off-diagonals, i.e. [ 0 I; I 0 ] * [ u; l ] = [ 0; 0 ]:<br><br> // Constraints as Lagrange Multipliers<br> Galerkin { [ TensorDiag[ 1, 1, 1 ] * Dof{D1 l} , {D1 u} ] ;<br> In Fixation ;<br> Jacobian Vol ; Integration GradGrad ; }<br> Galerkin { [ TensorDiag[ 1, 1, 1 ] * Dof{D1 u} , {D1 l} ] ;<br> In Fixation ;<br> Jacobian Vol ; Integration GradGrad ; }<br><br>But somehow this does not work. I have checked the matrices and the rows are added, but somehow they are all zero, so the identity matrix does not show up.<div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div>Best regards,</div><div><br></div><div>Jasper</div></div>
</blockquote></div><br></div>