-// Copyright (C) 2010-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2022 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
#include "MEDCouplingFieldDouble.hxx"
#include "InterpKernelGaussCoords.hxx"
#include "MEDFileData.hxx"
-#include "SauvReader.hxx"
#include "MEDCouplingMemArray.txx"
#ifdef MEDREADER_USE_MPI
#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
#include "vtkInformationIntegerKey.h"
#include "vtkInformation.h"
-#include "vtkDataArrayTemplate.h"
+#include "vtkAOSDataArrayTemplate.h"
#include "vtkIdTypeArray.h"
#include "vtkDoubleArray.h"
#include "vtkIntArray.h"
template<class T>
vtkIdTypeArray *ELGACmp::createNew(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDataArray *vtkd, vtkDataSet *ds, ExportedTinyInfo *internalInfo) const
{
- const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<T>::VTK_DATA_ARRAY_DELETE;
+ const int VTK_DATA_ARRAY_DELETE=vtkAOSDataArrayTemplate<T>::VTK_DATA_ARRAY_DELETE;
std::vector< std::vector<std::string> > locNames(_loc_names);
std::vector<vtkIdTypeArray *> elgas(_elgas);
std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > defs;
void AssignDataPointerToVTK(typename MEDFileVTKTraits<T>::VtkType *vtkTab, typename MEDFileVTKTraits<T>::MCType *mcTab, bool noCpyNumNodes)
{
if(noCpyNumNodes)
- vtkTab->SetArray(mcTab->getPointer(),mcTab->getNbOfElems(),1,vtkDataArrayTemplate<T>::VTK_DATA_ARRAY_FREE);
+ vtkTab->SetArray(mcTab->getPointer(),mcTab->getNbOfElems(),1,vtkAOSDataArrayTemplate<T>::VTK_DATA_ARRAY_FREE);
else
- { vtkTab->SetArray(mcTab->getPointer(),mcTab->getNbOfElems(),0,vtkDataArrayTemplate<T>::VTK_DATA_ARRAY_FREE); mcTab->accessToMemArray().setSpecificDeallocator(0); }
+ { vtkTab->SetArray(mcTab->getPointer(),mcTab->getNbOfElems(),0,vtkAOSDataArrayTemplate<T>::VTK_DATA_ARRAY_FREE); mcTab->accessToMemArray().setSpecificDeallocator(0); }
}
// here copy is always assumed.
const std::vector<TypeOfField>& discs, const ELGACmp& elgaCmp, const MEDCoupling::MEDFileFieldGlobsReal *globs,
MEDFileAnyTypeField1TS *f1ts, vtkDataSet *ds, ExportedTinyInfo *internalInfo)
{
- const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<T>::VTK_DATA_ARRAY_DELETE;
+ const int VTK_DATA_ARRAY_DELETE=vtkAOSDataArrayTemplate<T>::VTK_DATA_ARRAY_DELETE;
typename MEDFileVTKTraits<T>::MCType *vi(static_cast<typename MEDFileVTKTraits<T>::MCType *>(vPtr));
typename MEDFileVTKTraits<T>::VtkType *vtkd(MEDFileVTKTraits<T>::VtkType::New());
vtkd->SetNumberOfComponents((int)vi->getNumberOfComponents());
this->computeFullNameInLeaves();
}
-void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileName, bool isMEDOrSauv, int iPart, int nbOfParts)
+void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileName, int iPart, int nbOfParts)
{
MCAuto<MEDFileMeshes> ms;
MCAuto<MEDFileFields> fields;
- if(isMEDOrSauv)
{
if((iPart==-1 && nbOfParts==-1) || (iPart==0 && nbOfParts==1))
{
#endif
}
}
- else
- {
- MCAuto<MEDCoupling::SauvReader> sr(MEDCoupling::SauvReader::New(fileName));
- MCAuto<MEDCoupling::MEDFileData> mfd(sr->loadInMEDFileDS());
- ms=mfd->getMeshes(); ms->incrRef();
- int nbMeshes(ms->getNumberOfMeshes());
- for(int i=0;i<nbMeshes;i++)
- {
- MEDCoupling::MEDFileMesh *tmp(ms->getMeshAtPos(i));
- MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast<MEDCoupling::MEDFileUMesh *>(tmp));
- if(tmp2)
- tmp2->forceComputationOfParts();
- }
- fields=mfd->getFields();
- if(fields.isNotNull())
- fields->incrRef();
- }
loadInMemory(fields,ms);
}