Skip to content
Permalink
Browse files

More robust test for ferrofluid tutorial

  • Loading branch information...
RudolfWeeber committed Jun 10, 2019
1 parent 5b88304 commit 9588e25b24773b013cfc5b940fc15aa73917dc78
Showing with 7 additions and 12 deletions.
  1. +7 −12 doc/tutorials/11-ferrofluid/11-ferrofluid_part3.ipynb
@@ -271,16 +271,11 @@
"system.integrator.set_vv()\n",
"\n",
"# tune verlet list skin\n",
"system.cell_system.tune_skin(min_skin=0.4, max_skin=2., tol=0.2, int_steps=100)\n",
"system.cell_system.skin = 0.8\n",
"\n",
"# Setup dipolar P3M\n",
"system.actors.add(DipolarP3M(accuracy=5E-4,prefactor=dip_lambda*lj_sigma**3*kT))\n",
"\n",
"# tune verlet list skin again\n",
"system.cell_system.tune_skin(min_skin=0.4, max_skin=2., tol=0.2, int_steps=100)\n",
"\n",
"# print skin value\n",
"print('tuned skin = {}'.format(system.cell_system.skin))"
"accuracy = 5E-4\n",
"system.actors.add(DipolarP3M(accuracy=accuracy,prefactor=dip_lambda*lj_sigma**3*kT))\n"
]
},
{
@@ -2956,7 +2951,7 @@
"magnetization.append(np.average(dipm_tot))\n",
"\n",
"# number of loops for sampling\n",
"loops = 500\n",
"loops_m = 500\n",
"\n",
"for alpha in alphas:\n",
" print(\"Sample for alpha = {}\".format(alpha))\n",
@@ -2978,13 +2973,13 @@
" # Sampling\n",
" print(\"Sampling...\")\n",
" magn_temp = 0\n",
" for i in range(loops):\n",
" for i in range(loops_m):\n",
" system.integrator.run(20)\n",
" magn_temp += dipm_tot_calc.calculate()[0]\n",
" print(\"progress: {:6.2f} %\".format((float(i)+1)/loops * 100))\n",
" print(\"progress: {:6.2f} %\".format((float(i)+1)/loops_m * 100))\n",
" \n",
" # save average magnetization\n",
" magnetization.append(magn_temp / loops)\n",
" magnetization.append(magn_temp / loops_m)\n",
" print(\"Sampling for alpha = {} done \\n\".format(alpha))\n",
" print(\"magnetizations = {}\".format(magnetization))\n",
" print(\"total progress: {:6.2f} %\\n\".format((float(alphas.index(alpha))+1)/len(alphas) * 100))\n",

0 comments on commit 9588e25

Please sign in to comment.
You can’t perform that action at this time.