22 Dipole(
const unsigned i,
const Matrix& M): r0(M(i,0),M(i,1),M(i,2)),q(M(i,3),M(i,4),M(i,5)) { }
28 const Vect3& x = r-r0;
29 const double nrm2 = x.
norm2();
30 return dotprod(q,x)/(nrm2*sqrt(nrm2));
const Vect3 & moment() const
Dipole(const unsigned i, const Matrix &M)
double potential(const Vect3 &r) const
Dipole(const Vect3 &pos, const Vect3 &moment)
const Vect3 & position() const
Matrix class Matrix class.
double dotprod(const Vect3 &V1, const Vect3 &V2)