<div dir="ltr">Hi Karl,<div><br></div><div>I check my solution using -ts_monitor_draw_solution. Ok forget about the earlier code and try running the code I have attached now. It is basically the same code but using DMComposite to manage multiple variables. On using -ts_monitor_draw_solution, you will see two windows with blobs being advected. Here's a report for this code:</div>
<div><br></div><div>1) Everything works if I use ComputeResidual, irrespective of which DMSetVecType I use (including VECVIENNACL). Note that in the earlier code (without DMComposite) the case with VECVIENNACL doesn't give the right answer but lets forget about the earlier code. </div>
<div><br></div><div>2) Nothing works if I use ComputeResidualVecViennaCL, whatever maybe DMSetVecType. Again note that in the earlier code this case works only if I set the vec/mat types to VIENNACL. </div><div><br></div>
<div>Getting this code to work will basically solve my problems.</div><div><br></div><div>Sorry for the bother and thanks so much!</div><div><br></div><div>P.S I run the code using ./petsc_opencl -ts_monitor -snes_monitor -ts_max_steps 1000 -ts_type theta -ts_dt 10 -snes_rtol 1e-4 -ts_final_time 1000 -ts_monitor_draw_solution</div>
<div><br></div><div>Cheers,</div><div>Mani</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 26, 2014 at 4:40 PM, Karl Rupp <span dir="ltr"><<a href="mailto:rupp@mcs.anl.gov" target="_blank">rupp@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mani,<div class="im"><br>
<br>
> Thanks! It worked. However the following cases still don't work:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
1)  Using ComputeResidual (not ComputeResidualViennaCL) but with<br>
DMSetVecType(da, VECVIENNACL) and DMSetMatType(da, MATAIJVIENNACL). The<br>
SNES solver converges but gives nonsensical results. I just get a<br>
flashing blob.<br>
<br></div>
2) Using ComputeResidualViennaCL (not ComputeResidual) and *without*<div class="im"><br>
DMSetVecType(da, VECVIENNACL) and DMSetMatType(da, MATAIJVIENNACL). The<br>
SNES solver converges but gives nonsensical results. I just get a<br>
flashing blob as 1) above. This case probably should not work anyway<br>
cause I'm not sure if VecViennaCLGetArray works if the Vecs have not<br>
been set to ViennaCL.<br>
</div></blockquote>
<br>
Both cases worked for me when calling VecView() on the solution vector. Maybe I missed something, I'll check again tomorrow.<br>
<br>
Best regards,<br>
Karli<br>
</blockquote></div><br></div>