<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannerpkokbdm { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtonpkokbdm:hover, .pfptPrimaryButtonpkokbdm:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtonpkokbdm:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
Take a look at https: //gitlab. com/petsc/petsc/-/blob/main/src/snes/tutorials/ex11. c?ref_type=heads and the discussion at the beginning (including the reference to the original paper) On Sat, Mar 23, 2024, 15: 03 Gong Yujie <yc17470@ connect. um. edu. mo>
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBannerpkokbdm" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBannerpkokbdm" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannerpkokbdm" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBannerpkokbdm" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="auto">Take a look at <a href="https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex11.c?ref_type=heads__;!!G_uCfscf7eWS!er4CI8GIe7OCWvCmRKQpZt6FOz1QYvbuZOdf2Fm7pvMGee3I9M5bhjNytv42F9C17NpBy0i6mTfgEmQfUR_QOqwC7gC6pYk$">https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex11.c?ref_type=heads</a> and the discussion at the beginning (including the reference to the original paper)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 23, 2024, 15:03 Gong Yujie <<a href="mailto:yc17470@connect.um.edu.mo">yc17470@connect.um.edu.mo</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="display:none!important;display:none;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden">
Dear PETSc group, I'm reading the DS part for the discretization start from SNES ex17. c which is a demo for solving linear elasticity problem. I have two questions for the details. The first question is for the residual function. Is the residual
</div>
<div style="display:none!important;display:none;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden">ZjQcmQRYFpfptBannerStart</div>
<u></u>
<div dir="ltr" id="m_-771986610213191499pfptBannernnzwwir" style="display:block!important;text-align:left!important;margin:16px 0px 16px 0px!important;padding:8px 16px 8px 16px!important;border-radius:4px!important;min-width:200px!important;background-color:#d0d8dc!important;background-color:#d0d8dc;border-top:4px solid #90a4ae!important;border-top:4px solid #90a4ae">
<div id="m_-771986610213191499pfptBannernnzwwir" style="float:left!important;display:block!important;margin:0px 0px 1px 0px!important;max-width:600px!important">
<div id="m_-771986610213191499pfptBannernnzwwir" style="display:block!important;background-color:#d0d8dc!important;color:#000000!important;color:#000000;font-family:'Arial',sans-serif!important;font-family:'Arial',sans-serif;font-weight:bold!important;font-weight:bold;font-size:14px!important;line-height:18px!important;line-height:18px">
This Message Is From an External Sender
</div>
<div id="m_-771986610213191499pfptBannernnzwwir" style="display:block!important;background-color:#d0d8dc!important;color:#000000!important;color:#000000;font-weight:normal;font-family:'Arial',sans-serif!important;font-family:'Arial',sans-serif;font-size:12px!important;line-height:18px!important;line-height:18px;margin-top:2px!important">
This message came from outside your organization.
</div>
</div>
<div style="clear:both!important;display:block!important;line-height:0!important;font-size:0.01px!important;height:0px"> </div>
</div>
<u></u>
<div style="display:none!important;display:none;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden">ZjQcmQRYFpfptBannerEnd</div>
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Dear PETSc group,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I'm reading the DS part for the discretization start from SNES ex17.c which is a demo for solving linear elasticity problem. I have two questions for the details.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The first question is for the residual function. Is the residual calculated as this? The dot product is a little weird because of the dimension of the result.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<img size="34587" style="max-width:1598px" src="cid:b790e49a-5adb-4085-807c-546e7c2d941f"></div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Here \sigma is the stress tensor, \phi_i is the test function for the i-th function (Linear elasticity in 3D contains three equations).</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The second question is how to derive the Jacobian of the system (line 330 in ex17.c). As shown in the PetscDSSetJacobian, we need to provide function g3() which I think is a 4th-order tensor with size 3*3*3*3 in this linear elasticity case. I'm not sure how
to get it. Are there any references on how to get this Jacobian?</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif">
<span style="font-size:12pt;color:rgb(0,0,0)">I've checked about the comment before this Jacobian function (</span><span style="font-size:16px;color:rgb(0,0,0);background-color:rgb(255,255,255)">line 330 in ex17.c</span><span style="font-size:12pt;color:rgb(0,0,0)">)
but don't know how to get this.</span></div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks in advance!</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best Regards,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Yujie</div>
</div>
</blockquote></div>