Salome HOME
Get rid off deepCopy in // mode and limitation of number of requestInformation
[modules/paravis.git] / src / Plugins / MEDReader / plugin / MEDReaderIO / vtkMEDReader.h
old mode 100644 (file)
new mode 100755 (executable)
index 4d0b361..03b1cb4
@@ -1,4 +1,4 @@
-// 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
@@ -25,7 +25,9 @@
 
 #include "vtkMultiBlockDataSetAlgorithm.h"
 #include "vtkInformationGaussDoubleVectorKey.h"
+#include "vtkNew.h"
 
+class vtkDataArraySelection;
 class vtkDataSet;
 class vtkMutableDirectedGraph;
 class vtkInformationDataObjectMetaDataKey;
@@ -43,7 +45,7 @@ class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
   void PrintSelf(ostream& os, vtkIndent indent);
   virtual void SetFileName(const char*);
   virtual char *GetFileName();
-  virtual const char *GetFileExtensions() { return ".med .rmed .sauv .sauve"; }
+  virtual const char *GetFileExtensions() { return ".med .rmed"; }
   virtual const char *GetDescriptiveName() { return "MED file (Data Exchange Model)"; }
   //
   virtual void SetFieldsStatus(const char *name, int status);
@@ -60,13 +62,13 @@ class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
 
   // Description
   // Reload will delete the internal reader and recreate it with default properties
+  // As well as reset public properties to their default values, except for the FileName
   virtual void Reload();
 
-  virtual int GetServerModifTime();
-  //
-  virtual void GenerateVectors(int);
-  virtual void ChangeMode(int);
-  virtual void GhostCellGeneratorCallForPara(int);
+  // Description
+  // ReloadInternals will delete the internal reader and recreate it
+  virtual void ReloadInternals();
+
   static const char *GetSeparator();
 
   // Description
@@ -74,6 +76,32 @@ class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
   static vtkInformationDataObjectMetaDataKey* META_DATA();
   static vtkInformationGaussDoubleVectorKey* GAUSS_DATA();
 
+  // Description
+  // Control if MPI should be used for distribution when using a distributed server
+  // Only has an effect if MEDREADER_USE_MPI is defined.
+  // Default is true
+  vtkSetMacro(DistributeWithMPI, bool);
+  vtkGetMacro(DistributeWithMPI, bool);
+
+  // Description
+  // Control if vectors should be generated
+  // Default is false
+  void GenerateVectors(int);
+  vtkGetMacro(GenerateVect, bool);
+
+  // Description
+  // Control to set is std or mode should be used
+  // Default is false
+  void ChangeMode(int);
+  vtkGetMacro(IsStdOrMode, bool);
+
+  // Description
+  // Control if a Ghost Cell Generator should be used
+  // Default is true
+  void GhostCellGeneratorCallForPara(int);
+  vtkGetMacro(GCGCP, bool);
+
+
  protected:
   vtkMEDReader();
   virtual ~vtkMEDReader();
@@ -90,6 +118,16 @@ class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
 
   class vtkMEDReaderInternal;
   vtkMEDReaderInternal* Internal;
+
+  vtkNew<vtkDataArraySelection> FieldSelection;
+  vtkNew<vtkDataArraySelection> TimeFlagSelection;
+  std::string FileName;
+  //when false -> std, true -> mode. By default std (false).
+  bool IsStdOrMode = false;
+  //when false -> do nothing. When true cut off or extend to nbOfCompo=3 vector arrays.
+  bool GenerateVect = false;
+  bool GCGCP = true;
+  bool DistributeWithMPI = true;
 };
 
 #endif //__vtkMEDReader_h_