Exemple #1
0
 def __init__(self, domain=UnitDisk(), Tmax=10, eps=.01):
     """
     Initialise solver for the domain with maximal time Tmax and timestep eps.
     """
     self.domain = domain
     self._Tmax = Tmax
     self._eps = eps
     self._N = int(self._Tmax / self._eps)
Exemple #2
0
import numpy as np
from domains import UnitDisk
from dynamics import NVortexProblem
from plot import VortexPlot
from utils import *

domain = UnitDisk()
problem = NVortexProblem(domain, Tmax=5)
x0, Gamma = [-1 / 2, 0, 1 / 3, 0], [-3, 6]
sol = problem.GradientSolution(x0, Gamma)
z0 = sol[-1].flatten()
problem2 = NVortexProblem(domain, Tmax=30)
app = VortexPlot(problem2)
z0 += 0.02 * np.random.randn(len(z0))
app.animate(z0, Gamma)