Skip to content
Snippets Groups Projects
Commit 0a5fb2b8 authored by Lina Homsy's avatar Lina Homsy
Browse files

need modfinig --This line, and those below, will be ignored--

M    Geo/STensor3.h
parent a3908d8b
No related branches found
No related tags found
No related merge requests found
...@@ -339,6 +339,15 @@ class STensor3 { ...@@ -339,6 +339,15 @@ class STensor3 {
val = fabs(_val[i]); val = fabs(_val[i]);
return val; return val;
}; };
double norm2()const{
double sqr = 0;
for (int i=0; i<3; i++){
for (int j =0; j<3; j++){
sqr += this->operator()(i,j)*this->operator()(i,j);
}
}
return sqrt(sqr);
}
}; };
// tensor product // tensor product
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment