<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 12pt; color: #000066"><div>Hi,<br></div><div><br data-mce-bogus="1"></div><div>Currently I am trying to evaluate a scalar field solution at some given points<br data-mce-bogus="1"></div><div>and to evaluate the min and max of this scalar field. Once this is done I would </div><div>like to print these quantities on the terminal window as well as to use them for</div><div>further PostOperation.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Assume GetDP has solved my problem and is able to compute scalar fieldsu</div><div>and utotm as described in the GetDP script below.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>How can I get the following quantities at Point {xp, yp, zp}:<br></div><div>u1 = u(xp, yp, zp) </div><div>u2 = utotm(xp, yp, zp)</div><div>and:<br data-mce-bogus="1"></div><div>umin = min(u) over a region<br></div><div><div>umax = max(u) over a region<br></div><div><div>utotmmin = min(utotm) over a region<br></div><div><div>utotmmax = max(utotm) over a region<br></div><div><br></div><div>I have tried several syntaxes for the different quantities above, but none passed the parsing phase w/o error.<br data-mce-bogus="1"></div><div>Therefore if someone has clues or a solution, it would be very helpful !<br data-mce-bogus="1"></div></div></div></div><div><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">//Post Processing</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">//===============</span><br><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">PostProcessing{</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> {Name CubicCavity; NameOfFormulation CubicCavity;</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Quantity{</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> {Name u; Value {Local{[{u}]; In TotalDomain; Jacobian JVol;}}}</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> {Name utotm; Value {Local{[{u}-scalpot[]]; In TotalDomain; Jacobian JVol;}}}</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> }</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> }</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">}</span><br><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">//Post Operation</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">//==============</span><br><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">PostOperation{</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> {Name Map_u; NameOfPostProcessing CubicCavity;</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Operation{</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Print [ u, OnElementsOf GammaInner, File "uIIsur_3D.pos" ];// works !</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Print [ utotm, OnElementsOf GammaInner, File "uIImuI_3D.pos" ];// works !</span></div><div><div><div><div><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Print [ utotm, OnElementsOf GammaInner, Iso {0.65}, Sort Position, Format SimpleTable, File "out.txt" ];// works !</span></div><div><br></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> // Note: Be carefull, in order to visualize the .pos file below in Gmsh, it does not work w/ option "Iso-values"</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> // even if it is a single iso-contour/iso-value, I have to use option "Continuous Map" (?!?!)</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Print [ utotm, OnElementsOf GammaInner, Iso {0.65}, Format Gmsh, File "toto.pos" ];// works !</span><br></div><div><br></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> // How to print the value of scalar field u or utotm at a specific point (e.g. (0,0,1.3)) on terminal ?</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Printf [ "U=%g", u(0, 0, 1.3) ];</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Printf [ "Utotm=%g", utotm(0, 0, 1.3) ];</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"></span><br></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> // How to get min and max values on some region and use them in other PostOperation ?<br></span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> umin = Min(u[]) OnElementsOf GammaInner;<br> umax = Max(u[]) OnElementsOf GammaInner;<br></span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> N = 10;</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> du = (umax - umin) / N;</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> For i In (1, N)</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> uval = umin + (i - 0.5) * du;<br data-mce-bogus="1"></span></div><div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> Print[ utotm, OnElementsOf GammaInner, Iso { uval }, Sort Position, Format SimpleTable, File >> "out.txt" ];</span></div></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> EndFor</span></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> }</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"> }</span><br><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;">}</span></div><div><br></div><div>Thanks a lot for any help,</div><div><br></div><div data-marker="__SIG_PRE__"><div> <span> Gilles </span></div><div><br></div></div></div><div><span data-mce-style="font-family: 'courier new',courier,monaco,monospace,sans-serif;" style="font-family: "courier new",courier,monaco,monospace,sans-serif;"></span><br></div></div></div></div></body></html>