<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You might want to call TSGetApplicatonContext() in your prestep function.<div class=""><br class=""></div><div class="">Hong<br class=""><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Mar 30, 2016, at 12:54 PM, Christian Peco Regales, Ph.D. <<a href="mailto:cp226@duke.edu" class="">cp226@duke.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">I have started to use the TS environment to solve a diffusion problem with XFEM in which, at the beginning of every step, a number of values have to be recomputed in order to properly fill the Jacobian (e.g. change some quadrature weights). However, I see that the the function is expected with the format func(TS ts), with no possibility of getting a user context to perform the computations I need.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Is there a way to get around that? Thanks!</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Christian <span class=""> </span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="font-family: Helvetica; font-size: 12px;" class="">_______________________________<br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Christian Peco Regales, Ph.D. <br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Postdoctoral Research Associate<br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Civil and Environmental Engineering <br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Pratt School of Engineering<br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Duke University<br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">2407 CIEMAS (office)<br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Durham, NC 27708, USA</div><div style="font-family: Helvetica; font-size: 12px;" class="">email:<span class="Apple-converted-space"> </span><a href="mailto:christian.peco@duke.edu" class="">christian.peco@duke.edu</a><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">web:<span class="Apple-converted-space"> </span><a href="http://christianpeco.com/" id="LPNoLP" class="">http://www.christianpeco.com</a></div><div style="font-family: Helvetica; font-size: 12px;" class="">_______________________________</div></div></div></div></div></blockquote></div><br class=""></div></body></html>