001package cli; 002 003import kernels.EnergyDensityKernel; 004import models.*; 005 006/** 007 * (For Fig 4) Computes the lowest eigenvalue of the smeared energy density, 008 * for the sinh-Gordon model (\(B=1\)), with varying width of the Gaussian 009 * "smearing function". 010 * 011 * Takes five command line arguments: the number \(N\) of discretization steps, 012 * the rapidity cutoff \(R\), the minimum and maximum smearing width \(\sigma\), 013 * and the number of steps in which \(\sigma\) traverses this interval. 014 */ 015public class SmearingWidthAnalyzer extends CLIAnalyzer { 016 017 private static double lowestEv(IntegrableModel model, double sigma, 018 double alpha, int n, double cutoff) { 019 EnergyDensityKernel k = new EnergyDensityKernel(model, 1.0, alpha, 0, sigma); 020 double ev = k.findLowestEigenvalue(n, cutoff); 021 return ev; 022 } 023 024 public static void main(String[] args) { 025 int N = Integer.parseInt(args[0]); 026 double R = Double.parseDouble(args[1]); 027 double smearingMin = Double.parseDouble(args[2]); 028 double smearingMax = Double.parseDouble(args[3]); 029 int smearingN = Integer.parseInt(args[4]); 030 031 String header = "Sinh-Gordon lowest eigenvalues by smearing width, N=" 032 + N + ", R=" + R + ", sigma: " + smearingMin + " to " 033 + smearingMax + " in " + smearingN + " steps"; 034 System.out.println(header); 035 036 IntegrableModel sinhModel = new SinhGordonModel(1.0); 037 double[][] res = new double[smearingN][2]; 038 039 for (int i = 0; i < smearingN; i++) { 040 041 double smearing = smearingMin + (smearingMax - smearingMin) / (smearingN - 1) * i; 042 043 res[i][0] = smearing; 044 res[i][1] = lowestEv(sinhModel, smearing, 0.0, N, R); 045 } 046 047 writeDatafile("SmearingWidth", header, res); 048 049 } 050}