001package cli; 002 003import kernels.EnergyDensityKernel; 004import models.*; 005 006/** 007 * (For Fig 3a) Computes the lowest eigenvalue of the smeared energy density, 008 * for a model with S-matrix consisting of \(n\) sinh-Gordon factors (\(B=1\)), 009 * where \(n\) is varied over a certain range. 010 * 011 * Takes three command line arguments: the number \(N\) of discretization steps, 012 * the rapidity cutoff \(R\), and the maximum number of S-matrix factors. 013 * (\(n\) is varied from 1 to this value.) 014 */ 015public class MultipleCouplingsAnalyzer extends CLIAnalyzer { 016 017 private static double lowestEv(IntegrableModel model, int coshPower, int n, 018 double cutoff) { 019 EnergyDensityKernel k = new EnergyDensityKernel(model, 1.0, 0.0, 020 coshPower, 0.1); 021 double ev = k.findLowestEigenvalue(n, cutoff); 022 return ev; 023 } 024 025 public static void main(String[] args) { 026 int N = Integer.parseInt(args[0]); 027 double R = Double.parseDouble(args[1]); 028 int couplingsMax = Integer.parseInt(args[2]); 029 030 String header = "Product model by number of factors, N=" + N + ", R=" 031 + R + ", up to " + couplingsMax + " factors at same coupling 1"; 032 System.out.println(header); 033 034 double[][] res = new double[couplingsMax][2]; 035 036 for (int factors = 1; factors <= couplingsMax; factors++) { 037 038 Object[] b = new Object[factors]; 039 for (int i = 0; i < factors; i++) { 040 b[i] = new Double(1.0); 041 } 042 IntegrableModel model = new ProductModel(b); 043 044 res[factors - 1][0] = factors; 045 res[factors - 1][1] = lowestEv(model, factors / 2, N, R); 046 } 047 048 writeDatafile("MultipleCouplings", header, res); 049 050 } 051}