Beispiel #1
0
// Outputs T^ijk V_i summing over ith (1st 2nd or 3rd) index. eg i = 
// 1: M_ij = T^kij V_k
// 2: M_ij = T^jki V_k
// 3: M_ij = T^ijk V_k
// so the matrix indices are just in order from L-R AFTER summed index.
DoubleMatrix Tensor::dotProd(const DoubleVector & V, int i) const {
  DoubleMatrix result(3, 3);

  int j, k, l;
  for (j=1; j<=3; j++)
    for (k=1; k<=3; k++)
      switch(i) {
      case 1: 
	for (l=1; l<=3; l++) 
	  result(j, k) += display(l, j, k) * V.display(l);
	break; 
      case 2:
	for (l=1; l<=3; l++) 
	  result(j, k) += display(k, l, j) * V.display(l); 
	break;
      case 3:
	for (l=1; l<=3; l++) 
	  result(j, k) += display(j, k, l) * V.display(l); 
	break;
      default:
	ostringstream ii;
	ii << "sum out of range in dot product " << *this << "*" 
	   << V << "(" << V.displayStart() << "," << V.displayEnd() << ")"
	   << " on " << i << "th index.\n"; 
	throw ii.str();
      }
  return result;
}
Beispiel #2
0
void NmssmSusy::set(const DoubleVector & y) {
  assert(y.displayEnd() - y.displayStart() + 1 >= numNMssmPars);
  MssmSusy::set(y);
  sVev = y.display(34);
  lambda = y.display(35);
  kappa = y.display(36);
  mupr = y.display(37);
  xiF = y.display(38);
}
void StandardModel<Two_scale>::setAllGauge(const DoubleVector& v)
{
   assert(v.displayStart() == 1 && v.displayEnd() == 3);
   g = v;
}