]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
WIP agy/edf26666
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 28 Dec 2022 09:20:40 +0000 (10:20 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 28 Dec 2022 09:20:40 +0000 (10:20 +0100)
src/MEDLoader/MEDFileBlowStrEltUp.cxx

index db2b475123adc97a8038844f0b659a9fcd7f4f18..aba6b59f63cf335ad16e9cfd6ca0ff1a83c46a0d 100644 (file)
@@ -410,6 +410,9 @@ MCAuto<MEDCouplingUMesh> LocInfo::BuildMeshCommon(INTERP_KERNEL::NormalizedCellT
   fakeF->setGaussLocalizationOnType(gt,loc.getRefCoords(),loc.getGaussCoords(),loc.getGaussWeights());
   ptsForLoc=fakeF->getLocalizationOfDiscr();
   //
+  if(ptsForLoc->getNumberOfComponents()!=3)
+    ptsForLoc = ptsForLoc->changeNbOfComponents(3,0.0);
+  //
   return geoMesh;
 }
 
@@ -533,7 +536,11 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshPipeSEG3(const DataArrayDouble *angle,
     geoMesh2->convertQuadraticCellsToLinear();
     dir=geoMesh2->buildDirectionVectorField();
   }
-  MCAuto<DataArrayDouble> rot(dir->getArray()->fromCartToSpher());
+  MCAuto<DataArrayDouble> dirArr;
+  dirArr.takeRef(dir->getArray());
+  if(dir->getNumberOfComponents()!=3)
+    dirArr = dirArr->changeNbOfComponents(3,0.0);
+  MCAuto<DataArrayDouble> rot(dirArr->fromCartToSpher());
   std::size_t nbCompo(ptsForLoc->getNumberOfComponents());
   MCAuto<DataArrayDouble> secPts(section->getCoords()->changeNbOfComponents(nbCompo,0.));
   {