Skip to content

File fieldstrength.h

File List > algebra > gaugealgebra > fieldstrength.h

Go to the documentation of this file

#ifndef TEMPLAT_LATTICE_ALGEBRA_COMPLEXALGEBRA_FIELDSTRENGTH_H
#define TEMPLAT_LATTICE_ALGEBRA_COMPLEXALGEBRA_FIELDSTRENGTH_H

/* This file is part of TempLat, available at https://cosmolattice.github.io/templat .
   Copyright 2021-2026 The TempLat authors, see AUTHORS.md.
   Released under the MIT license, see LICENSE.md. */

// File info: Main contributor(s): Adrien Florio, Year: 2019

#include "TempLat/util/rangeiteration/tag.h"
#include "TempLat/lattice/algebra/spatialderivatives/forwdiff.h"
#include "TempLat/lattice/algebra/spatialderivatives/neutdiff.h"

namespace TempLat
{
  template <typename R, int Mu, int Nu> auto fieldStrength(R A, Tag<Mu> mu, Tag<Nu> nu)
  {
    return forwDiff(A(nu), mu) - forwDiff(A(mu), nu);
  }

  template <typename R, int Mu, int Nu> auto fieldStrengthCtr(R A, Tag<Mu> mu, Tag<Nu> nu)
  {
    return neutDiff(A(nu), mu) - neutDiff(A(mu), nu);
  }
} // namespace TempLat

#endif