<div dir="ltr"><div>Hi Zhang,</div><div><br></div><div>Interestingly, it looks like MagneticResistivity can actually refer to two different subroutines. According to my MagneticResistivity_interface.F90 there exists both "subroutine MagneticResistivity" as well as "subroutine MagneticResistivity_fullState inside of "interface MagneticResistivity".</div><div><br></div><div>hy_uhd_getFaceFlux.F90 does "call MagneticResistivity(U(:,i,j,k), magResist(i,j,k))" which refers to MagneticResistivity_fullState.</div><div><br></div><div>On the other hand, calling MagneticResistivity.F90 should take the form "call MagneticResistivity(a,b,c,d)" where a, b, and d are type real and c is type real, dimension(NSPECIES). Note that If you pass a real in for c that is not dimension(NSPECIES) one receives the error you reported.</div><div><br></div><div>So, I'm guessing the issue is that your call statement doesn't match the dimensions (or possibly) type that is expected by the subroutine. Note that MagneticResistivity_fullState expects inputs of real, dimension(NUNK_VARS), real, and (optionally) real.<br></div><div><br></div>Best,<br><div><div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">--------<div>Ryan</div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 23, 2019 at 1:34 AM zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn">zdy0903@stu.xjtu.edu.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>
H<span style="font-family:SimSun">i</span>
</p>
<p>
<span style="font-family:SimSun"></span>
</p>
<p>
<span style="font-family:SimSun"></span><span style="font-family:SimSun">I am trying to </span><span style="font-family:SimSun">updata the variable of resistivity and met a problem :</span>
</p>
<p>
<span style="font-family:SimSun">the Hydro unit can call the <span style="background-color:transparent;color:rgb(0,0,0);font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="background-color:transparent;color:rgb(0,0,0);display:inline;float:none;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">magneticresistivity </span></span><span style="background-color:transparent;color:rgb(0,0,0);font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="background-color:transparent;color:rgb(0,0,0);display:inline;float:none;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">subroutine </span></span></span>
</p>
<p>
<span style="font-family:SimSun">However the Eos_wrapped and init_Block subroutine can't use the <span style="text-align:left;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:transparent">magneticresistivity </span><span style="text-align:left;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:transparent">subroutine </span></span>
</p>
<p>
<span style="font-family:SimSun"><span style="display:inline;float:none;background-color:transparent;color:rgb(0,0,0);font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">with this call<i> "</i><i>use MagneticResistivity_interface, </i><i>ONLY : MagneticResistivity</i><i></i><i>"</i></span></span><span style="font-family:SimSun"><i></i></span><span style="font-family:SimSun"><i></i> at the first part of </span><span style="font-family:SimSun"><span style="background-color:transparent;color:rgb(0,0,0);display:inline;float:none;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">subroutine </span></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span>
</p>
<p>
<span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><br>
<span style="font-family:SimSun">After make, it display: <i>"</i><i>Error: There is no specific subroutine for the generic ‘magneticresistivity’</i><i></i></span><span style="font-family:SimSun"><i></i></span><span style="font-family:SimSun"><i>"</i></span><br>
<span style="font-family:SimSun"><span style="font-family:SimSun"></span></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span>
</p>
<p>
<span style="font-family:SimSun"></span><span style="font-family:SimSun">I wonder how to exactly call the other unit's subroutine </span><span style="font-family:SimSun">for example the </span><span style="font-family:SimSun"><i><span style="font-family:Simsun">MagneticResistivity</span></i><i style="background-color:transparent;color:rgb(0,0,0);font-family:SimSun;font-size:13px;font-style:italic;font-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></i> in physics/materialProperties/MagneticResistivity/MagneticResistivityMain</span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span><span style="font-family:SimSun"></span>
</p>
<blockquote class="gmail-m_8595593013888696724ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:2px solid rgb(182,182,182);margin-right:0px" name="replyContent">
-----原始邮件-----<span style="font-family:SimSun"></span><br>
<b>发件人:</b><span id="gmail-m_8595593013888696724rc_from">"Ryan Farber" <<a href="mailto:rjfarber@umich.edu" target="_blank">rjfarber@umich.edu</a>></span><br>
<b>发送时间:</b><span id="gmail-m_8595593013888696724rc_senttime">2019-04-22 23:34:25 (星期一)</span><br>
<b>收件人:</b> zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn" target="_blank">zdy0903@stu.xjtu.edu.cn</a>><br>
<b>抄送:</b> flash-users <<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a>><br>
<b>主题:</b> Re: Re: Re: [FLASH-USERS] How to put other variables into the output files<br>
<br>
<div dir="ltr">
<div>
Hi Zhang,
</div>
<div>
<br>
</div>
<div>
I haven't actually used the conduction sub-unit before but if you do
</div>
<div>
grep -in "diff_coeff" *.F90
</div>
<div>
in the object directory then you should see all the places where diff_coeff appears. Anywhere where it's value changes (so, something like diff_coeff = blah) you'll also presumably want to <span style="font-family:SimSun"><span style="font-family:SimSun"></span></span>up<span style="font-family:SimSun"></span>d<span style="font-family:SimSun"><span style="font-family:SimSun"></span></span>ate solnData(DIFF_VAR,i,j,k<span style="font-family:SimSun"></span>) [replace i,j,k with the loop variables if other variable names are used].<br>
</div>
<div>
<div>
<div class="gmail-m_8595593013888696724gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<br>
</div>
<div>
Best,<br>
</div>
<div dir="ltr">
--------
<div>
Ryan
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">
On Mon, Apr 22, 2019 at 5:49 AM zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn" target="_blank">zdy0903@stu.xjtu.edu.cn</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p>
Hi!
</p>
<p>
<span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><br>
</span></span></span></span></span>
</p>
<p>
<span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun">I tried as your reply says. However, </span></span></span></span>it doesn't work. It do add the "diff" variable to the flash.h, but it the variable diff keeps zeros during the process.</span>
</p>
<p>
<span style="font-family:SimSun">It seems that the "diff" is not connected to the real "diff_coeff" in conduction sub-unit. If I am not mistaken, the init_block only represent the initial data of variable. How can we let the "diff" correspond to the "<span style="font-family:SimSun;white-space:normal">diff_coeff" during the whole process?</span></span>
</p>
<p>
<span style="font-family:SimSun"><br>
</span>
</p>
<p>
<span style="font-family:SimSun">Thank you very much!</span>
</p>
<p>
<span style="font-family:SimSun"><br>
</span>
</p>
<p>
<span style="font-family:SimSun">Zhang </span>
</p>
<br>
<br>
<blockquote class="gmail-m_8595593013888696724gmail-m_583837210015869370ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:2px solid rgb(182,182,182);margin-right:0px" name="replyContent">
-----原始邮件-----<br>
<b>发件人:</b><span id="gmail-m_8595593013888696724gmail-m_583837210015869370rc_from">"Ryan Farber" <<a href="mailto:rjfarber@umich.edu" target="_blank">rjfarber@umich.edu</a>><span style="font-family:SimSun"></span></span><br>
<b>发送时间:</b><span id="gmail-m_8595593013888696724gmail-m_583837210015869370rc_senttime">2019-04-22 13:11:16 (星期一)</span><br>
<b>收件人:</b> zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn" target="_blank">zdy0903@stu.xjtu.edu.cn</a>><br>
<b>抄送:</b> flash-users <<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a>><br>
<b>主题:</b> Re: Re: [FLASH-USERS] How to put other variables into the output files<br>
<br>
<div dir="ltr">
Hi Zhang,
<div>
<br>
</div>
<div>
I'm cc'ing flash-users in case others find this helpful in the future.
</div>
<div>
To add a variable to your simulation, add a line to the "Config" file in your problem directory. For example,
</div>
<div>
VARIABLE diff
</div>
<div>
<br>
</div>
<div>
Then, wherever you set the diffusion coefficient, you can set the value of DIFF_VAR in solnData (or whatever you decide to call the output of Grid_getBlkPtr) in the usual way. For example, see how DENS_VAR etc. are set in Simulation_initBlock of the Sedov test problem.
</div>
<div>
(Something like solnData(DIFF_VAR,i,j,k) = diff_coeff)
</div>
<div>
<br>
</div>
<div>
Best,
</div>
<div>
<div>
<div class="gmail-m_8595593013888696724gmail-m_583837210015869370gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
--------
<div>
Ryan
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">
On Sun, Apr 21, 2019 at 7:30 PM zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn" target="_blank">zdy0903@stu.xjtu.edu.cn</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p>
Hi <span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun">Ryan</span></span></span>
</p>
<p>
<span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><br>
</span></span></span></span>
</p>
<p>
<span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"><span style="font-family:SimSun"> Thanks for your reply. I use the latest version, FLASH4.6, but it still doesn't work in <span style="font-family:SimSun;white-space:normal">"*plt_cnt*" output files</span>. However, there is information of conduction </span></span></span></span><span style="font-family:SimSun">in checkpoint files. It seems that the variables in "flash.h" will present in checkpoint files.</span>
</p>
<p>
<span style="font-family:SimSun"> If one variable is <b>not included</b> in "flash.h", and it is calculated in one sub-unit in the simulation. what should I do to add this variable to flash.h (UNK_VARS) and make it accessible in output files. For example, if I want to check the information of diff_coeff (the diffusion coefficient for conduction) in output files. What should I do? (I don't have to check diff_coeff. I just make an example)</span>
</p>
<p>
<span style="font-family:SimSun"> Thank you very much!</span>
</p>
<p>
<span style="font-family:SimSun"><br>
</span>
</p>
<p>
<span style="font-family:SimSun">Zhang</span>
</p>
<span style="font-family:SimSun"></span><br>
<br>
<blockquote class="gmail-m_8595593013888696724gmail-m_583837210015869370gmail-m_5822117611599036727ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:2px solid rgb(182,182,182);margin-right:0px" name="replyContent">
-----原始邮件-----<span style="font-family:SimSun"></span><br>
<b>发件人:</b><span id="gmail-m_8595593013888696724gmail-m_583837210015869370gmail-m_5822117611599036727rc_from">"Ryan Farber" <<a href="mailto:rjfarber@umich.edu" target="_blank">rjfarber@umich.edu</a>></span><br>
<b>发送时间:</b><span id="gmail-m_8595593013888696724gmail-m_583837210015869370gmail-m_5822117611599036727rc_senttime">2019-04-22 05:05:13 (星期一)</span><br>
<b>收件人:</b> zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn" target="_blank">zdy0903@stu.xjtu.edu.cn</a>><br>
<b>抄送:</b> "<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a>" <<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a>><br>
<b>主题:</b> Re: [FLASH-USERS] How to put other variables into the output files<br>
<br>
<div dir="ltr">
Hi Zhang,
<div>
<br>
</div>
<div>
I've also found that only the first 9 "plot_var_"s are put in FLASH<span style="font-family:SimSun"> "*plt_cnt*" output files</span> (but checkpoint files contain all variables). I'm not sure if this is intended behavior or if it's been fixed in later versions (I'm using FLASH4.2.2). What version of FLASH are you using?
</div>
<div>
<br>
</div>
<div>
If you also cannot access "cond" from the checkpoint file, then you can check Flash.h (in the object directory) for the name of the variables your simulation is following.
</div>
<div>
<br>
</div>
<div>
Also, since you mentioned using VISIT I wanted to mention that yt is another great option for FLASH analysis and visualization:
<div>
<br>
</div>
<div>
<a href="http://yt-project.org/" target="_blank">http://<span class="gmail-m_8595593013888696724gmail-m_583837210015869370gmail-m_5822117611599036727gmail-il">yt</span>-project.org</a>
</div>
<div>
<div class="gmail-m_8595593013888696724gmail-m_583837210015869370gmail-m_5822117611599036727gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<br>
</div>
<div>
Best,
</div>
<div dir="ltr">
--------
<div>
Ryan
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">
On Sun, Apr 21, 2019 at 5:44 AM zdy0903 <<a href="mailto:zdy0903@stu.xjtu.edu.cn" target="_blank">zdy0903@stu.xjtu.edu.cn</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p>
<span style="font-family:SimSun">Hi!</span>
</p>
<p>
<span style="font-family:SimSun"> Usually, the output files of FLASH are the database of some variables like "dens", "temp", "pres". We can check it by importing the database to VISIT. However, what should I do if I want to put other </span><span style="font-family:SimSun">variables into the database of output files. For example, if I want to see the <b>thermal conduction data</b> in LaserSlab simulation during the entire process, what should I do?</span>
</p>
<p>
<span style="font-family:SimSun"> It seems that there is a plot options in flash.par just like</span>
</p>
<p>
<span style="font-family:SimSun">### Plot Options ###<br>
plotFileNumber = 0<br>
plotFileIntervalStep = 100<br>
plotFileIntervalTime = 0.01e-09<br>
plot_var_1 = "dens"<br>
plot_var_2 = "depo"<br>
plot_var_3 = "tele"<br>
plot_var_4 = "tion"<br>
plot_var_5 = "trad"<br>
plot_var_6 = "ye "<br>
plot_var_7 = "sumy"<br>
plot_var_8 = "cham"<br>
plot_var_9 = "targ"<br>
I set a new plot_var_10 = "cond".(conduction) But it seems that it does not work? What else should I do?<br>
</span>
</p>
<p>
<span style="font-family:SimSun"> Thank you very much!</span>
</p>
<p>
<span style="font-family:SimSun"><br>
</span>
</p>
<p>
<span style="font-family:SimSun">Zhang</span>
</p>
</blockquote>
</div>
</blockquote>
</blockquote>
</div>
</blockquote>
</blockquote>
</div>
</blockquote></blockquote></div></div></div>