1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Added scalar action phi^4

Check Norm2 output (Complex type assumption)
This commit is contained in:
Guido Cossu
2016-10-07 17:28:46 +01:00
parent 11b4c80b27
commit 6eb873dd96
16 changed files with 401 additions and 38 deletions

View File

@ -34,8 +34,21 @@ class FundamentalRep {
};
template<class Field>
class EmptyRep {
public:
typedef Field LatticeField;
explicit EmptyRep(GridBase* grid) {} //do nothing
void update_representation(const LatticeField& Uin) {} // do nothing
LatticeField RtoFundamentalProject(const LatticeField& in, Real scale = 1.0) const{}// do nothing
};
typedef FundamentalRep<Nc> FundamentalRepresentation;
}
}

View File

@ -4,6 +4,8 @@
#include <Grid/qcd/representations/adjoint.h>
#include <Grid/qcd/representations/two_index.h>
#include <Grid/qcd/representations/fundamental.h>
#include <Grid/qcd/action/scalar/scalarImpl.h>
#include <tuple>
#include <utility>
@ -39,13 +41,17 @@ class Representations {
int size() { return tuple_size; }
// update the fields
// fields in the main representation always the first in the list
// get the field type
typedef typename std::tuple_element<0,Representation_Fields>::type LatticeSourceField;
template <std::size_t I = 0>
inline typename std::enable_if<(I == tuple_size), void>::type update(
LatticeGaugeField& U) {}
LatticeSourceField& U) {}
template <std::size_t I = 0>
inline typename std::enable_if<(I < tuple_size), void>::type update(
LatticeGaugeField& U) {
LatticeSourceField& U) {
std::get<I>(rep).update_representation(U);
update<I + 1>(U);
}
@ -55,6 +61,7 @@ class Representations {
};
typedef Representations<FundamentalRepresentation> NoHirep;
typedef Representations<EmptyRep<typename ScalarImplR::Field> > ScalarFields;
// Helper classes to access the elements
// Strips the first N parameters from the tuple