-// 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 "vtkMultiBlockDataSetAlgorithm.h"
#include "vtkInformationGaussDoubleVectorKey.h"
+#include "vtkNew.h"
+class vtkDataArraySelection;
class vtkDataSet;
class vtkMutableDirectedGraph;
class vtkInformationDataObjectMetaDataKey;
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);
// 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
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();
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_