<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body dir="ltr" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div><br>
</div>
Johan,
<div><br>
</div>
<div>Essentially every variable is accessible through the include files, NEKUSE and TOTAL.</div>
<div><br>
</div>
<div>NEKUSE variables are mapped and derferenced by Nek, point by point and step by step,</div>
<div>except for useric(), which is called prior to start of time stepping.</div>
<div><br>
</div>
<div>One critically important consideration is to not invoke any communication (or any expensive</div>
<div>operation) in uservp, userbc, useric, userf, userq.</div>
<div><br>
</div>
<div>If you try to communicate (e.g., alpha = glmax(t,n) invokes global communication) there</div>
<div>will be trouble because different processors can have different numbers of points and not</div>
<div>all of them will call the user routines the same number of times. The run would hang in that</div>
<div>case, not to mention be very expensive. Should you need to do something like, the right</div>
<div>approach is to do the global operation in userchk, store the result in a common block, and</div>
<div>pass this to the user routine in question.</div>
<div><br>
</div>
<div>I think if you look through the examples you will come to understand the basic approach.</div>
<div><br>
</div>
<div>Paul</div>
<div><br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF921201" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]<br>
<b>Sent:</b> Monday, August 22, 2016 8:46 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> [Nek5000-users] General functionality of the .usr file<br>
</font><br>
</div>
<div></div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi!</p>
<p><br>
</p>
<p>I am a new user of Nek5000. I have read through the User Documentation, and ran some simulations. Now it is time for me to start editing a file that a colleague wrote fo me. I therefore need to know how the .usr file is used.</p>
<p><br>
</p>
<p>For example: In the User Documentation it is written that uservp() is called "once per processor, and once per discrete point therein". Does this mean that this is called once before the simulation is executed or is it called once per time step or in some
other fashion?</p>
<p><br>
</p>
<p>I would guess that uservp() is called once before the simulation is run, is that correct? Does thi apply to all routines in the .usr file, or are some of them called repeatedly during the simulation? userbc() for instance?</p>
<p><br>
</p>
<p>I have been looking for a definition of the variables that are accessible in the separate routines. For instance, the input arguments to useric are (ix,iy,iz,ieg). I have gotten to understand that ix, iy and iz relate to a spatial coordinate in some way,
and that ieg is some kind of index for the fluid element. Is there a precise definition of these names available?</p>
<p><br>
</p>
<p>In addition to the input arguments it seems as you have access to more variables than the input arguments in each routine. In useric() you may for instance change ux, uy and uz. Is there a full list of all parameters that are available available?</p>
<p><br>
</p>
<p>/Johan<br>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>