<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am a new PETSc user (and new to MPI in general), and was wondering if someone could help me out with what I am sure is a basic question (if this is not the appropriate email list or there is a better place please let me know!).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Basically, I am writing a code that requires a solution to an ODE that will be used later on during runtime. I have written the basic ODE solver using TSRK, however I haven’t thought of a good way to store the actual solution at all time
steps throughout the time evolution. I would like to avoid writing each time step to a file through the monitor function, and instead just plug each time step into an array.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">How is this usually done? I suppose the user defined struct that gets passed into the monitor function could contain a pointer to an array in main? This is how I would do this if the program wasn’t of the MPI variety, but I am not sure
how to properly declare a pointer to an array declared as Vec and built through the usual PETSc process. Any tips are greatly appreciated!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your time,<o:p></o:p></p>
<p class="MsoNormal">Tyler<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">+++++++++++++++++++++++++++++<o:p></o:p></p>
<p class="MsoNormal">Tyler Guglielmo<o:p></o:p></p>
<p class="MsoNormal">Postdoctoral Researcher<o:p></o:p></p>
<p class="MsoNormal">Lawrence Livermore National Lab<o:p></o:p></p>
<p class="MsoNormal">Office: 925-423-6186<o:p></o:p></p>
<p class="MsoNormal">Cell: 210-480-8000<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">+++++++++++++++++++++++++++++<o:p></o:p></p>
</div>
</body>
</html>