Skip to content
Snippets Groups Projects
Commit 8a9ff4ba authored by Ludovic Noels's avatar Ludovic Noels
Browse files

update

parent 41581dd1
Branches
No related tags found
No related merge requests found
...@@ -13,11 +13,11 @@ bool STensorOperation::polynomial(const STensor3& a, const int order, const full ...@@ -13,11 +13,11 @@ bool STensorOperation::polynomial(const STensor3& a, const int order, const full
if (STensorOperation::isnan(a)) if (STensorOperation::isnan(a))
{ {
Msg::Error("STensorOperation::polynomial of a NAN tensor"); Msg::Info("STensorOperation::polynomial of a NAN tensor");
STensorOperation::zero(F); STensorOperation::zero(F);
if (dF){ if (dF!=NULL){
(*dF) = I4; (*dF) = I4;
if (ddF){ if (ddF!=NULL){
STensorOperation::zero(*ddF); STensorOperation::zero(*ddF);
} }
} }
...@@ -87,13 +87,14 @@ bool STensorOperation::logSTensor3(const STensor3& a, const int order, STensor3& ...@@ -87,13 +87,14 @@ bool STensorOperation::logSTensor3(const STensor3& a, const int order, STensor3&
// Tools // Tools
if(determinantSTensor3(a)<1.e-24) if(determinantSTensor3(a)<1.e-24)
{ {
Msg::Error("STensorOperation::logSTensor3 of a tensor with a negative determinant"); Msg::Info("STensorOperation::logSTensor3 of a tensor with a negative determinant");
return false; return false;
} }
static const STensor3 mI(-1.); static const STensor3 mI(-1.);
static const STensor43 I4(1.,1.); static const STensor43 I4(1.,1.);
static STensor3 ami; static STensor3 ami;
STensorOperation::zero(ami);
// Choose approximation order // Choose approximation order
if (order == 1){ if (order == 1){
...@@ -117,7 +118,7 @@ bool STensorOperation::logSTensor3(const STensor3& a, const int order, STensor3& ...@@ -117,7 +118,7 @@ bool STensorOperation::logSTensor3(const STensor3& a, const int order, STensor3&
ami = mI; ami = mI;
ami+= a; ami+= a;
fullVector<double> coeffs(order+1); static fullVector<double> coeffs(order+1);
for (int i=0; i< order+1; i++){ for (int i=0; i< order+1; i++){
if (i==0){ if (i==0){
...@@ -135,7 +136,11 @@ bool STensorOperation::logSTensor3(const STensor3& a, const int order, STensor3& ...@@ -135,7 +136,11 @@ bool STensorOperation::logSTensor3(const STensor3& a, const int order, STensor3&
bool ok = STensorOperation::polynomial(ami,order,coeffs,loga,dloga,ddloga); bool ok = STensorOperation::polynomial(ami,order,coeffs,loga,dloga,ddloga);
if (!ok){ if (!ok){
//#ifdef _DEBUG //#ifdef _DEBUG
Msg::Error("error in computing logSTensor3"); Msg::Info("error in computing logSTensor3");
STensorOperation::zero(loga);
if( dloga!=NULL) STensorOperation::zero(*dloga);
if( ddloga!=NULL) STensorOperation::zero(*ddloga);
return false; return false;
//#endif // _DEBUG //#endif // _DEBUG
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment