vtkGroupAsMultiBlock
vtkGroupsNames
vtkUgSelectCellIds
+ vtkFileSeriesGroupReader
)
vtk_module_add_module(MEDReaderIO
VTK::FiltersExtraction
VTK::IOLegacy
ParaView::RemotingCore
+ ParaView::VTKExtensionsIOCore
PRIVATE_DEPENDS
VTK::IOLegacy
ParaView::VTKExtensionsFiltersRendering
+ ParaView::VTKExtensionsFiltersGeneral
ParaView::VTKExtensionsMisc
+OPTIONAL_DEPENDS
+ VTK::FiltersParallelGeometry
--- /dev/null
+// Copyright (C) 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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "vtkFileSeriesGroupReader.h"
+
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
+#include <vtkMultiBlockDataSet.h>
+#include <vtkMultiProcessController.h>
+#include <vtkObjectFactory.h>
+#include <vtkSmartPointer.h>
+#include <vtkStreamingDemandDrivenPipeline.h>
+
+#include "vtkMEDReader.h"
+
+#include <vector>
+#include <string>
+
+vtkStandardNewMacro(vtkFileSeriesGroupReader);
+
+//=============================================================================
+struct vtkFileSeriesGroupReaderInternals
+{
+ std::vector<std::string> FileNames;
+};
+
+//=============================================================================
+vtkFileSeriesGroupReader::vtkFileSeriesGroupReader()
+ : Internals(new vtkFileSeriesGroupReaderInternals())
+{
+ this->SetNumberOfInputPorts(0);
+ this->SetNumberOfOutputPorts(1);
+}
+
+//-----------------------------------------------------------------------------
+vtkFileSeriesGroupReader::~vtkFileSeriesGroupReader() = default;
+
+//----------------------------------------------------------------------------
+void vtkFileSeriesGroupReader::AddFileName(const char* name)
+{
+ // Make sure the reader always has a filename set
+ this->ReaderSetFileName(name);
+
+ this->AddFileNameInternal(name);
+ this->Modified();
+}
+
+//----------------------------------------------------------------------------
+void vtkFileSeriesGroupReader::RemoveAllFileNames()
+{
+ this->RemoveAllFileNamesInternal();
+ this->Modified();
+}
+
+//----------------------------------------------------------------------------
+void vtkFileSeriesGroupReader::RemoveAllFileNamesInternal()
+{
+ this->Internals->FileNames.clear();
+}
+
+//----------------------------------------------------------------------------
+void vtkFileSeriesGroupReader::AddFileNameInternal(const char* name)
+{
+ this->Internals->FileNames.emplace_back(name);
+}
+
+//----------------------------------------------------------------------------
+unsigned int vtkFileSeriesGroupReader::GetNumberOfFileNames()
+{
+ return static_cast<unsigned int>(this->Internals->FileNames.size());
+}
+
+//----------------------------------------------------------------------------
+const char* vtkFileSeriesGroupReader::GetFileName(unsigned int idx)
+{
+ if (idx >= this->Internals->FileNames.size())
+ {
+ return nullptr;
+ }
+ return this->Internals->FileNames[idx].c_str();
+}
+
+//----------------------------------------------------------------------------
+int vtkFileSeriesGroupReader::CanReadFile(const char* filename)
+{
+ if (!this->Reader)
+ {
+ return 0;
+ }
+
+ return this->ReaderCanReadFile(filename);
+}
+
+//----------------------------------------------------------------------------
+int vtkFileSeriesGroupReader::RequestInformation(
+ vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
+{
+ return this->Reader->ProcessRequest(request, inputVector, outputVector);
+}
+
+//----------------------------------------------------------------------------
+int vtkFileSeriesGroupReader::RequestData(vtkInformation* vtkNotUsed(request),
+ vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector)
+{
+ auto output = vtkMultiBlockDataSet::GetData(outputVector, 0);
+ unsigned int nBlock = this->GetNumberOfFileNames();
+ output->SetNumberOfBlocks(nBlock);
+
+ vtkInformation* info = outputVector->GetInformationObject(0);
+ double time = info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
+
+ vtkMultiProcessController *vmpc(vtkMultiProcessController::GetGlobalController());
+ unsigned int iProc = vmpc ? vmpc->GetLocalProcessId() : 0;
+ unsigned int nProc = vmpc ? vmpc->GetNumberOfProcesses() : 1;
+
+ // Simple case, one file/block per proc
+ if (nBlock == 1 || (nBlock <= nProc && iProc < nBlock))
+ {
+ // Distribute in MEDReader only when reading a single file in a single block
+ iProc = nBlock == 1 ? 0 : iProc;
+ vtkMEDReader::SafeDownCast(this->Reader)->SetDistributeWithMPI(nBlock == 1);
+
+ this->ReaderSetFileName(this->GetFileName(iProc));
+
+ // Needed only when reading a different file on each proc
+ if (nBlock != 1)
+ {
+ vtkMEDReader::SafeDownCast(this->Reader)->ReloadInternals();
+ this->Reader->UpdateInformation();
+ }
+
+ this->Reader->UpdateTimeStep(time);
+ vtkDataObject* outputReader = vtkMultiBlockDataSet::SafeDownCast(this->Reader->GetOutputDataObject(0))->GetBlock(0);
+ output->SetBlock(iProc, outputReader);
+ }
+ else
+ {
+ // Multiple files/block per proc
+ unsigned int nFiles = nBlock / nProc;
+ unsigned int offFile = iProc * nFiles;
+ unsigned int supFiles = nBlock % nProc;
+
+ // Last proc handle remaining files/block
+ if (iProc + 1 == nProc)
+ {
+ nFiles += supFiles;
+ }
+
+ for (unsigned int i = 0; i < nFiles; i++)
+ {
+ this->ReaderSetFileName(this->GetFileName(i + offFile));
+ vtkMEDReader::SafeDownCast(this->Reader)->SetDistributeWithMPI(false);
+ vtkMEDReader::SafeDownCast(this->Reader)->ReloadInternals();
+ this->Reader->UpdateInformation();
+ this->Reader->UpdateTimeStep(time);
+ vtkDataObject* outputReader = vtkMultiBlockDataSet::SafeDownCast(this->Reader->GetOutputDataObject(0))->GetBlock(0);
+ if (i + 1 == nFiles)
+ {
+ // Last reader, just use the reader output directly
+ output->SetBlock(i + offFile, outputReader);
+ }
+ else
+ {
+ // Need to deep copy as the reader will be reused
+ vtkSmartPointer<vtkDataObject> outputLeaf = vtkSmartPointer<vtkDataObject>::Take(outputReader->NewInstance());
+ outputLeaf->DeepCopy(outputReader);
+ output->SetBlock(i + offFile, outputLeaf);
+ }
+ }
+ }
+ return 1;
+}
+
+//------------------------------------------------------------------------------
+int vtkFileSeriesGroupReader::FillOutputPortInformation(
+ int vtkNotUsed(port), vtkInformation* info)
+{
+ info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkMultiBlockDataSet");
+ return 1;
+}
+
+//-----------------------------------------------------------------------------
+void vtkFileSeriesGroupReader::PrintSelf(ostream& os, vtkIndent indent)
+{
+ this->Superclass::PrintSelf(os, indent);
+
+ os << indent << "MetaFileName: " << (this->_MetaFileName ? this->_MetaFileName : "(none)")
+ << endl;
+}
--- /dev/null
+// Copyright (C) 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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef vtkFileSeriesGroupReader_h
+#define vtkFileSeriesGroupReader_h
+
+#include "vtkMetaReader.h"
+
+#include <memory>
+
+struct vtkFileSeriesGroupReaderInternals;
+
+class VTK_EXPORT vtkFileSeriesGroupReader : public vtkMetaReader
+{
+public:
+ static vtkFileSeriesGroupReader* New();
+ vtkTypeMacro(vtkFileSeriesGroupReader, vtkMetaReader);
+ void PrintSelf(ostream& os, vtkIndent indent) override;
+
+ /**
+ * CanReadFile is forwarded to the internal reader if it supports it.
+ */
+ virtual int CanReadFile(const char* filename);
+
+ /**
+ * Adds names of files to be read. The files are read in the order
+ * they are added.
+ */
+ virtual void AddFileName(const char* fname);
+
+ /**
+ * Remove all file names.
+ */
+ virtual void RemoveAllFileNames();
+
+ /**
+ * Returns the number of file names added by AddFileName.
+ */
+ virtual unsigned int GetNumberOfFileNames();
+
+ /**
+ * Returns the name of a file with index idx.
+ */
+ virtual const char* GetFileName(unsigned int idx);
+
+protected:
+ vtkFileSeriesGroupReader();
+ ~vtkFileSeriesGroupReader() override;
+
+ /**
+ * Add/Remove filenames without changing the MTime.
+ */
+ void RemoveAllFileNamesInternal();
+ void AddFileNameInternal(const char*);
+
+ int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector);
+ int RequestData(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector, vtkInformationVector* outputVector);
+ int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
+
+private:
+ vtkFileSeriesGroupReader(const vtkFileSeriesGroupReader&) = delete;
+ void operator=(const vtkFileSeriesGroupReader&) = delete;
+
+ std::unique_ptr<vtkFileSeriesGroupReaderInternals> Internals;
+};
+
+#endif
{
public:
- vtkMEDReaderInternal(vtkMEDReader *master):TK(0),IsStdOrMode(false),GenerateVect(false),SIL(0),LastLev0(-1),GCGCP(true)
+ vtkMEDReaderInternal(vtkMEDReader *master):TK(0),SIL(0),LastLev0(-1)
{
}
}
public:
MEDFileFieldRepresentationTree Tree;
- vtkNew<vtkDataArraySelection> FieldSelection;
- vtkNew<vtkDataArraySelection> TimeFlagSelection;
-
TimeKeeper TK;
- std::string FileName;
- //when false -> std, true -> mode. By default std (false).
- bool IsStdOrMode;
- //when false -> do nothing. When true cut off or extend to nbOfCompo=3 vector arrays.
- bool GenerateVect;
+
std::string DftMeshName;
// Store the vtkMutableDirectedGraph that represents links between family, groups and cell types
vtkMutableDirectedGraph* SIL;
// store the lev0 id in Tree corresponding to the TIME_STEPS in the pipeline.
int LastLev0;
- bool GCGCP;
};
vtkStandardNewMacro(vtkMEDReader)
// start of overload of vtkInformationKeyMacro
static vtkInformationDataObjectMetaDataKey *vtkMEDReader_META_DATA=new vtkInformationDataObjectMetaDataKey("META_DATA","vtkMEDReader");
-vtkInformationDataObjectMetaDataKey *vtkMEDReader::META_DATA()
+vtkInformationDataObjectMetaDataKey *vtkMEDReader::META_DATA()
{
static const char ZE_KEY[]="vtkMEDReader::META_DATA";
vtkInformationDataObjectMetaDataKey *ret(vtkMEDReader_META_DATA);
static vtkInformationGaussDoubleVectorKey *vtkMEDReader_GAUSS_DATA=new vtkInformationGaussDoubleVectorKey("GAUSS_DATA","vtkMEDReader");
-vtkInformationGaussDoubleVectorKey *vtkMEDReader::GAUSS_DATA()
+vtkInformationGaussDoubleVectorKey *vtkMEDReader::GAUSS_DATA()
{
static const char ZE_KEY[]="vtkMEDReader::GAUSS_DATA";
vtkInformationGaussDoubleVectorKey *ret(vtkMEDReader_GAUSS_DATA);
void vtkMEDReader::Reload()
{
- std::string fName((const char *)this->GetFileName());
+ this->ReloadInternals();
+ this->IsStdOrMode = false;
+ this->GenerateVect = false;
+ this->GCGCP = true;
+ this->FieldSelection->RemoveAllArrays();
+ this->TimeFlagSelection->RemoveAllArrays();
+ this->Modified();
+}
+void vtkMEDReader::ReloadInternals()
+{
delete this->Internal;
this->Internal=new vtkMEDReaderInternal(this);
- this->SetFileName(fName.c_str());
+ this->Modified();
}
void vtkMEDReader::GenerateVectors(int val)
{
if ( !this->Internal )
return;
-
+
bool val2((bool)val);
- if(val2!=this->Internal->GenerateVect)
+ if(val2!=this->GenerateVect)
{
- this->Internal->GenerateVect=val2;
+ this->GenerateVect=val2;
this->Modified();
}
}
{
if ( !this->Internal )
return;
-
- this->Internal->IsStdOrMode=newMode!=0;
+
+ this->IsStdOrMode=newMode!=0;
this->Modified();
}
{
if ( !this->Internal )
return;
-
+
bool newVal(gcgcp!=0);
- if(newVal!=this->Internal->GCGCP)
+ if(newVal!=this->GCGCP)
{
- this->Internal->GCGCP=newVal;
+ this->GCGCP=newVal;
this->Modified();
}
}
return;
try
{
- this->Internal->FileName=fname;
+ this->FileName=fname;
this->Modified();
}
catch(INTERP_KERNEL::Exception& e)
{
if (!this->Internal)
return 0;
- return const_cast<char *>(this->Internal->FileName.c_str());
+ return const_cast<char *>(this->FileName.c_str());
}
int vtkMEDReader::RequestInformation(vtkInformation *request, vtkInformationVector ** /*inputVector*/, vtkInformationVector *outputVector)
{
int iPart(-1),nbOfParts(-1);
#ifdef MEDREADER_USE_MPI
- vtkMultiProcessController *vmpc(vtkMultiProcessController::GetGlobalController());
- if(vmpc)
+ if (this->DistributeWithMPI)
+ {
+ vtkMultiProcessController *vmpc(vtkMultiProcessController::GetGlobalController());
+ if(vmpc)
{
iPart=vmpc->GetLocalProcessId();
nbOfParts=vmpc->GetNumberOfProcesses();
}
+ }
#endif
- this->Internal->Tree.loadMainStructureOfFile(this->Internal->FileName.c_str(),iPart,nbOfParts);
-
+ this->Internal->Tree.loadMainStructureOfFile(this->FileName.c_str(),iPart,nbOfParts);
+
// Leaves
this->Internal->Tree.activateTheFirst();//This line manually initialize the status of server (this) with the remote client.
for (int idLeaveArray = 0; idLeaveArray < this->Internal->Tree.getNumberOfLeavesArrays(); idLeaveArray++)
{
std::string name = this->Internal->Tree.getNameOf(idLeaveArray);
bool status = this->Internal->Tree.getStatusOf(idLeaveArray);
- this->Internal->FieldSelection->AddArray(name.c_str(), status);
+ this->FieldSelection->AddArray(name.c_str(), status);
}
}
{
std::string name = timeFlagsArray[idTimeFlag].second;
bool status = timeFlagsArray[idTimeFlag].first;
- this->Internal->TimeFlagSelection->AddArray(name.c_str(), status);
+ this->TimeFlagSelection->AddArray(name.c_str(), status);
}
// Make sure internal model are synchronized
/// So the SIL is up to date
- int nArrays = this->Internal->FieldSelection->GetNumberOfArrays();
+ int nArrays = this->FieldSelection->GetNumberOfArrays();
for(int i = nArrays - 1; i >= 0; i--)
{
try
{
this->Internal->Tree.changeStatusOfAndUpdateToHaveCoherentVTKDataSet(
- this->Internal->Tree.getIdHavingZeName(this->Internal->FieldSelection->GetArrayName(i)),
- this->Internal->FieldSelection->GetArraySetting(i));
+ this->Internal->Tree.getIdHavingZeName(this->FieldSelection->GetArrayName(i)),
+ this->FieldSelection->GetArraySetting(i));
}
catch(INTERP_KERNEL::Exception& e)
{
// Remove the incorrect array
- this->Internal->FieldSelection->RemoveArrayByIndex(i);
+ this->FieldSelection->RemoveArrayByIndex(i);
}
}
return 0;
try
{
- for(int i = 0; i < this->Internal->FieldSelection->GetNumberOfArrays(); i++)
+ for(int i = 0; i < this->FieldSelection->GetNumberOfArrays(); i++)
{
this->Internal->Tree.changeStatusOfAndUpdateToHaveCoherentVTKDataSet(
- this->Internal->Tree.getIdHavingZeName(this->Internal->FieldSelection->GetArrayName(i)),
- this->Internal->FieldSelection->GetArraySetting(i));
+ this->Internal->Tree.getIdHavingZeName(this->FieldSelection->GetArrayName(i)),
+ this->FieldSelection->GetArraySetting(i));
}
-
+
auto& timeFlagsArray = this->Internal->TK.getTimesFlagArray();
- if (timeFlagsArray.size() != this->Internal->TimeFlagSelection->GetNumberOfArrays())
+ if (timeFlagsArray.size() != this->TimeFlagSelection->GetNumberOfArrays())
{
throw INTERP_KERNEL::Exception("Unexpected size of TimeFlagSelection");
}
- for(int i = 0; i < this->Internal->TimeFlagSelection->GetNumberOfArrays(); i++)
+ for(int i = 0; i < this->TimeFlagSelection->GetNumberOfArrays(); i++)
{
- timeFlagsArray[i] = std::make_pair(this->Internal->TimeFlagSelection->GetArraySetting(i),
- this->Internal->TimeFlagSelection->GetArrayName(i));
+ timeFlagsArray[i] = std::make_pair(this->TimeFlagSelection->GetArraySetting(i),
+ this->TimeFlagSelection->GetArrayName(i));
}
// request->Print(cout);
#ifndef MEDREADER_USE_MPI
this->FillMultiBlockDataSetInstance(output,reqTS,&ti);
#else
- int nbParts(0);
- vtkMultiProcessController *vmpc(vtkMultiProcessController::GetGlobalController());
- if( vmpc )
- nbParts = vmpc->GetNumberOfProcesses();
- if(this->Internal->GCGCP && nbParts>1)
- {
- vtkSmartPointer<vtkGhostCellsGenerator> gcg(vtkSmartPointer<vtkGhostCellsGenerator>::New());
- {
- vtkDataSet *ret(RetrieveDataSetAtTime(reqTS,&ti));
- gcg->SetInputData(ret);
- ret->Delete();
- }
- // To be checked
- // gcg->SetUseGlobalPointIds(true);
- gcg->SetBuildIfRequired(false);
- gcg->Update();
- output->SetBlock(0,gcg->GetOutput());
- }
+ if (this->DistributeWithMPI && this->GCGCP)
+ {
+ vtkSmartPointer<vtkGhostCellsGenerator> gcg(vtkSmartPointer<vtkGhostCellsGenerator>::New());
+ {
+ vtkDataSet *ret(RetrieveDataSetAtTime(reqTS,&ti));
+ gcg->SetInputData(ret);
+ ret->Delete();
+ }
+ // To be checked
+ // gcg->SetUseGlobalPointIds(true);
+ gcg->SetBuildIfRequired(false);
+ gcg->Update();
+ output->SetBlock(0,gcg->GetOutput());
+ }
else
- this->FillMultiBlockDataSetInstance(output,reqTS,&ti);
+ this->FillMultiBlockDataSetInstance(output,reqTS,&ti);
#endif
if(!ti.empty())
{
//------------------------------------------------------------------------------
int vtkMEDReader::GetNumberOfFieldsTreeArrays()
{
- return this->Internal->FieldSelection->GetNumberOfArrays();
+ return this->FieldSelection->GetNumberOfArrays();
}
//------------------------------------------------------------------------------
const char* vtkMEDReader::GetFieldsTreeArrayName(int index)
{
- return this->Internal->FieldSelection->GetArrayName(index);
+ return this->FieldSelection->GetArrayName(index);
}
//------------------------------------------------------------------------------
int vtkMEDReader::GetFieldsTreeArrayStatus(const char* name)
{
- return this->Internal->FieldSelection->ArrayIsEnabled(name);
+ return this->FieldSelection->ArrayIsEnabled(name);
}
//------------------------------------------------------------------------------
{
if (status)
{
- this->Internal->FieldSelection->EnableArray(name);
+ this->FieldSelection->EnableArray(name);
}
else
{
- this->Internal->FieldSelection->DisableArray(name);
+ this->FieldSelection->DisableArray(name);
}
this->Modified();
}
//------------------------------------------------------------------------------
int vtkMEDReader::GetNumberOfTimesFlagsArrays()
{
- return this->Internal->TimeFlagSelection->GetNumberOfArrays();
+ return this->TimeFlagSelection->GetNumberOfArrays();
}
//------------------------------------------------------------------------------
const char* vtkMEDReader::GetTimesFlagsArrayName(int index)
{
- return this->Internal->TimeFlagSelection->GetArrayName(index);
+ return this->TimeFlagSelection->GetArrayName(index);
}
//------------------------------------------------------------------------------
int vtkMEDReader::GetTimesFlagsArrayStatus(const char* name)
{
- return this->Internal->TimeFlagSelection->ArrayIsEnabled(name);
+ return this->TimeFlagSelection->ArrayIsEnabled(name);
}
//------------------------------------------------------------------------------
{
if (status)
{
- this->Internal->TimeFlagSelection->EnableArray(name);
+ this->TimeFlagSelection->EnableArray(name);
}
else
{
- this->Internal->TimeFlagSelection->DisableArray(name);
+ this->TimeFlagSelection->DisableArray(name);
}
this->Modified();
}
int lev0(-1);
std::vector<double> tsteps;
- if(!this->Internal->IsStdOrMode)
+ if(!this->IsStdOrMode)
tsteps=this->Internal->Tree.getTimeSteps(lev0,this->Internal->TK);
else
{ tsteps.resize(1); tsteps[0]=0.; }
if( !this->Internal )
return 0;
std::string meshName;
- vtkDataSet *ret(this->Internal->Tree.buildVTKInstance(this->Internal->IsStdOrMode,reqTS,meshName,this->Internal->TK,internalInfo));
- if(this->Internal->GenerateVect)
+ vtkDataSet *ret(this->Internal->Tree.buildVTKInstance(this->IsStdOrMode,reqTS,meshName,this->Internal->TK,internalInfo));
+ if(this->GenerateVect)
{
vtkGenerateVectors::Operate(ret->GetPointData());
vtkGenerateVectors::Operate(ret->GetCellData());
#include "vtkMultiBlockDataSetAlgorithm.h"
#include "vtkInformationGaussDoubleVectorKey.h"
+#include "vtkNew.h"
+class vtkDataArraySelection;
class vtkDataSet;
class vtkMutableDirectedGraph;
class vtkInformationDataObjectMetaDataKey;
// 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();
+ // Description
+ // ReloadInternals will delete the internal reader and recreate it
+ virtual void ReloadInternals();
+
virtual void GenerateVectors(int);
virtual void ChangeMode(int);
virtual void GhostCellGeneratorCallForPara(int);
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.
+ vtkSetMacro(DistributeWithMPI, bool);
+ vtkGetMacro(DistributeWithMPI, 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_
<ServerManagerConfiguration>
- <ProxyGroup name="sources">
- <SourceProxy name="MEDReader" class="vtkMEDReader" label="MED Reader">
+ <ProxyGroup name="internal_sources">
+ <SourceProxy name="MEDReaderInternal" class="vtkMEDReader">
<Hints>
<ReaderFactory extensions="med rmed"
</SourceProxy>
</ProxyGroup>
+ <ProxyGroup name="sources">
+
+ <SourceProxy class="vtkFileSeriesGroupReader"
+ file_name_method="SetFileName"
+ label="MED Reader"
+ name="MEDReader"
+ si_class="vtkSIMetaReaderProxy">
+ <SubProxy>
+ <Proxy name="Reader"
+ proxygroup="internal_sources"
+ proxyname="MEDReaderInternal"></Proxy>
+ <ExposedProperties>
+ <Property name="Reload" />
+ <Property name="FieldsTreeInfo" />
+ <Property name="FieldsStatus" />
+ <Property name="VectorsProperty" />
+ <Property name="Separator" />
+ <Property name="TimeModeProperty" />
+ <Property name="TimesFlagsInfo" />
+ <Property name="TimesFlagsStatus" />
+ <Property name="GhostCellGeneratorCallForPara" />
+ </ExposedProperties>
+ </SubProxy>
+ <StringVectorProperty animateable="0"
+ clean_command="RemoveAllFileNames"
+ command="AddFileName"
+ name="FileNames"
+ number_of_elements="0"
+ panel_visibility="never"
+ repeat_command="1">
+ <FileListDomain name="files" />
+ <Documentation>The list of files to be read by the
+ reader.</Documentation>
+ </StringVectorProperty>
+ <DoubleVectorProperty
+ information_only="1"
+ name="TimestepValues"
+ repeatable="1">
+ <TimeStepsInformationHelper />
+ </DoubleVectorProperty>
+
+ <Hints>
+ <ReaderFactory extensions="med rmed"
+ file_description="MED Files">
+ </ReaderFactory>
+ </Hints>
+ </SourceProxy>
+ </ProxyGroup>
<ProxyGroup name="filters">
<SourceProxy name="ExtractGroup" class="vtkExtractGroup" label="Extract Group">
print ("**** Importing MED file")
-myResult0 = MEDReader(FileName=MEDFILE)
+myResult0 = MEDReader(FileNames=[MEDFILE])
if myResult0 is None : raise "Erreur de fichier MED"
# Imposition GenerateVectors à faire
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- myMedReader=MEDReader(FileName=fname)
+ myMedReader=MEDReader(FileNames=[fname])
- myMedReader.AllArrays = ['TS0/mesh/ComSup0/SolutionDEPL@@][@@P1', 'NotAValidName']
+ myMedReader.FieldsStatus = ['TS0/mesh/ComSup0/SolutionDEPL@@][@@P1', 'NotAValidName']
myMedReader.UpdatePipeline()
- myMedReader.AllArrays = ['TS0/mesh/ComSup0/SolutionDEPL@@][@@P1', 'TS0/mesh/ComSup0/SolutionSIEF_ELGA@@][@@GAUSS', 'TS0/mesh/ComSup0/SolutionSIEQ_ELNO@@][@@GSSNE', 'TS0/mesh/ComSup0/mesh@@][@@P0']
+ myMedReader.FieldsStatus = ['TS0/mesh/ComSup0/SolutionDEPL@@][@@P1', 'TS0/mesh/ComSup0/SolutionSIEF_ELGA@@][@@GAUSS', 'TS0/mesh/ComSup0/SolutionSIEQ_ELNO@@][@@GSSNE', 'TS0/mesh/ComSup0/mesh@@][@@P0']
myMedReader.UpdatePipeline()
- assert(myMedReader.CellData.GetNumberOfArrays()==4)
+ assert(myMedReader.CellData.GetNumberOfArrays()==5) # vtkGhostType
keys=myMedReader.GetProperty("FieldsTreeInfo")[::2]
# list all the names of arrays that can be seen (including their spatial discretization)
arr_name_with_dis=[elt.split("/")[-1] for elt in keys]
# list all the names of arrays (Equal to those in the MED File)
arr_name=[elt.split(myMedReader.GetProperty("Separator").GetData())[0] for elt in arr_name_with_dis]
- myMedReader.AllArrays=keys
+ myMedReader.FieldsStatus=keys
if '-D' not in sys.argv:
RenderView1 = GetRenderView()
def test(baseline_file):
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- myMedReader=MEDReader(FileName=fname)
+ myMedReader=MEDReader(FileNames=[fname])
keys=myMedReader.GetProperty("FieldsTreeInfo")[::2]
# list all the names of arrays that can be seen (including their spatial discretization)
arr_name_with_dis=[elt.split("/")[-1] for elt in keys]
# list all the names of arrays (Equal to those in the MED File)
arr_name=[elt.split(myMedReader.GetProperty("Separator").GetData())[0] for elt in arr_name_with_dis]
- myMedReader.AllArrays=keys
- myMedReader.GenerateVectors=1
+ myMedReader.FieldsStatus=keys
+ myMedReader.VectorsProperty=1
if '-D' not in sys.argv:
RenderView1=GetRenderView()
wbv=WarpByVector(Input=myMedReader)
wbv.ScaleFactor=0.1
wbv.Vectors=['POINTS','f3NbComp4_Vector']
- assert(list(wbv.PointData.keys())==['f0NbComp1','f1NbComp2','f1NbComp2_Vector','f2NbComp3','f3NbComp4','f3NbComp4_Vector'])
+ print( list(wbv.PointData.keys()) )
+ assert(list(wbv.PointData.keys())==['f0NbComp1','f1NbComp2','f1NbComp2_Vector','f2NbComp3','f3NbComp4','f3NbComp4_Vector','vtkGhostType'])
#
DataRepresentation2 = Show()
DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
def test(baseline_file):
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- testMEDReader13_med = MEDReader( FileName=fname )
+ testMEDReader13_med = MEDReader( FileNames=[fname] )
- testMEDReader13_med.GenerateVectors = 1
- testMEDReader13_med.AllArrays = ['TS0/mesh/ComSup0/fieldELNO@@][@@GSSNE']
+ testMEDReader13_med.VectorsProperty = 1
+ testMEDReader13_med.FieldsStatus = ['TS0/mesh/ComSup0/fieldELNO@@][@@GSSNE']
if '-D' not in sys.argv:
RenderView1 = GetRenderView()
@WriteInTmpDir
def test(baseline_file):
fname = GenerateCase()
- reader=MEDReader(FileName=fname)
+ reader=MEDReader(FileNames=[fname])
ExpectedEntries=['TS0/Mesh/ComSup0/zeField0_MM0@@][@@GAUSS', 'TS0/Mesh/ComSup1/zeField0_MM1@@][@@GAUSS', 'TS0/Mesh/ComSup2/zeField0_MM2@@][@@GAUSS', 'TS0/Mesh/ComSup2/zeField1_MM0@@][@@GAUSS', 'TS0/Mesh/ComSup3/zeField1_MM1@@][@@GAUSS', 'TS0/Mesh/ComSup4/zeField2@@][@@P1', 'TS1/Mesh/ComSup0/Mesh@@][@@P0']
assert(reader.GetProperty("FieldsTreeInfo")[::2]==ExpectedEntries)
if '-D' not in sys.argv:
renderView1=GetActiveViewOrCreate('RenderView')
for entry in [[ExpectedEntries[0]],[ExpectedEntries[1]],[ExpectedEntries[2],ExpectedEntries[3]],[ExpectedEntries[4]]]:
- reader=MEDReader(FileName=fname)
- reader.AllArrays=entry
+ reader=MEDReader(FileNames=[fname])
+ reader.FieldsStatus=entry
gaussPoints=ELGAfieldToPointGaussian(Input=reader)
gaussPoints.SelectSourceArray=['CELLS', 'ELGA@0']
Show(gaussPoints,renderView1)
#
- readerNodeField=MEDReader(FileName=fname)
- readerNodeField.AllArrays=[ExpectedEntries[5]]
+ readerNodeField=MEDReader(FileNames=[fname])
+ readerNodeField.FieldsStatus=[ExpectedEntries[5]]
nodeFieldDisplay=Show(readerNodeField,renderView1)
ColorBy(nodeFieldDisplay,('POINTS','zeField2'))
nodeFieldDisplay.RescaleTransferFunctionToDataRange(True)
@WriteInTmpDir
def test(baseline_file):
fname = GenerateCase()
- reader=MEDReader(FileName=fname)
+ reader=MEDReader(FileNames=[fname])
ExpectedEntries=['TS0/zeName/ComSup0/zeName@@][@@P1','TS0/zeName/ComSup0/MESH@zeName@@][@@P1']
assert(reader.GetProperty("FieldsTreeInfo")[::2]==ExpectedEntries)
def test():
fname,arr2 = GenerateCase()
#
- reader=MEDReader(FileName=fname)
+ reader=MEDReader(FileNames=[fname])
ExpectedEntries=['TS0/Mesh/ComSup0/MyField@@][@@GSSNE','TS1/Mesh/ComSup0/Mesh@@][@@P0']
assert(reader.GetProperty("FieldsTreeInfo")[::2]==ExpectedEntries)
- reader.AllArrays=['TS0/Mesh/ComSup0/MyField@@][@@GSSNE']
+ reader.FieldsStatus=['TS0/Mesh/ComSup0/MyField@@][@@GSSNE']
ExtractGroup1 = ExtractGroup(Input=reader)
#ExtractGroup1.UpdatePipelineInformation()
ExtractGroup1.AllGroups=["GRP_grp1"]
def test():
fname = GenerateCase()
#
- reader=MEDReader(FileName=fname)
+ reader=MEDReader(FileNames=[fname])
ExpectedEntries=['TS0/Mesh/ComSup0/MyField@@][@@GSSNE','TS1/Mesh/ComSup0/Mesh@@][@@P0']
assert(reader.GetProperty("FieldsTreeInfo")[::2]==ExpectedEntries)
- reader.AllArrays=['TS0/Mesh/ComSup0/MyField@@][@@GSSNE']
+ reader.FieldsStatus=['TS0/Mesh/ComSup0/MyField@@][@@GSSNE']
ExtractGroup1 = ExtractGroup(Input=reader)
#ExtractGroup1.UpdatePipelineInformation()
ExtractGroup1.AllGroups=["GRP_grp1"]
@WriteInTmpDir
def test():
fname = GenerateCase()
- reader=MEDReader(FileName=fname)
- reader.AllArrays=['TS0/mesh/ComSup0/mesh@@][@@P0']
+ reader=MEDReader(FileNames=[fname])
+ reader.FieldsStatus=['TS0/mesh/ComSup0/mesh@@][@@P0']
ExtractGroup1 = ExtractGroup(Input=reader)
ExtractGroup1.AllGroups=["GRP_grp0","GRP_grp1"]
#ExtractGroup1.UpdatePipelineInformation()
def test(baseline_file):
fname = GenerateCase()
# create a new 'MED Reader'
- testMEDReader19med = MEDReader(FileName=fname)
- testMEDReader19med.AllArrays = ['TS0/mesh/ComSup0/mesh@@][@@P0']
- testMEDReader19med.AllTimeSteps = ['0000']
+ testMEDReader19med = MEDReader(FileNames=[fname])
+ testMEDReader19med.FieldsStatus = ['TS0/mesh/ComSup0/mesh@@][@@P0']
+ testMEDReader19med.TimesFlagsStatus = ['0000']
# Properties modified on testMEDReader19med
- testMEDReader19med.AllArrays = ['TS0/mesh/ComSup0/mesh@@][@@P0']
+ testMEDReader19med.FieldsStatus = ['TS0/mesh/ComSup0/mesh@@][@@P0']
if '-D' not in sys.argv:
# get active view
def test(baseline_file):
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- testMEDReader1=MEDReader(FileName=fname,registrationName='testMEDReader2.med')
- testMEDReader1.AllArrays=['TS0/mesh/ComSup0/ACellField@@][@@P0']
- testMEDReader2=MEDReader(FileName=fname,registrationName='testMEDReader2_bis.med')
- testMEDReader2.AllArrays=['TS0/mesh/ComSup1/mesh@@][@@P0']
+ testMEDReader1=MEDReader(FileNames=[fname],registrationName='testMEDReader2.med')
+ testMEDReader1.FieldsStatus=['TS0/mesh/ComSup0/ACellField@@][@@P0']
+ testMEDReader2=MEDReader(FileNames=[fname],registrationName='testMEDReader2_bis.med')
+ testMEDReader2.FieldsStatus=['TS0/mesh/ComSup1/mesh@@][@@P0']
GroupDatasets1=GroupDatasets(Input=[testMEDReader1,testMEDReader2])
#GroupDatasets1.BlockNames = ['testMEDReader2.med', 'testMEDReader2_bis.med']
fname = GenerateCase()
#####################
# create a new 'MED Reader'
- testMEDReader20med = MEDReader(FileName=fname)
- testMEDReader20med.AllArrays = ['TS0/mesh/ComSup0/Field@@][@@P0']
- testMEDReader20med.AllTimeSteps = ['0000', '0001', '0002', '0003', '0004']
+ testMEDReader20med = MEDReader(FileNames=[fname])
+ testMEDReader20med.FieldsStatus = ['TS0/mesh/ComSup0/Field@@][@@P0']
+ testMEDReader20med.TimesFlagsStatus = ['0000', '0001', '0002', '0003', '0004']
# get animation scene
animationScene1 = GetAnimationScene()
def test(baseline_file):
fname, meshName, fieldName = GenerateCase()
########
- testTotomed = MEDReader(FileName=fname)
- testTotomed.AllArrays = ['TS0/%s/ComSup0/%s@@][@@GSSNE'%(meshName,fieldName)]
- testTotomed.AllTimeSteps = ['0000']
+ testTotomed = MEDReader(FileNames=[fname])
+ testTotomed.FieldsStatus = ['TS0/%s/ComSup0/%s@@][@@GSSNE'%(meshName,fieldName)]
+ testTotomed.TimesFlagsStatus = ['0000']
if '-D' not in sys.argv:
# get active view
def test():
fname = "testMEDReader22.med"
f,f2,grp_BottomLeft,grp_BottomRight,grp_TopLeft,grp_TopRight = generateCase(fname)
- reader = MEDReader(FileName=fname)
- reader.AllArrays = ['TS0/mesh/ComSup0/field@@][@@P0','TS0/mesh/ComSup0/field2@@][@@P1','TS0/mesh/ComSup0/mesh@@][@@P0']
- reader.AllTimeSteps = ['0000']
+ reader = MEDReader(FileNames=[fname])
+ reader.FieldsStatus = ['TS0/mesh/ComSup0/field@@][@@P0','TS0/mesh/ComSup0/field2@@][@@P1','TS0/mesh/ComSup0/mesh@@][@@P0']
+ reader.TimesFlagsStatus = ['0000']
groupsNames = GroupsNames(Input=reader)
groupsNames.UpdatePipeline()
ds_bl = blocks.GetBlock(0)
MyAssert(ds_bl.GetNumberOfCells()==4)
bl_ref_conn = np.array([ 1, 0, 6, 7, 2, 1, 7, 8, 7, 6, 12, 13, 8, 7, 13, 14],dtype=np.int32)
- MyAssert(ds_bl.GetCellData().GetNumberOfArrays() == 3 )# 3 for field, mesh and FamilyIdCell
+ MyAssert(ds_bl.GetCellData().GetNumberOfArrays() == 4 )# 3 for field, mesh and FamilyIdCell +1 for vtkGhostType
MyAssert(np.all( bl_ref_conn == numpy_support.vtk_to_numpy( ds_bl.GetCells().GetConnectivityArray() )) )
MyAssert( mc.DataArrayDouble(numpy_support.vtk_to_numpy( ds_bl.GetCellData().GetArray("field") )).isEqual(f.getArray()[grp_BottomLeft],1e-12) )
# test of bottom right
MyAssert( mc.DataArrayDouble(numpy_support.vtk_to_numpy( ds_tr.GetCellData().GetArray("field") )).isEqual(f.getArray()[grp_TopRight],1e-12) )
#
for ds in [ds_bl,ds_br,ds_tl,ds_tr]:
- MyAssert(ds.GetPointData().GetNumberOfArrays() == 1 )# 1 for field2
+ MyAssert(ds.GetPointData().GetNumberOfArrays() == 2 )# 1 for field2 + vtkGhostType
MyAssert(ds.GetNumberOfPoints()==36) # for performance reasons all blocks share the same input coordinates
MyAssert(mc.DataArrayDouble( numpy_support.vtk_to_numpy( ds.GetPointData().GetArray("field2") ) ).isEqual(f2.getArray(),1e-12) )
mm.write(fname,2)
generateCase(fname,ids,coo)
-myMedReader = MEDReader(registrationName = fname, FileName = fname)
-myMedReader.AllArrays = ['TS0/mesh/ComSup0/mesh@@][@@P0']
+myMedReader = MEDReader(registrationName = fname, FileNames = [fname])
+myMedReader.FieldsStatus = ['TS0/mesh/ComSup0/mesh@@][@@P0']
myMedReader.UpdatePipeline()
# first important testing here
-MyAssert( [myMedReader.PointData.GetArray(i).GetName() for i in range(myMedReader.PointData.GetNumberOfArrays())] == ['GlobalNodeIds'] )
+MyAssert( [myMedReader.PointData.GetArray(i).GetName() for i in range(myMedReader.PointData.GetNumberOfArrays())] == ['GlobalNodeIds','vtkGhostType'] )
ReadUnstructuredGrid = servermanager.Fetch(myMedReader).GetBlock(0)
numpy_support.vtk_to_numpy( ReadUnstructuredGrid.GetPointData().GetArray('GlobalNodeIds') )
# check match of coordinates written in testMEDReader23.med file and its representation
from paraview.simple import *
-testMEDReader24_med = MEDReader( FileName=fname )
-testMEDReader24_med.AllArrays = ['TS0/Maillage_THYC/ComSup0/ENERGIE RECUE@@][@@P0', 'TS0/Maillage_THYC/ComSup0/ENTHALPIE@@][@@P0', 'TS0/Maillage_THYC/ComSup0/PRESSION@@][@@P0', 'TS0/Maillage_THYC/ComSup0/TEMPERATURE@@][@@P0']
+testMEDReader24_med = MEDReader( FileNames=[fname] )
+testMEDReader24_med.FieldsStatus = ['TS0/Maillage_THYC/ComSup0/ENERGIE RECUE@@][@@P0', 'TS0/Maillage_THYC/ComSup0/ENTHALPIE@@][@@P0', 'TS0/Maillage_THYC/ComSup0/PRESSION@@][@@P0', 'TS0/Maillage_THYC/ComSup0/TEMPERATURE@@][@@P0']
testMEDReader24_med.UpdatePipeline()
ds0 = servermanager.Fetch(testMEDReader24_med).GetBlock(0)
assert( ds0.GetNumberOfCells() == 224 )
-testMEDReader24_med.AllArrays = ['TS2/Maillage_THYC/ComSup0/Maillage_THYC@@][@@P0'] # test is here. A rectilinear dataset is expected here
+testMEDReader24_med.FieldsStatus = ['TS2/Maillage_THYC/ComSup0/Maillage_THYC@@][@@P0'] # test is here. A rectilinear dataset is expected here
testMEDReader24_med.UpdatePipeline()
ds0 = servermanager.Fetch(testMEDReader24_med).GetBlock(0)
assert( ds0.GetNumberOfCells() == 256 ) # test is here 0 means problem in the management of rectilineargrid into MEDReader
AnimationScene1.AnimationTime = 1.0
AnimationScene1.StartTime = 1.0
- testMEDReader3=MEDReader(FileName=fname)
- testMEDReader3.AllArrays=['TS0/mesh/ComSup0/ANodeField@@][@@P1']
+ testMEDReader3=MEDReader(FileNames=[fname])
+ testMEDReader3.FieldsStatus=['TS0/mesh/ComSup0/ANodeField@@][@@P1']
assert(list(testMEDReader3.TimestepValues)==[1.,2.,3.,4.,5.]) ## <- the test is here - double time steps are too big use dt.
################### MED write is done -> Go to MEDReader
fname = GenerateCase()
- testMEDReader4_med=MEDReader(FileName=fname)
+ testMEDReader4_med=MEDReader(FileNames=[fname])
- testMEDReader4_med.AllArrays=['TS0/mesh/ComSup0/f0NoPfl@@][@@P1','TS0/mesh/ComSup0/mesh@@][@@P1']
+ testMEDReader4_med.FieldsStatus=['TS0/mesh/ComSup0/f0NoPfl@@][@@P1','TS0/mesh/ComSup0/mesh@@][@@P1']
#testMEDReader4_med.AllTimeSteps=['0000']
Glyph1=Glyph(Input=testMEDReader4_med,GlyphType='Sphere')
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- myMedReader=MEDReader(FileName=fname)
- myMedReader.AllArrays = ['TS0/mesh/ComSup0/fGauss@@][@@GAUSS']
- myMedReader.AllTimeSteps = ['0000']
+ myMedReader=MEDReader(FileNames=[fname])
+ myMedReader.FieldsStatus = ['TS0/mesh/ComSup0/fGauss@@][@@GAUSS']
+ myMedReader.TimesFlagsStatus = ['0000']
ExtractGroup1 = ExtractGroup(Input=myMedReader)
ExtractGroup1.UpdatePipelineInformation()
def test(baseline_file):
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- myMedReader=MEDReader(FileName=fname)
- myMedReader.AllArrays = ['TS0/mesh/ComSup0/fNode@@][@@P1']
+ myMedReader=MEDReader(FileNames=[fname])
+ myMedReader.FieldsStatus = ['TS0/mesh/ComSup0/fNode@@][@@P1']
assert(list(myMedReader.TimestepValues)==[0.,1.,2.,3.])
if '-D' not in sys.argv:
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- myMedReader=MEDReader(FileName=fname)
- myMedReader.AllArrays = ['TS0/mesh/ComSup0/fNode@@][@@P1']
+ myMedReader=MEDReader(FileNames=[fname])
+ myMedReader.FieldsStatus = ['TS0/mesh/ComSup0/fNode@@][@@P1']
assert(list(myMedReader.TimestepValues)==[0.,1.,2.,3.])
myMedReader.UpdatePipeline()
def test():
fname = GenerateCase()
################### MED write is done -> Go to MEDReader
- myMedReader=MEDReader(FileName=fname)
- myMedReader.AllArrays=['TS0/m1/ComSup0/f1@@][@@P0']
+ myMedReader=MEDReader(FileNames=[fname])
+ myMedReader.FieldsStatus=['TS0/m1/ComSup0/f1@@][@@P0']
ExtractGroup1=ExtractGroup(Input=myMedReader)
ExtractGroup1.UpdatePipeline()
assert(ExtractGroup1.GetProperty("MeshName")[0]=="m1")
- myMedReader.AllArrays=['TS0/m2/ComSup0/f2@@][@@P0']
+ myMedReader.FieldsStatus=['TS0/m2/ComSup0/f2@@][@@P0']
ExtractGroup2=ExtractGroup(Input=myMedReader)
ExtractGroup2.UpdatePipeline()
assert(ExtractGroup2.GetProperty("MeshName")[0]=="m2")