flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
lattice_foreign_constraint.hpp
Go to the documentation of this file.
1#ifndef LATTICE_FOREIGN_CONSTRAINT_H
2#define LATTICE_FOREIGN_CONSTRAINT_H
3
4
6
7namespace flexiblesusy {
8
10public:
11 ForeignConstraint(size_t nrows) :
12 SingleSiteConstraint(), nr(nrows) {}
13 void init(RGFlow<Lattice> *flow, size_t theory, size_t site) {
14 SingleSiteConstraint::init(flow, theory, site);
15 x.resize(f->efts[T].w->width);
16 row.resize(x.size());
17 }
18 void alloc_rows() { ralloc(nr); }
20protected:
21 void set_x() {
22 for (size_t j = 0; j < x.size(); j++) x[j] = u(j)*y(j);
23 }
24 void copy_row(size_t r) {
25 for (size_t j = 0; j < row.size(); j++) A(r,j) = row[j]*u(j);
26 z(r) = rhs;
27 }
31private:
32 size_t nr;
33};
34
36public:
37 ForeignMatching(size_t nrows) :
38 InterTheoryConstraint(), nr(nrows) {}
39 void init(RGFlow<Lattice> *flow, size_t lower_theory) {
40 InterTheoryConstraint::init(flow, lower_theory);
41 w.resize(f->efts[TL ].w->width);
42 x.resize(f->efts[TL+1].w->width);
43 row.resize(w.size() + x.size());
44 }
45 void alloc_rows() { ralloc(nr); }
47protected:
48 void set_w_x() {
49 for (size_t j = 0; j < w.size(); j++) w[j] = u(0,j)*y(0,j);
50 for (size_t j = 0; j < x.size(); j++) x[j] = u(1,j)*y(1,j);
51 }
52 void copy_row(size_t r) {
53 RVec::const_iterator p = row.begin();
54 for (size_t j = 0; j < w.size(); j++) A(r,0,j) = u(0,j) * *p++;
55 for (size_t j = 0; j < x.size(); j++) A(r,1,j) = u(1,j) * *p++;
56 z(r) = rhs;
57 }
62private:
63 size_t nr;
64};
65
66} // namespace flexiblesusy
67
68#endif // LATTICE_FOREIGN_CONSTRAINT_H
virtual void init(RGFlow< Lattice > *flow, size_t theory, size_t site)
void init(RGFlow< Lattice > *flow, size_t theory, size_t site)
void init(RGFlow< Lattice > *flow, size_t lower_theory)
Real u(size_t To, size_t i) const
virtual void init(RGFlow< Lattice > *flow, size_t lower_theory)
Real y(size_t To, size_t i) const
Real & A(size_t r, size_t To, size_t j)
double Real
Definition: mathdefs.hpp:12
std::vector< Real > RVec