<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
Dear all, I am writing a function which store datasets (Vectors) coming from a DMSwarm structure into a hdf5 file. This step is done nicely write_function(){ PetscViewerHDF5Open(…) PetscViewerHDF5PushTimestepping(…) DMSwarmCreateGlobalVectorFromField(…)
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBanneranbvdlh" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBanneranbvdlh" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanneranbvdlh" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBanneranbvdlh" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanneranbvdlh { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtonanbvdlh:hover, .pfptPrimaryButtonanbvdlh:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtonanbvdlh:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div>Dear all, </div>
<div><br>
</div>
<div>I am writing a function which store datasets (Vectors) coming from a <span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;">DMSwarm structure into a hdf5 file. This step is done nicely
</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div>
<div style="background-color: rgb(255, 255, 255); line-height: 18px;">
<div style="line-height: 18px;"><span style="caret-color: rgb(99, 99, 36); color: rgb(99, 99, 36); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;">write_function(){</span></div>
<div style="line-height: 18px;"><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>PetscViewerHDF5Open(</span><span style="caret-color: rgb(99, 99, 36); white-space: pre;">…</span><span style="white-space: pre;">)</span></font></div>
<div style="line-height: 18px;">
<div style="line-height: 18px;"><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>PetscViewerHDF5PushTimestepping(</span><span style="caret-color: rgb(99, 99, 36); white-space: pre;">…</span><span style="white-space: pre;">)</span></font></div>
</div>
</div>
<div style="background-color: rgb(255, 255, 255); line-height: 18px;"><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>DMSwarmCreateGlobalVectorFromField(</span><span style="caret-color: rgb(99, 99, 36); white-space: pre;">…</span><span style="white-space: pre;">)</span></font></div>
</div>
<div style="background-color: rgb(255, 255, 255); line-height: 18px;">
<div style="line-height: 18px;"><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>VecLoad(</span><span style="caret-color: rgb(99, 99, 36); white-space: pre;">…</span><span style="white-space: pre;">)</span></font></div>
<div style="line-height: 18px;">
<div style="line-height: 18px;"><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>DMSwarmDestroyGlobalVectorFromField(</span><span style="caret-color: rgb(99, 99, 36); white-space: pre;">…</span><span style="white-space: pre;">)</span></font></div>
<div style="line-height: 18px;"><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">}</span></font></div>
</div>
</div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;">The resulting hdf5 file looks good after an inspection using python’s library h5py. </span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;">However, I am finding difficulties when I try to use this .hdf5 file as a fresh start for my application. The target field is not properly updated
when I try to load the stored data (it keeps the default one).</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div>
<div style="background-color: rgb(255, 255, 255); line-height: 18px;">
<div style="line-height: 18px;">
<div><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(99, 99, 36); white-space: pre;">read_function(){</span></font></div>
<div><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(99, 99, 36); white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span></span></font><font color="#5e5e5e" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(94, 94, 94); white-space: pre;">…</span></font></div>
<div>
<div>
<div style="line-height: 18px;">
<div><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(99, 99, 36);"><span class="Apple-tab-span" style="white-space:pre"></span>PetscViewerHDF5Open</span><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);">(</span><font color="#2e2e2e" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">…</span></font><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);">)</span></div>
<div><span style="color: rgb(99, 99, 36); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>PetscViewerHDF5PushTimestepping</span><span style="color: rgb(94, 94, 94); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;">(</span><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">…</span></font><span style="color: rgb(94, 94, 94); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;">)</span></div>
</div>
</div>
<div><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(99, 99, 36);"><span class="Apple-tab-span" style="white-space:pre"></span>DMSwarmCreateGlobalVectorFromField</span><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);">(</span><font color="#7e7e7e" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">…</span></font><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);">)</span></div>
<div><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><span class="Apple-tab-span" style="white-space:pre"></span>VecLoad(</span><span style="white-space: pre;">…</span></font> <span style="color: rgb(94, 94, 94); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;">)</span></div>
<div><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(99, 99, 36);"><span class="Apple-tab-span" style="white-space:pre"></span>DMSwarmDestroyGlobalVectorFromField</span><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);">(</span><font color="#7e7e7e" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">…</span></font><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);">)</span></div>
</div>
<div><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; color: rgb(94, 94, 94);"><span class="Apple-tab-span" style="white-space:pre"></span>...</span></div>
<div><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(99, 99, 36); white-space: pre;">}</span></font></div>
</div>
</div>
</div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;">The puzzling part is: if I print the “updated” vector inside of read_function() using VecView after VecLoad, the vector seem to hold the updated values.
However, If I print the field in the main function after the call to </span></font></span><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="caret-color: rgb(0, 0, 0); white-space: pre;">read_function(), the field remains
the same it was </span></font></span><span style="white-space: pre; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">before calling to read_function() and I do not get any erro message.</span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;">It is there something wrong with the logic of my programing? Maybe I am missing something.</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;">Thank you in advance.</span></font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font color="#000000"><span style="white-space: pre;"><br>
</span></font></span></div>
<div>Best regards,</div>
<div>Miguel</div>
<br>
<div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; 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; text-decoration: none;">
Miguel Molinos<br>
Investigador postdoctoral <br>
Juan de la Cierva<br>
Dpto. Mecánica de Medios Continuos y Teoría de Estructuras - ETSI<br>
Universidad de Sevilla<br>
Camino de los descubrimientos, s/n<br>
41092 Sevilla<br>
<br>
<br>
</div>
<span><img alt="us_logo.jpg" src="cid:D4BC7807-185D-42D7-B10B-113829C968E9@openvpn"></span>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; 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; text-decoration: none;">
<br>
<br>
<br>
<br>
<br>
<a href="https://urldefense.us/v3/__http://www.us.es__;!!G_uCfscf7eWS!egnWYkerVjlSmbuh1nUjljGJ4vkEwKUvO9ygc9e5BJ72KxK-T4qbWIxTBbg-BeyxDvqN5Rr5EvaWMAIXee5w9w$">www.us.es</a><br>
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es UD. el destinatario del mensaje, le ruego lo destruya sin hacer copia
digital o física, comunicando al emisor por esta misma vía la recepción del presente mensaje. Gracias</div>
</div>
<br>
</body>
</html>