<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 22, 2014 at 9:42 AM, Karl Rupp <span dir="ltr"><<a href="mailto:rupp@iue.tuwien.ac.at" target="_blank">rupp@iue.tuwien.ac.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<div class=""><br>
> Thanks. Also, the physics seems to be controlled by the "op" variable?<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there an interface to change the physics from the user code ?<br>
</blockquote>
<br></div>
I know that our intention is to provide the user with control over the physics in the long run, but (unless Matt implemented something recently) this is still work in progress...<br></blockquote><div><br></div><div>This was just my quick hack. Its not bad for a user to change. You just provide the source for the</div>
<div>pointwise function that you would have on the CPU. I did not put in the interface for passing in a</div><div>string instead of a function pointer because I was the only one using it. If you use it too, I will put</div>
<div>it in.</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">
Best regards,<br>
Karli<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
<a href="https://bitbucket.org/petsc/petsc/src/fb3a4ffdea0449562fb0f58dad4b44552b6d3589/src/dm/dt/interface/dtfe.c?at=master#cl-5028" target="_blank">https://bitbucket.org/petsc/<u></u>petsc/src/<u></u>fb3a4ffdea0449562fb0f58dad4b44<u></u>552b6d3589/src/dm/dt/<u></u>interface/dtfe.c?at=master#cl-<u></u>5028</a><br>
<br>
switch (op) {<br>
case LAPLACIAN:<br>
if (useF0) {ierr = PetscSNPrintfCount(string_<u></u>tail, end_of_buffer - string_tail, " f_0[fidx] = 4.0;\n", &count);STRING_ERROR_CHECK("<u></u>Message to short");}<br>
if (useF1) {<br>
if (useAux) {ierr = PetscSNPrintfCount(string_<u></u>tail, end_of_buffer - string_tail, " f_1[fidx] = a[cell]*gradU[cidx];\n", &count);STRING_ERROR_CHECK("<u></u>Message to short");}<br>
else {ierr = PetscSNPrintfCount(string_<u></u>tail, end_of_buffer - string_tail, " f_1[fidx] = gradU[cidx];\n", &count);STRING_ERROR_CHECK("<u></u>Message to short");}<br>
}<br>
break;<br>
case ELASTICITY:<br>
if (useF0) {i<br>
<br>
<br>
<br>
<br>
On Tue, Apr 22, 2014 at 5:03 AM, Karl Rupp <<a href="mailto:rupp@iue.tuwien.ac.at" target="_blank">rupp@iue.tuwien.ac.at</a><br></div><div class="">
<mailto:<a href="mailto:rupp@iue.tuwien.ac.at" target="_blank">rupp@iue.tuwien.ac.at</a>><u></u>> wrote:<br>
<br>
Hi David,<br>
<br>
<br>
> I'm trying to use<br>
<br>
<br>
-variable_coefficient field with -petscfe_type opencl<br>
-mat_petscfe_type<br>
opencl<br>
<br>
constant coefficients "-variable_coefficient none" works fine,<br>
but I am<br>
getting NaN in my residual vector for spatially varying<br>
coefficients.<br>
<br>
I tried changing N_t manually for N_comp_aux =1, also tried<br>
setting my<br>
variable coefficient field to a constant at each quadrature<br>
point to see<br>
if any difference.<br>
<br>
<br>
This is - unfortunately - a known issue, where we currently don't<br>
know whether this is a race condition in the OpenCL kernel, or<br>
something goes wrong with the data setup. I expect this to require<br>
rather more elaborate debugging, so unfortunately I can only advise<br>
you to wait until this is fixed...<br>
<br>
Best regards,<br>
Karli<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>