<div dir="ltr"><div dir="ltr">Great!<div><br></div><div>Clicking on some of the functions pointed me to this example</div><div><a href="https://www.mcs.anl.gov/petsc/petsc-3.13/src/snes/tutorials/ex5.c.html">https://www.mcs.anl.gov/petsc/petsc-3.13/src/snes/tutorials/ex5.c.html</a><br></div><div><br></div><div>Are there more examples, which are perhaps simpler than the above, which I can refer to? </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 8, 2020 at 5:51 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><span style="font-size:13px"> You should use the PetscMatlabEngine </span><a href="https://www.mcs.anl.gov/petsc/petsc-3.13/docs/manualpages/Sys/PetscMatlabEngine.html" style="font-size:13px" target="_blank">https://www.mcs.anl.gov/petsc/petsc-3.13/docs/manualpages/Sys/PetscMatlabEngine.html</a><br style="font-size:13px"><br style="font-size:13px"><span style="font-size:13px"> Barry</span><div><font size="2"><br></font><div><br><blockquote type="cite"><div>On Jun 8, 2020, at 7:09 PM, Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hi Folks,<div><br></div><div>My parallel application written in C++ (which also uses PETSc library for linear solvers) requires calling control and optimization toolbox of MATLAB at every time step to get a small number of double values. Likewise the MATLAB function will need to know some values from the parallel C++ application to return those doubles. I'm wondering if there is a recommended way of calling MATLAB from parallel C/C++/Fortran codes, and if PETSc has some interface that could be leveraged for this exchange. <br clear="all"><div><br></div><div>Thanks,</div>-- <br><div dir="ltr"><div dir="ltr"><div>--Amneet <br><br></div><div><br></div><div><br></div></div></div></div></div>
</div></blockquote></div><br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>--Amneet <br><br></div><div><br></div><div><br></div></div></div>