Commit 0671358a by Francois Gygi

Fixed const member functions


git-svn-id: http://qboxcode.org/svn/qb/branches/efield@1594 cba15fb0-1239-40c8-b417-11db7ca47a34
parent e6e109d8
......@@ -242,19 +242,19 @@ class D3tensor
return D3tensor()-a;
}
double norm2(const D3tensor& a)
double norm2(const D3tensor& a) const
{
return a_[0]*a_[0] + a_[1]*a_[1] + a_[2]*a_[2] +
a_[3]*a_[3] + a_[4]*a_[4] + a_[5]*a_[5] +
a_[6]*a_[6] + a_[7]*a_[7] + a_[8]*a_[8];
}
double norm(const D3tensor& a)
double norm(const D3tensor& a) const
{
return sqrt(norm2(a));
}
double trace(void)
double trace(void) const
{
return a_[0]+a_[4]+a_[8];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment