Skip to content
Snippets Groups Projects
Commit 349b5642 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix aniso PostView field

parent 9f76fd33
No related branches found
No related tags found
No related merge requests found
...@@ -1296,19 +1296,20 @@ class PostViewField : public Field ...@@ -1296,19 +1296,20 @@ class PostViewField : public Field
if(!octree->searchTensorWithTol(x, y, z, l, 0, 0, 0.05)) if(!octree->searchTensorWithTol(x, y, z, l, 0, 0, 0.05))
Msg::Info("No tensor element found containing point (%g,%g,%g)", x, y, z); Msg::Info("No tensor element found containing point (%g,%g,%g)", x, y, z);
if(crop_negative_values){ if(crop_negative_values){
if(l[0] <= 0 && l[1] <= 0 && l[2] <= 0 &&
l[3] <= 0 && l[4] <= 0 && l[5] <= 0 &&
l[6] <= 0 && l[7] <= 0 && l[8] <= 0){
for(int i = 0; i < 9; i++) l[i] = MAX_LC;
}
else{
for(int i = 0; i < 9; i++){ for(int i = 0; i < 9; i++){
if(l[i] <= 0) l[i] = MAX_LC; if(l[i] <= 0) l[i] = 0;
} }
} }
metr(0, 0) = l[0]; }
metr(0, 1) = l[1]; metr(0, 0) = l[0]; metr(0, 1) = l[1]; metr(0, 2) = l[2];
metr(0, 2) = l[2]; metr(1, 0) = l[3]; metr(1, 1) = l[4]; metr(1, 2) = l[5];
metr(1, 0) = l[3]; metr(2, 0) = l[6]; metr(2, 1) = l[7]; metr(2, 2) = l[8];
metr(1, 1) = l[4];
metr(1, 2) = l[5];
metr(2, 0) = l[6];
metr(2, 1) = l[7];
metr(2, 2) = l[8];
} }
const char *getName() const char *getName()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment