From 88dd12425ad93d922a77795aceacb83bdd08b9e1 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 21 Apr 2021 11:06:23 +0200 Subject: [PATCH] Try to solve MEDWRITER_0 test on PV590 --- .../RateOfFlowThroughSectionModule/VTKToMEDMem.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/RateOfFlowThroughSection/plugin/RateOfFlowThroughSectionModule/VTKToMEDMem.cxx b/src/RateOfFlowThroughSection/plugin/RateOfFlowThroughSectionModule/VTKToMEDMem.cxx index 5792221..2cd0801 100644 --- a/src/RateOfFlowThroughSection/plugin/RateOfFlowThroughSectionModule/VTKToMEDMem.cxx +++ b/src/RateOfFlowThroughSection/plugin/RateOfFlowThroughSectionModule/VTKToMEDMem.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2020 CEA/DEN, EDF R&D +// Copyright (C) 2017-2021 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,6 +23,7 @@ #include "vtkAdjacentVertexIterator.h" #include "vtkIntArray.h" #include "vtkLongArray.h" +#include "vtkLongLongArray.h" #include "vtkCellData.h" #include "vtkPointData.h" #include "vtkFloatArray.h" @@ -163,6 +164,13 @@ DataArrayIdType *ConvertVTKArrayToMCArrayInt(vtkDataArray *data) std::copy(pt,pt+nbElts,ptOut); return ret.retn(); } + vtkLongLongArray *d1l(vtkLongLongArray::SafeDownCast(data)); + if(d1l) + { + const long long *pt(d1l->GetPointer(0)); + std::copy(pt,pt+nbElts,ptOut); + return ret.retn(); + } vtkIdTypeArray *d3(vtkIdTypeArray::SafeDownCast(data)); if(d3) { -- 2.39.2