Skip to content
Snippets Groups Projects
Commit 379e36f9 authored by Van Dung Nguyen's avatar Van Dung Nguyen
Browse files

add dev

parent 8401249b
No related branches found
No related tags found
No related merge requests found
......@@ -350,6 +350,14 @@ class STensor3 {
}
return sqrt(sqr);
}
STensor3 dev() const{
double p= trace()/3.;
STensor3 de(*this);
de(0,0) -= p;
de(1,1) -= p;
de(2,2) -= p;
return de;
}
};
// tensor product
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment