Exemplo n.º 1
0
import numpy as np

from util.helper import plot_energy_2d, plot_energy_3d

plot_energy_2d('neb_nanodisk_d50nm_k1e10')
plot_energy_3d('neb_nanodisk_d50nm_k1e10')
Exemplo n.º 2
0
    """
    n=20
    for i in range(1,n):
        theta = i*np.pi/n
        mx = -np.cos(theta)
        my = np.sin(theta)
        init_images.append((mx,my,0))
    """

    # init_images.append(np.load('m_final.npy'))

    init_images = [(-1, 0, 0), init_dw, (1, 0, 0)]

    neb = NEB_Sundials(
        sim, init_images, interpolations=[6, 6], name='neb', spring=1e8)

    # neb.add_noise(0.1)

    neb.relax(dt=1e-8, max_steps=5000, save_vtk_steps=500,
              save_npy_steps=500, stopping_dmdt=100)

if __name__ == "__main__":

    mesh = CuboidMesh(nx=160, ny=1, nz=1, dx=4.0, dy=4.0, dz=4.0, unit_length=1e-9)

    sim = create_simulation(mesh)
    # relax_two_state(mesh)
    relax_system(sim)
    plot_energy_2d('neb')
    plot_energy_3d('neb')