<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1434044475275_8877"><span id="yui_3_16_0_1_1434044475275_8919">Thanks Pablo, it works!</span></div>  <br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> El Jueves 11 de junio de 2015 19:38, Pablo Becker &lt;pbecker@cimne.upc.edu&gt; escribió:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv3530579765"><div><div dir="ltr">Hello Victor.<div style="">First you must add the printing function to your element&nbsp;</div><div style=""><br clear="none"></div><div style=""><div>&nbsp; &nbsp;//TO PRINT ELEMENTAL VARIABLES (ONLY ONE GAUSS POINT PER ELEMENT)</div><div>&nbsp; &nbsp; void FluidPhasePFEM22D::GetValueOnIntegrationPoints(const Variable&lt;double&gt;&amp; rVariable,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::vector&lt;double&gt;&amp; rValues,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const ProcessInfo&amp; rCurrentProcessInfo)</div><div><span class="yiv3530579765" style="white-space:pre;">        </span>{</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>if (rVariable == VISCOSITY)</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>{</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>// Set output vector (for a single integration point)</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>rValues.resize(1, false);</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>rValues[0]=this-&gt;GetValue(VISCOSITY);</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>}</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>else if (rVariable == TAU)</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>{</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>// Set output vector (for a single integration point)</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>rValues.resize(1, false);</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>rValues[0]=this-&gt;GetValue(TAU);</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>}</div><div><span class="yiv3530579765" style="white-space:pre;">                </span></div><div><span class="yiv3530579765" style="white-space:pre;">                </span>else // Default behaviour (returns elemental data)</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>{</div><div><span class="yiv3530579765" style="white-space:pre;">                        </span>rValues.resize(1, false);</div><div><span class="yiv3530579765" style="white-space:pre;">                </span>}</div><div><span class="yiv3530579765" style="white-space:pre;">                </span></div><div><span class="yiv3530579765" style="white-space:pre;">        </span>}</div><div><br clear="none"></div><div><br clear="none"></div></div><div style=""><br clear="none"></div><div style="">and then, from python, the command is :</div><div style=""><br clear="none"></div><div style="">gid_io.PrintOnGaussPoints(TAU,model_part,time)<br clear="none"></div><div style=""><br clear="none"></div><div style="">Hope that helps,</div><div style=""><br clear="none"></div><div style="">Pablo</div></div><div class="yiv3530579765gmail_extra"><br clear="none"><div class="yiv3530579765gmail_quote">On 11 June 2015 at 18:14, Víctor B <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:victorbzs@yahoo.es" target="_blank" href="mailto:victorbzs@yahoo.es">victorbzs@yahoo.es</a>&gt;</span> wrote:<br clear="none"><blockquote class="yiv3530579765gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv3530579765yqt7429524517" id="yiv3530579765yqt54143"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div>Hi everyone,</div><div><br clear="none"></div><div dir="ltr">How I could write in the gid output from kratos variables by element?. I mean variables from the element database... I've tried with writeElementalResults but it doesn't work (I found a document from the internet with that method:&nbsp;<a rel="nofollow" shape="rect" target="_blank" href="http://www.tdx.cat/bitstream/handle/10803/6868/10_PD_Capitol09_pp_205_258.pdf?sequence=10" style="background-color:rgb(255,255,255);">writeElementalResults</a>)</div><div dir="ltr"><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">Thanks in advanced</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Best</div><div dir="ltr"><br clear="none"></div></div></div></div><br clear="none">_______________________________________________<br clear="none">
Kratos mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:Kratos@listas.cimne.upc.edu" target="_blank" href="mailto:Kratos@listas.cimne.upc.edu">Kratos@listas.cimne.upc.edu</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos">http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>