TimeKeeper TK(0);
int tmp1,tmp2;
double tmp3(f->getTime(tmp1,tmp2));
- vtkDataSet *ret(Tree.buildVTKInstance(false,tmp3,meshName,TK));
+ vtkDataSet *ret(Tree.buildVTKInstance(false,tmp3,meshName,true,TK));
VTKGrid = ret;
}
da->Delete();
return ret;
}
-
-vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes, ExportedTinyInfo *internalInfo) const
+
+vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes, bool debugArrays, ExportedTinyInfo *internalInfo) const
{
vtkDataSet *ret(0);
//_fsp->isDataSetSupportEqualToThePreviousOne(i,globs);
famCells->decrRef();
}
ptMML2->retrieveNumberIdsOnCells(numCells,noCpyNumCells);
- if(numCells)
+ if(numCells && debugArrays)
{
vtkMCIdTypeArray *vtkTab(vtkMCIdTypeArray::New());
vtkTab->SetNumberOfComponents(1);
famNodes->decrRef();
}
ptMML2->retrieveNumberIdsOnNodes(numNodes,noCpyNumNodes);
- if(numNodes)
+ if(numNodes && debugArrays)
{
vtkMCIdTypeArray *vtkTab(vtkMCIdTypeArray::New());
vtkTab->SetNumberOfComponents(1);
return leaf.getTimeSteps(tk);
}
-vtkDataSet *MEDFileFieldRepresentationTree::buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk, ExportedTinyInfo *internalInfo) const
+vtkDataSet *MEDFileFieldRepresentationTree::buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk, bool debugArrays, ExportedTinyInfo *internalInfo) const
{
int lev0,lev1,lev2;
const MEDFileFieldRepresentationLeaves& leaf(getTheSingleActivated(lev0,lev1,lev2));
tr=new MEDStdTimeReq((int)zeTimeId);
else
tr=new MEDModeTimeReq(tk.getTheVectOfBool(),tk.getPostProcessedTime());
- vtkDataSet *ret(leaf.buildVTKInstanceNoTimeInterpolation(tr,_fields,_ms,internalInfo));
+ vtkDataSet *ret(leaf.buildVTKInstanceNoTimeInterpolation(tr,_fields,_ms,debugArrays,internalInfo));
delete tr;
return ret;
}
std::vector<double> getTimeSteps(const TimeKeeper& tk) const;
std::vector< std::pair<int,int> > getTimeStepsInCoarseMEDFileFormat(std::vector<double>& ts) const;
std::string getHumanReadableOverviewOfTS() const;
- vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes, ExportedTinyInfo *internalInfo=0) const;
+ vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes, bool debugArrays, ExportedTinyInfo *internalInfo=0) const;
private:
vtkUnstructuredGrid *buildVTKInstanceNoTimeInterpolationUnstructured(MEDCoupling::MEDUMeshMultiLev *mm) const;
vtkRectilinearGrid *buildVTKInstanceNoTimeInterpolationCartesian(MEDCoupling::MEDCMeshMultiLev *mm) const;
//
std::string getDftMeshName() const;
std::vector<double> getTimeSteps(int& lev0, const TimeKeeper& tk) const;
- vtkDataSet *buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk, ExportedTinyInfo *internalInfo=0) const;
+ vtkDataSet *buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk, bool debugArrays, ExportedTinyInfo *internalInfo=0) const;
void printMySelf(std::ostream& os) const;
std::map<std::string,bool> dumpState() const;
//non const methods
localReader->GenerateVectors(exposedReader->GetGenerateVect());
localReader->ChangeMode(exposedReader->GetIsStdOrMode());
localReader->GhostCellGeneratorCallForPara(exposedReader->GetGCGCP());
+ localReader->GetRidOffDebugArrays(exposedReader->GetRemoveDebugArrays());
// Configure the localReader for usage with the files
localReader->SetFileName(this->GetFileName(i + offFile));
this->IsStdOrMode = false;
this->GenerateVect = false;
this->GCGCP = true;
+ this->RemoveDebugArrays = false;
this->FieldSelection->RemoveAllArrays();
this->TimeFlagSelection->RemoveAllArrays();
this->Modified();
}
}
+void vtkMEDReader::GetRidOffDebugArrays(int rmda)
+{
+ if ( !this->Internal )
+ return;
+
+ bool newVal(rmda!=0);
+ if(newVal!=this->RemoveDebugArrays)
+ {
+ this->RemoveDebugArrays=newVal;
+ this->Modified();
+ }
+}
+
const char *vtkMEDReader::GetSeparator()
{
return MEDFileFieldRepresentationLeavesArrays::ZE_SEP;
this->FillMultiBlockDataSetInstance(output,reqTS,&ti);
#else
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());
- }
+ {
+ 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())
{
if( !this->Internal )
return 0;
std::string meshName;
- vtkDataSet *ret(this->Internal->Tree.buildVTKInstance(this->IsStdOrMode,reqTS,meshName,this->Internal->TK,internalInfo));
+ vtkDataSet *ret(this->Internal->Tree.buildVTKInstance(this->IsStdOrMode,reqTS,meshName,this->Internal->TK,!this->RemoveDebugArrays,internalInfo));
if(this->GenerateVect)
{
vtkGenerateVectors::Operate(ret->GetPointData());
// Default is true
void GhostCellGeneratorCallForPara(int);
vtkGetMacro(GCGCP, bool);
+
+ // Description
+ // Control if mesh debug arrays should be removed or not
+ // Default is true
+ void GetRidOffDebugArrays(int);
+ vtkGetMacro(RemoveDebugArrays, bool);
protected:
bool GenerateVect = false;
bool GCGCP = true;
bool DistributeWithMPI = true;
+ bool RemoveDebugArrays = false;
};
#endif //__vtkMEDReader_h_
<BooleanDomain name="bool"/>
</IntVectorProperty>
+ <IntVectorProperty name="GetRidOffDebugArrays"
+ label="Get Rid Off Debug Arrays"
+ command="GetRidOffDebugArrays"
+ number_of_elements="1"
+ default_values="0"
+ panel_visibility="advanced">
+ <Documentation>
+ This property tells if arrays of mesh ids and number ids should be removed or not from output dataset. By default these arrays are present.
+ </Documentation>
+ <BooleanDomain name="bool"/>
+ </IntVectorProperty>
+
</SourceProxy>
</ProxyGroup>
<ProxyGroup name="sources">
<Property name="TimesFlagsInfo" />
<Property name="TimesFlagsStatus" />
<Property name="GhostCellGeneratorCallForPara" />
+ <Property name="GetRidOffDebugArrays" />
</ExposedProperties>
</SubProxy>
<StringVectorProperty animateable="0"