<div dir="ltr">Hello,<div><br></div><div>I see at the end of cell_opt_utils.F (V 5.1) the code copied below suggesting that different constraints for the box deformation can be defined.</div><div>It is a CASE statement using my_constraint_id as argument.</div><div><br></div><div>How and where can this variable be defined? I do not see how to control this from the input.</div><div>Should I (hard) define constraint_id and recompile?</div><div><br></div><div>Thanks,</div><div><br></div><div>Marcelo.</div><div><br></div><div><p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> SELECT CASE (my_constraint_id)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_x)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(1:2) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(4) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_y)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(2:3) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(5) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_z)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(4:6) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_xy)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(1:5) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_xz)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(1:2) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(4:6) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_yz)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> gradient(2:6) = 0.0_dp</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> CASE (fix_none)</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> ! Nothing to do</span></p>
<p style="font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(207, 180, 238);"><span style="font-variant-ligatures: no-common-ligatures"> END SELECT</span></p></div><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div><br><br>On Sunday, January 26, 2014 at 1:49:33 PM UTC+3, Florian Schiffmann wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi,<br><br>what Marcella says is correct in an ideal world. In reality there are numerics,... if it happens that your cell changes or you want to be on the save side, you might want to set the cell gradient in the nonperiodic direction to a perfect 0.<br>This can be done in the cell_opt_utils.F at the end of the subroutine get_dg_dh.<br>simply set gradient(n)=0.0_dp (n=1 for x, n=3 for y, n=6 for z as np direction).<br>Recompile and your cell is fixed in that direction. <br><br>Flo<br></div></blockquote></div></div>