]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Behaviour modification on meshDim==2 and spaceDim==2 on EDCouplingUMesh::buildOrthogo...
authorageay <ageay>
Mon, 25 Mar 2013 14:22:08 +0000 (14:22 +0000)
committerageay <ageay>
Mon, 25 Mar 2013 14:22:08 +0000 (14:22 +0000)
src/MEDCoupling/MEDCouplingUMesh.cxx

index 180f5967a563873e4b65e262ceea62073e2e4266..4fa0e852ddfff39b51f51913a991db0c117281a1 100644 (file)
@@ -3205,8 +3205,10 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildOrthogonalField() const
         }
       else
         {
-          for(int i=0;i<nbOfCells;i++)
-            { vals[3*i]=0.; vals[3*i+1]=0.; vals[3*i+2]=1.; }
+          MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> isAbs=getMeasureField(false);
+          const double *isAbsPtr=isAbs->getArray()->begin();
+          for(int i=0;i<nbOfCells;i++,isAbsPtr++)
+            { vals[3*i]=0.; vals[3*i+1]=0.; vals[3*i+2]=*isAbsPtr>0.?1.:-1.; }
         }
     }
   else//meshdimension==1