MantisBT - ParaView
View Issue Details
0013473ParaView(No Category)public2012-09-25 16:502015-01-11 08:29
Alan Scott 
Utkarsh Ayachit 
urgentminorhave not tried
closedfixed 
git-master 
3.98.1 
Sandia
13473_fix_cth_variable_names
incorrect functionality
0013473: Variable name change to Material volume fraction in CTH
There has been a code change to Material volume fraction in CTH. It is now called Volume Fraction.

The following git diff shows the changes to the code that I made:

[wascott@S919535 ...ParaViewCore/VTKExtensions]$ git diff vtkSpyPlotUniReader.cxx
diff --git a/ParaViewCore/VTKExtensions/vtkSpyPlotUniReader.cxx b/ParaViewCore/V
index 0439800..74377a3 100644
--- a/ParaViewCore/VTKExtensions/vtkSpyPlotUniReader.cxx
+++ b/ParaViewCore/VTKExtensions/vtkSpyPlotUniReader.cxx
@@ -130,12 +130,15 @@ vtkSpyPlotUniReader::~vtkSpyPlotUniReader()
   this->SetCellArraySelection(0);
 }
 
-#define READ_SPCTH_VOLUME_FRACTION "Material volume fraction"
+#define READ_SPCTH_VOLUME_FRACTION_OLD "Material volume fraction"
+#define READ_SPCTH_VOLUME_FRACTION_NEW "Volume Fraction"
 //-----------------------------------------------------------------------------
 int vtkSpyPlotUniReader::IsVolumeFraction(Variable* var)
 {
- return strncmp(var->Name, READ_SPCTH_VOLUME_FRACTION,
- strlen(READ_SPCTH_VOLUME_FRACTION)) == 0;
+ return ( (strncmp(var->Name, READ_SPCTH_VOLUME_FRACTION_OLD,
+ strlen(READ_SPCTH_VOLUME_FRACTION_OLD)) == 0) ||
+ (strncmp(var->Name, READ_SPCTH_VOLUME_FRACTION_NEW,
+ strlen(READ_SPCTH_VOLUME_FRACTION_NEW)) == 0) );
 }
 
 //-----------------------------------------------------------------------------

No tags attached.
related to 0013492closed Utkarsh Ayachit Remove Material Volume Fraction code for CTH 
Issue History
2012-09-25 16:50Alan ScottNew Issue
2012-09-25 16:52Alan ScottNote Added: 0029284
2012-09-25 16:52Alan ScottAssigned To => Alan Scott
2012-09-25 16:52Alan ScottStatusbacklog => todo
2012-09-25 17:06Utkarsh AyachitAssigned ToAlan Scott => Utkarsh Ayachit
2012-10-04 16:06Alan ScottRelationship addedrelated to 0013492
2012-10-04 16:08Alan ScottNote Added: 0029323
2012-10-04 16:08Alan ScottStatustodo => closed
2012-10-04 16:08Alan ScottResolutionopen => won't fix
2012-12-19 13:57Utkarsh AyachitStatusclosed => backlog
2012-12-19 13:57Utkarsh AyachitResolutionwon't fix => reopened
2012-12-19 13:57Utkarsh AyachitTopic Name => 13473_fix_cth_variable_names
2012-12-19 13:57Utkarsh AyachitNote Added: 0029913
2012-12-19 13:57Utkarsh AyachitStatusbacklog => gatekeeper review
2012-12-19 13:57Utkarsh AyachitFixed in Version => git-next
2012-12-19 13:57Utkarsh AyachitResolutionreopened => fixed
2012-12-19 14:00Utkarsh AyachitNote Added: 0029914
2012-12-21 11:20Utkarsh AyachitFixed in Versiongit-next => git-master
2012-12-21 11:21Utkarsh AyachitStatusgatekeeper review => customer review
2012-12-21 11:21Utkarsh AyachitNote Added: 0029928
2013-01-08 19:07Alan ScottNote Added: 0030022
2013-01-08 19:07Alan ScottStatuscustomer review => closed
2013-01-30 10:41Utkarsh AyachitFixed in Versiongit-master => 3.98.1
2015-01-11 08:29Utkarsh AyachitSource_changeset_attached => ParaView master 982e5259
2015-01-11 08:29Utkarsh AyachitSource_changeset_attached => ParaView master 601a8ced

Notes
(0029284)
Alan Scott   
2012-09-25 16:52   
This must be fixed for the 4.0 release.
(0029323)
Alan Scott   
2012-10-04 16:08   
Replaced by 13492. Instead of adding a new variable name as listed, we are going to remove the need to figure out if variables are material volume fraction.
(0029913)
Utkarsh Ayachit   
2012-12-19 13:57   
commit 601a8ced2a8361c6edfa71744c636ec8485991ed
Author: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Date: Wed Dec 19 13:55:33 2012 -0500

    BUG 0013473. Update code to detect volume fraction variables.
    
    There has been a code change to Material volume fraction in CTH. It is now
    called "Volume Fraction". This commmit updates the vtkSpyPlotUniReader to detect
    both new and old names for the variables and treat them as volume fraction
    variables.
    
    Change-Id: Ie23ed055cc60dc8cb040a25590a958bddcde6df9
(0029914)
Utkarsh Ayachit   
2012-12-19 14:00   
The CTH filters treat any Unsigned-Char cell array as volume fraction array and work on them. The reader's role is to detect the appropriate array as volume fraction array and down-convert those to unsigned char. Hence we indeed need the reader to detect these arrays correctly. The commit uses a regular expression to detect both variables name styles (old and new).
(0029928)
Utkarsh Ayachit   
2012-12-21 11:21   
merged into master, if applicable.
(0030022)
Alan Scott   
2013-01-08 19:07   
Looks good.

Tested remote server, Linux, master.