From: Anthony Geay Date: Fri, 19 Sep 2014 13:57:28 +0000 (+0200) Subject: Correction of bug EDF8761 (ELNOMesh filter with GeneratedVectors activated.) X-Git-Tag: V7_5_0a1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7f8e0c7cf76d1cc0685c88844dfca7ae5dcb7071;p=modules%2Fparavis.git Correction of bug EDF8761 (ELNOMesh filter with GeneratedVectors activated.) --- diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx index 9d6894ff..1eb4c7ab 100644 --- a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx +++ b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx @@ -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())) { diff --git a/src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx b/src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx index abe812cd..10ac9058 100644 --- a/src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx +++ b/src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx @@ -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); }