Skip to content
Snippets Groups Projects
Commit 303b0a6f authored by Gauthier Becker's avatar Gauthier Becker
Browse files

Fix bug with interDomain

elasto-plastic begin
implicit mpi begin 
parent 1d861d80
No related branches found
No related tags found
No related merge requests found
...@@ -262,6 +262,29 @@ class STensor3 { ...@@ -262,6 +262,29 @@ class STensor3 {
setMat(m3); setMat(m3);
return *this; return *this;
} }
void operator-= (const STensor3 &other)
{
for(int i=0;i<9;i++) _val[i]-=other._val[i];
}
void daxpy(const STensor3 &other, const double alpha=1.)
{
if(alpha==1.)
for(int i=0;i<9;i++) _val[i]+=other._val[i];
else
for(int i=0;i<9;i++) _val[i]+=alpha*other._val[i];
}
double trace() const
{
return ((_val[0]+_val[4]+_val[8])/3.);
}
double dotprod() const
{
double prod=0;
for(int i=0;i<9;i++) prod+=_val[i]*_val[i];
return prod;
}
void print(const char *) const; void print(const char *) const;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment