You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importnumpyasnpfromsvirlimportGLSolverimportseabornassnsimportmatplotlib.pyplotaspltgl=GLSolver(
dx=0.5, dy=0.5,
Lx=64, Ly=64,
order_parameter='random',
random_seed=4,
homogeneous_external_field=0.05,
external_field=0.00,
gl_parameter=5.0, # np.infnormal_conductivity=200.0,
dtype=np.float64,
)
aax=gl.vars.vector_potential[0] # store the vector potential for uniform field for future useaay=gl.vars.vector_potential[1]
gl.solve.td(dt=0.01, Nt=10000) # Now do the time evolutiongl.solve.cg(n_iter=1000)
heat=sns.heatmap(gl.observables.superfluid_density, cmap="CMRmap_r", vmin=0, vmax=1)
heat.invert_yaxis()
plt.savefig('1.png')
Produces this output:
However, passing A produces different output as shown below:
ginz=GLSolver(
dx=0.5, dy=0.5,
Lx=64, Ly=64,
order_parameter='random',
random_seed=4,
homogeneous_external_field=0.00,
external_field=0.00,
gl_parameter=5.0, # np.infnormal_conductivity=200.0,
dtype=np.float64,
)
ginz.params.external_vector_potential= (aax, aay) # aax and aay are obtained from the piece of code aboveginz.solve.td(dt=0.01, Nt=10000) # Do the same time evolution as beforeginz.solve.cg(n_iter=1000)
heat=sns.heatmap(ginz.observables.superfluid_density, cmap="CMRmap_r", vmin=0, vmax=1)
heat.invert_yaxis()
plt.savefig('2.png')
The text was updated successfully, but these errors were encountered:
Shiva, I can reproduce this issue. I think internally we are setting 'vpei' in params.py based on the supplied vector potential, but I'm guessing we are not taking it into account when we invoke the kernels.
Hi Shriram, thanks for taking a look. I agree, somehow '_vpei' isn't being used in the evolution kernels. Also, another hint in this direction is that if I use 'external_field' to specify the value of the external field in the GLSolver object instead of 'uniform_external_field', that value isn't being used in calculations either. Note that the documentation says that for now 'external_field' only accepts a number (although it is designed for other things in the future).
Produces this output:
![1](https://user-images.githubusercontent.com/87544559/125996139-49aec9f5-5a37-4c18-8e58-5b5889da3d37.png)
However, passing A produces different output as shown below:
The text was updated successfully, but these errors were encountered: