]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Correction of bug EDF8761 (ELNOMesh filter with GeneratedVectors activated.)
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 19 Sep 2014 13:57:28 +0000 (15:57 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 19 Sep 2014 13:57:28 +0000 (15:57 +0200)
src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx
src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx

index 9d6894ffa381756fa20f003cc89e31108370ad0c..1eb4c7ab056d6b2ec824295e1fe814848c16a678 100644 (file)
@@ -108,7 +108,7 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request,
   for(int index = 0; index < fielddata->GetNumberOfArrays(); index++)
     {
       vtkDataArray *data(fielddata->GetArray(index));
-      vtkQuadratureSchemeDefinition **dict;
+      vtkQuadratureSchemeDefinition **dict(0);
       vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
       if(key->Has(data->GetInformation()))
         {
index abe812cd6db419e6dc3e100e706832f85290d397..10ac90587a78b63263937c4cbce709a82a5ac28d 100644 (file)
@@ -22,6 +22,7 @@
 #include "vtkDoubleArray.h"
 #include "vtkInformation.h"
 #include "vtkQuadratureSchemeDefinition.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
 #include "MEDUtilities.hxx"
 #include "vtkFieldData.h"
 
@@ -123,6 +124,15 @@ void vtkGenerateVectors::UpdateInformationOfArray(vtkDoubleArray *oldArr, vtkDou
     }
   if(oldArr->GetInformation()->Get(MEDUtilities::ELGA()))
     arr->GetInformation()->Set(MEDUtilities::ELGA(),1);
+  vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
+  if(key->Has(oldArr->GetInformation()))
+    {
+      int dictSize(key->Size(oldArr->GetInformation()));
+      vtkQuadratureSchemeDefinition **dict(new vtkQuadratureSchemeDefinition *[dictSize]);
+      key->GetRange(oldArr->GetInformation(),dict,0,0,dictSize);
+      key->SetRange(arr->GetInformation(),dict,0,0,dictSize);
+      delete [] dict;
+    }
   if(oldArr->GetInformation()->Get(MEDUtilities::ELNO()))
     arr->GetInformation()->Set(MEDUtilities::ELNO(),1);
 }