<div dir="ltr">OK, I may as well just say that this is something that has never been quite clear to me. From what it looks, the auxiliary terms tend to denote material properties, or similar spatial varying terms. However, judging from the existence of both the 'constants' vector, as well as the derivative vectors of the auxiliary variables with respect to time and space in the callback call, I am going to guess that it can be used with time dependent terms as well.<div><br></div><div>What I am looking to do is find some way to take the gradient of a first temporal derivative of a variable (displacement), and access this result within one of the residual callback functions that provides input to PetscDSSetResidual. Maybe there is another way to do this (probably.) Any thoughts would be appreciated. </div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Robert L. Walker<br></div><div>MS Petroleum Engineering</div><div>Mork Family Department of Chemicals and Materials Sciences<br></div><div>University of Southern California<br>----------------------------------------------<br></div><div>Mobile US: +1 (213) - 290 -7101<br></div><div>Mobile EU: +34 62 274 66 40<br></div><div><a href="mailto:rlwalker@usc.edu" target="_blank">rlwalker@usc.edu</a><br></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 15, 2018 at 5:25 PM, Robert Walker <span dir="ltr"><<a href="mailto:rlwalker@usc.edu" target="_blank">rlwalker@usc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Sounds like a lovely place to look again.<br><br><div data-smartmail="gmail_signature">sent from an overpriced pocket calculator</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, May 15, 2018, 17:21 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 15, 2018 at 8:11 PM, Robert Walker <span dir="ltr"><<a href="mailto:rlwalker@usc.edu" rel="noreferrer" target="_blank">rlwalker@usc.edu</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">Hello,<div><br></div><div>I am writing a program using PETScDS along with PETScFE and PETScTS in a similar vein to TS examples 45 - 48. I seek to use the auxiliary variables accessed by the pointwise functions in a manner similar to how I understand that MOOSE handles auxiliary variables, that is that in the following:</div><div><pre style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">f0(<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> dim, <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> Nf, <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> NfAux,
</pre><pre style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> uOff[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> uOff_x[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> u[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> u_t[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> u_x[],
</pre><pre style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> aOff[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscInt.html-23PetscInt&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=ZdjNjMAEKJBaB6tdYtlF8OtnD_BYW-T126vR8rJ60_Y&e=" rel="noreferrer" target="_blank">PetscInt</a> aOff_x[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> a[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> a_t[], const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> a_x[],
</pre><pre style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscReal.html-23PetscReal&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=9tKMcRlCN8VCOX2wc7_KpmRHOuXOAnS4-dYYlcHvAXI&e=" rel="noreferrer" target="_blank">PetscReal</a> t, const <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscReal.html-23PetscReal&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=9tKMcRlCN8VCOX2wc7_KpmRHOuXOAnS4-dYYlcHvAXI&e=" rel="noreferrer" target="_blank">PetscReal</a> x[], <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mcs.anl.gov_petsc_petsc-2Dcurrent_docs_manualpages_Sys_PetscScalar.html-23PetscScalar&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=AvpfRlVzQ_jVV9WeiPlpWqnfqUWy23WwV8VL8b-0yrU&e=" rel="noreferrer" target="_blank">PetscScalar</a> f0[])</pre><br></div><div>some indices of the a[] array may hold values generated using the primary variable values of the prior iteration, or may simply point to the primary variables themselves.</div><div><br></div><div>What is the best way to go about this? Apologies if this is either quite obvious or has been extensively addressed before.</div></div></blockquote><div><br></div><div>Not sure where I need to start. First, do you understand how the auxiliary variables are being used in SNES ex12 or ex69?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thank you</div><div><br></div><div><br clear="all"><div><div class="m_7687898621760490530m_408866582052753712m_8347383509654880240gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Robert L. Walker<br></div><div>MS Petroleum Engineering</div><div>Mork Family Department of Chemicals and Materials Sciences<br></div><div>University of Southern California<br>------------------------------<wbr>----------------<br></div><div>Mobile US: +1 (213) - 290 -7101<br></div><div>Mobile EU: +34 62 274 66 40<br></div><div><a href="mailto:rlwalker@usc.edu" rel="noreferrer" target="_blank">rlwalker@usc.edu</a><br></div></div></div></div>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_7687898621760490530m_408866582052753712gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.caam.rice.edu_-7Emk51_&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=BWOpUsAp5dvI5cUiP4uZxQ&m=WqHFdWvXkjvOoNncNHem23n6BSEqrB0SuZChLaVmvtw&s=Gti6BLze7sGAVpo0fvZMevH2ptQyOSWf_UwOK3jcxPE&e=" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><br></div></div></div></div></div>
</div></div>
</blockquote></div></div></div></blockquote></div><br></div>