From c469d840f3f9d8459bd647dca8a2c469e5e91901 Mon Sep 17 00:00:00 2001 From: Christoph Lehner Date: Thu, 19 Dec 2024 17:54:28 +0100 Subject: [PATCH] c-order potential --- lib/gpt/algorithms/group/polar_regulator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/gpt/algorithms/group/polar_regulator.py b/lib/gpt/algorithms/group/polar_regulator.py index 9463e4bd..db3bedc5 100644 --- a/lib/gpt/algorithms/group/polar_regulator.py +++ b/lib/gpt/algorithms/group/polar_regulator.py @@ -21,16 +21,17 @@ class polar_regulator(differentiable_functional): - def __init__(self, lam, kap): + def __init__(self, lam, kap, c): self.lam = lam self.kap = kap + self.c = c def __call__(self, fields): I = g.identity(fields[0]) Nc = fields[0].otype.Ndim r = 0.0 for mu in range(len(fields)): - r += (self.lam / 2 / Nc) * g.sum(g.trace((fields[mu] - I) * (fields[mu] - I))).real + r += (self.lam / 2 / Nc) * g.sum(g.component.pow(self.c)(g.trace((fields[mu] - I) * (fields[mu] - I)))).real r -= (self.kap / Nc) * g.sum(g.component.log(g.matrix.det(fields[mu]))).real return r @@ -41,6 +42,6 @@ def gradient(self, fields, dfields): I = g.identity(dfields[0]) Nc = fields[0].otype.Ndim for df in dfields: - x = g(2.0 * (self.lam / 2 / Nc) * (df - I) - (self.kap / Nc) * g.matrix.inv(df)) + x = g(2.0 * (self.lam / 2 / Nc) * self.c * g.component.pow(self.c-1)(g.trace((df - I)*(df-I)))* (df - I) - (self.kap / Nc) * g.matrix.inv(df)) dAdS.append(x) return dAdS