Commit c544cbdb authored by Philipp Arras's avatar Philipp Arras
Browse files

Convert vdots to sums

parent 2d603aa7
Pipeline #24168 failed with stage
in 3 minutes and 58 seconds
......@@ -101,8 +101,8 @@ class CriticalPowerEnergy(Energy):
self._theta = exp(-self.position) * (self.q + self._w*0.5)
Tt = self.T(self.position)
energy = self._theta.vdot(Field.ones_like(self._theta))
energy += self.position.vdot(Field.ones_like(self.position)) *(self.alpha-0.5)
energy = self._theta.sum()
energy += self.position.sum() * (self.alpha-0.5)
energy += 0.5*self.position.vdot(Tt)
self._value = energy.real
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment