Commit d33c0959 authored by bonnell's avatar bonnell

Update CracksClipper operator to support double-precision.

Modified vtkCracksClipper to inherit from vtkVisItClipper. (resolves #1006)


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@19000 18c085ea-50e0-402c-830e-de6fd14e8384
parent d15bb0de
......@@ -539,7 +539,7 @@ VisItLauncherMain(int argc, char *argv[])
//
// Migrate config files
//
if (component == "gui" || component == "cli")
if (!usingDev && (component == "gui" || component == "cli"))
{
TestForConfigFiles(component);
}
......
......@@ -41,21 +41,7 @@
// ************************************************************************* //
#include <avtCracksClipperFilter.h>
#include <vtkCell.h>
#include <vtkCellData.h>
#include <vtkCracksClipper.h>
#include <vtkCrackWidthFilter.h>
#include <vtkExtractCells.h>
#include <vtkFloatArray.h>
#include <vtkIdList.h>
#include <vtkIntArray.h>
#include <vtkPointData.h>
#include <vtkPoints.h>
#include <vtkUnstructuredGrid.h>
#include <vtkAppendFilter.h>
#include <vtkVisItUtility.h>
#include <avtCallback.h>
#include <avtCracksDensityFilter.h>
#include <avtRemoveCracksFilter.h>
#include <avtDataObject.h>
......@@ -185,6 +171,9 @@ avtCracksClipperFilter::Equivalent(const AttributeGroup *a)
// density is calculated is now based on if this operator was instantiated
// via it's created variable, or not.
//
// Kathleen Biagas, Tue Aug 14 14:56:21 MST 2012
// Set var name for the density filter.
//
// ****************************************************************************
void
......@@ -222,6 +211,7 @@ avtCracksClipperFilter::Execute(void)
//
avtCracksDensityFilter density;
density.SetInput(volume.GetOutput());
density.SetVarName(varname);
//
// Force the network to execute
......@@ -279,108 +269,88 @@ avtCracksClipperFilter::Execute(void)
// Added logic to determine if this operator was instantiated via it's
// 'created' density var.
//
// Kathleen Biagas, Tue Aug 14 14:56:21 MST 2012
// Changed logic for cleaner code, and to ensure the proper variable name
// is used when calculating density.
//
// ****************************************************************************
avtContract_p
avtCracksClipperFilter::ModifyContract(avtContract_p contract)
avtCracksClipperFilter::ModifyContract(avtContract_p inContract)
{
avtDataRequest_p ds = contract->GetDataRequest();
calculateDensity = false;
if (strncmp(ds->GetVariable(), "operators/CracksClipper",
if (strncmp(pipelineVariable, "operators/CracksClipper",
strlen("operators/CracksClipper")) == 0)
{
calculateDensity = true;
varname = pipelineVariable;
}
// Retrieve secondary variables, if any, to pass along to the
// newly created DataSpec
std::vector<CharStrRef> csv = ds->GetSecondaryVariablesWithoutDuplicates();
std::vector<std::string> removeMe;
if (!calculateDensity)
{
for (int i = 0; i < csv.size(); i++)
{
if (strncmp(*(csv[i]), "operators/CracksClipper",
strlen("operators/CracksClipper")) == 0)
{
calculateDensity = true;
removeMe.push_back(*(csv[i]));
}
}
}
// Create a new dataRequest so that we can add secondary vars
avtDataRequest_p nds;
avtDataRequest_p inDR = inContract->GetDataRequest();
avtDataRequest_p outDR;
avtDataAttributes &inAtts = GetInput()->GetInfo().GetAttributes();
if (calculateDensity)
{
nds = new avtDataRequest(atts.GetInMassVar().c_str(),
ds->GetTimestep(), ds->GetRestriction());
outDR = new avtDataRequest(inDR, inAtts.GetMeshname().c_str());
}
else
{
nds = new avtDataRequest(ds->GetVariable(),
ds->GetTimestep(), ds->GetRestriction());
outDR = new avtDataRequest(inDR);
}
// Add any previously existing SecondaryVariables.
for (size_t i = 0; i < csv.size(); i++)
{
nds->AddSecondaryVariable(*(csv[i]));
if (strncmp(*(csv[i]), "operators/CracksClipper",
strlen("operators/CracksClipper")) == 0)
{
calculateDensity = true;
}
}
// remove the special variable for this operator
for (size_t i = 0; i < removeMe.size(); ++i)
std::vector<CharStrRef> vars2 = inDR->GetSecondaryVariablesWithoutDuplicates();
// Add any previously existing SecondaryVariables.
for (size_t i = 0; i < vars2.size(); i++)
{
nds->RemoveSecondaryVariable(removeMe[i].c_str());
outDR->AddSecondaryVariable(*(vars2[i]));
}
// Add secondary variables necessary for CracksClipper
nds->AddSecondaryVariable(atts.GetCrack1Var().c_str());
nds->AddSecondaryVariable(atts.GetCrack2Var().c_str());
nds->AddSecondaryVariable(atts.GetCrack3Var().c_str());
outDR->AddSecondaryVariable(atts.GetCrack1Var().c_str());
outDR->AddSecondaryVariable(atts.GetCrack2Var().c_str());
outDR->AddSecondaryVariable(atts.GetCrack3Var().c_str());
outDR->AddSecondaryVariable(atts.GetStrainVar().c_str());
if (calculateDensity)
{
nds->AddSecondaryVariable(atts.GetInMassVar().c_str());
outDR->AddSecondaryVariable(atts.GetInMassVar().c_str());
}
avtDataAttributes &data = GetInput()->GetInfo().GetAttributes();
ExpressionList *elist = ParsingExprList::Instance()->GetList();
Expression *e = new Expression();
std::string edef = std::string("volume2(<") + data.GetMeshname() + std::string(">)");
std::string edef = std::string("volume2(<") + inAtts.GetMeshname() +
std::string(">)");
e->SetName("cracks_vol");
e->SetDefinition(edef.c_str());
e->SetType(Expression::ScalarMeshVar);
elist->AddExpressions(*e);
delete e;
nds->AddSecondaryVariable("cracks_vol");
outDR->AddSecondaryVariable("cracks_vol");
nds->AddSecondaryVariable(atts.GetStrainVar().c_str());
avtContract_p rv = new avtContract(contract, nds);
avtContract_p rv = new avtContract(inContract, outDR);
//
// Since this filter 'clips' the dataset, the zone and possibly
// node numbers will be invalid, request them when needed.
//
if (contract->GetDataRequest()->MayRequireZones() ||
contract->GetDataRequest()->MayRequireNodes())
if (inContract->GetDataRequest()->MayRequireZones() ||
inContract->GetDataRequest()->MayRequireNodes())
{
if (data.ValidActiveVariable())
if (inAtts.ValidActiveVariable())
{
if (data.GetCentering() == AVT_NODECENT)
if (inAtts.GetCentering() == AVT_NODECENT)
{
rv->GetDataRequest()->TurnNodeNumbersOn();
}
else if (data.GetCentering() == AVT_ZONECENT)
else if (inAtts.GetCentering() == AVT_ZONECENT)
{
rv->GetDataRequest()->TurnZoneNumbersOn();
}
......@@ -437,6 +407,10 @@ avtCracksClipperFilter::UpdateDataObjectInfo()
// Kathleen Bonnell, Wed Sep 29 08:55:31 PDT 2010
// Re-add the density variable to the pipeline if needed.
//
// Kathleen Biagas, Tue Aug 14 15:00:03 MST 2012
// Move code that re-adds density variable to the pipeline to
// avtCracksDensityFilter, so the data range can be properly set.
//
// ****************************************************************************
void
......@@ -449,17 +423,6 @@ avtCracksClipperFilter::PostExecute()
outAtts.RemoveVariable(atts.GetCrack2Var().c_str());
outAtts.RemoveVariable(atts.GetCrack3Var().c_str());
outAtts.RemoveVariable(atts.GetStrainVar().c_str());
if (calculateDensity)
{
outAtts.RemoveVariable(atts.GetInMassVar().c_str());
outAtts.AddVariable("operators/CracksClipper/den");
outAtts.SetActiveVariable("operators/CracksClipper/den");
outAtts.SetVariableDimension(1);
outAtts.SetVariableType(AVT_SCALAR_VAR);
outAtts.SetCentering(AVT_ZONECENT);
}
}
......
......@@ -73,6 +73,9 @@ class vtkDataSet;
// Kathleen Bonnell, Wed Sep 29 08:58:10 PDT 2010
// Add ivar 'calculateDensity'.
//
// Kathleen Biagas, Tue Aug 14 15:05:23 MST 2012
// Add ivar 'varname'.
//
// ****************************************************************************
class avtCracksClipperFilter : virtual public avtPluginFilter,
......@@ -94,6 +97,7 @@ class avtCracksClipperFilter : virtual public avtPluginFilter,
protected:
CracksClipperAttributes atts;
bool calculateDensity;
std::string varname;
virtual void Execute(void);
virtual void PostExecute(void);
......
......@@ -44,7 +44,7 @@
#include <vtkCellData.h>
#include <vtkDataSet.h>
#include <vtkFloatArray.h>
#include <vtkDataArray.h>
#include <vtkIntArray.h>
#include <DebugStream.h>
......@@ -155,12 +155,55 @@ avtCracksDensityFilter::Equivalent(const AttributeGroup *a)
// Kathleen Bonnell, Wed Sep 29 09:03:04 PDT 2010
// Changed output name to "operators/CracksClipper/den".
//
// Kathleen Biagas, Fri Aug 10 13:21:06 PDT 2012
// Support double precision data. Re-add density var to pipeline so that
// data range can be properly set. Use pipeline var (varname).
//
// ****************************************************************************
template <typename T1, typename T2> void
avtCracksDensityFilter_CalculateDensity(int numOriginalCells, int numNewCells,
T1 *emsp, T2 *volp, int* cozp, T1* denp)
{
// find the new volume of the original cells
double *newVol = new double[numOriginalCells];
for (int i = 0; i < numOriginalCells; i++)
{
newVol[i] = 0;
}
for (int i = 0; i < numNewCells; i++)
{
newVol[cozp[i]] += volp[i];
}
double *volSum = new double[numNewCells];
for (int i = 0; i < numNewCells; i++)
{
volSum[i] = newVol[cozp[i]];
}
for (int i = 0; i < numNewCells; i++)
{
if (volSum[i] != 0.)
denp[i] = emsp[i]/volSum[i];
else
denp[i] = emsp[i];
}
delete [] newVol;
delete [] volSum;
}
vtkDataSet *
avtCracksDensityFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
{
vtkFloatArray *vol = (vtkFloatArray*)(in_ds->GetCellData()->GetArray("ccvol"));
if (varname.empty())
{
avtCallback::IssueWarning("Could not find necessary var name,"
" in which to store density calculation.");
return in_ds;
}
vtkDataArray *vol = in_ds->GetCellData()->GetArray("ccvol");
if (vol == NULL)
{
avtCallback::IssueWarning("Could not find necessary volume data,"
......@@ -169,7 +212,8 @@ avtCracksDensityFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
return in_ds;
}
vtkIntArray *coz = (vtkIntArray*)(in_ds->GetCellData()->GetArray("cracksOriginalZones"));
vtkIntArray *coz = vtkIntArray::SafeDownCast(
in_ds->GetCellData()->GetArray("cracksOriginalZones"));
if (coz == NULL)
{
avtCallback::IssueWarning("Could not find necessary original zones"
......@@ -179,7 +223,7 @@ avtCracksDensityFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
}
std::string massVar = atts.GetInMassVar();
vtkFloatArray *ems = (vtkFloatArray*)(in_ds->GetCellData()->GetArray(massVar.c_str()));
vtkDataArray *ems = in_ds->GetCellData()->GetArray(massVar.c_str());
if (ems == NULL)
{
std::string msg = "Could not find mass varaible: " + massVar;
......@@ -188,7 +232,8 @@ avtCracksDensityFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
return in_ds;
}
vtkIntArray *noc = (vtkIntArray*)(in_ds->GetFieldData()->GetArray("originalNumCells"));
vtkIntArray *noc = vtkIntArray::SafeDownCast(
in_ds->GetFieldData()->GetArray("originalNumCells"));
if (noc == NULL)
{
avtCallback::IssueWarning("Could not find necessary number of zones"
......@@ -197,50 +242,62 @@ avtCracksDensityFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
return in_ds;
}
float *volp = (float*)vol->GetVoidPointer(0);
float *emsp = (float*)ems->GetVoidPointer(0);
int *cozp = (int*)coz->GetVoidPointer(0);
vtkIdType numNewCells = in_ds->GetNumberOfCells();
vtkDataArray *den = ems->NewInstance();
den->SetName(varname.c_str());
den->SetNumberOfComponents(1);
den->SetNumberOfTuples(numNewCells);
int numOriginalCells = noc->GetValue(0);
int numNewCells = in_ds->GetNumberOfCells();
#define typeVol(massType) \
{ \
if (vol->GetDataType() == VTK_DOUBLE) \
{ \
avtCracksDensityFilter_CalculateDensity(numOriginalCells, numNewCells, \
(massType*) ems->GetVoidPointer(0), \
(double*) vol->GetVoidPointer(0), \
(int*)coz->GetVoidPointer(0), \
(massType*) den->GetVoidPointer(0)); \
} \
else \
{ \
avtCracksDensityFilter_CalculateDensity(numOriginalCells, numNewCells, \
(massType*) ems->GetVoidPointer(0), \
(float*) vol->GetVoidPointer(0), \
(int*)coz->GetVoidPointer(0), \
(massType*) den->GetVoidPointer(0)); \
} \
}
// find the new volume of the original cells
float *newVol = new float[numOriginalCells];
int i;
for (i = 0; i < numOriginalCells; i++)
if (ems->GetDataType() == VTK_DOUBLE)
{
newVol[i] = 0.f;
typeVol(double);
}
for (i = 0; i < numNewCells; i++)
else
{
newVol[cozp[i]] += volp[i];
typeVol(float);
}
vtkFloatArray *den = vtkFloatArray::New();
den->SetNumberOfComponents(1);
den->SetNumberOfTuples(numNewCells);
den->SetName("operators/CracksClipper/den");
float *volSum = new float[numNewCells];
for (i = 0; i < numNewCells; i++)
{
volSum[i] = newVol[cozp[i]];
}
for (i = 0; i < numNewCells; i++)
{
if (volSum[i] != 0.f)
den->SetValue(i, emsp[i]/volSum[i]);
else
den->SetValue(i, emsp[i]);
}
delete [] newVol;
delete [] volSum;
vtkDataSet *rv = in_ds;
rv->GetCellData()->AddArray(den);
rv->GetCellData()->SetScalars(den);
rv->GetCellData()->RemoveArray("ccvol");
rv->GetCellData()->RemoveArray(massVar.c_str());
den->Delete();
// Re-add the density variable to the pipeline here so that the
// data range can be set properly.
double range[2] = {FLT_MAX, -FLT_MAX};
GetDataRange(rv, range, varname.c_str(), false);
avtDataAttributes &outAtts = GetOutput()->GetInfo().GetAttributes();
outAtts.RemoveVariable(massVar.c_str());
outAtts.AddVariable(varname.c_str());
outAtts.SetActiveVariable(varname.c_str());
outAtts.SetVariableDimension(1);
outAtts.SetVariableType(AVT_SCALAR_VAR);
outAtts.SetCentering(AVT_ZONECENT);
outAtts.GetThisProcsOriginalDataExtents(varname.c_str())->Set(range);
outAtts.GetThisProcsActualDataExtents(varname.c_str())->Set(range);
return rv;
}
......@@ -60,6 +60,10 @@ class vtkDataSet;
// Programmer: kbonnell -- generated by xml2avt
// Creation: Mon Apr 30 11:40:50 PDT 2007
//
// Modifications:
// Kathleen Biagas, Tue Aug 14 15:14:57 MST 2012
// Add 'varname' ivar.
//
// ****************************************************************************
class avtCracksDensityFilter : public avtPluginDataTreeIterator
......@@ -77,9 +81,11 @@ class avtCracksDensityFilter : public avtPluginDataTreeIterator
virtual void SetAtts(const AttributeGroup*);
virtual bool Equivalent(const AttributeGroup*);
void SetVarName(const std::string &v)
{ varname = v; }
protected:
CracksClipperAttributes atts;
std::string varname;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
};
......
......@@ -45,8 +45,8 @@
#include <vtkCellData.h>
#include <vtkCracksClipper.h>
#include <vtkCrackWidthFilter.h>
#include <vtkDataArray.h>
#include <vtkExtractCells.h>
#include <vtkFloatArray.h>
#include <vtkIdList.h>
#include <vtkIntArray.h>
#include <vtkPointData.h>
......@@ -65,7 +65,7 @@
// ****************************************************************************
// Method: GetCrackVar
// Method: avtRemoveCracksFilter_GetCrackVar
//
// Purpose: Convenience method to return a crack variable.
//
......@@ -80,7 +80,7 @@
// ****************************************************************************
const char *
GetCrackVar(int which, CracksClipperAttributes *a)
avtRemoveCracksFilter_GetCrackVar(int which, CracksClipperAttributes *a)
{
if (0 == which)
return a->GetCrack1Var().c_str();
......@@ -92,7 +92,7 @@ GetCrackVar(int which, CracksClipperAttributes *a)
// ****************************************************************************
// Method: GetShowCrack
// Method: avtRemoveCracksFilter_GetShowCrack
//
// Purpose: Convenience method to return the value of ShowCrack.
//
......@@ -102,7 +102,7 @@ GetCrackVar(int which, CracksClipperAttributes *a)
// ****************************************************************************
bool
GetShowCrack(int which, CracksClipperAttributes *a)
avtRemoveCracksFilter_GetShowCrack(int which, CracksClipperAttributes *a)
{
if (0 == which)
return a->GetShowCrack1();
......@@ -113,7 +113,7 @@ GetShowCrack(int which, CracksClipperAttributes *a)
}
// ****************************************************************************
// Method: GetCrackWidth
// Method: avtRemoveCracksFilter_GetCrackWidth
//
// Purpose: Convenience method to return the crack width.
//
......@@ -127,7 +127,7 @@ GetShowCrack(int which, CracksClipperAttributes *a)
// ****************************************************************************
const char *
GetCrackWidth(int which)
avtRemoveCracksFilter_GetCrackWidth(int which)
{
if (0 == which)
return "avtCrack1Width";
......@@ -139,7 +139,7 @@ GetCrackWidth(int which)
// ****************************************************************************
// Method: GetCrackWidth
// Method: avtRemoveCracksFilter_OrderThem
//
// Purpose: Convenience method to create max-to-min odering of delta.
//
......@@ -149,7 +149,7 @@ GetCrackWidth(int which)
// ****************************************************************************
void
OrderThem2(double delta[3], int co[3])
avtRemoveCracksFilter_OrderThem(double delta[3], int co[3])
{
int min, mid, max;
if (delta[0] <= delta[1] && delta[0] <= delta[2])
......@@ -351,7 +351,7 @@ avtRemoveCracksFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
cwf->SetStrainVar(atts.GetStrainVar().c_str());
cwf->Update();
float mw[3];
double mw[3];
for (int i = 0; i < 3; i++)
{
mw[i] = cwf->GetMaxCrackWidth(i);
......@@ -388,7 +388,8 @@ avtRemoveCracksFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
ManageMemory(output);
output->Delete();
}
rv->GetFieldData()->AddArray(numOCells);
if (rv != NULL)
rv->GetFieldData()->AddArray(numOCells);
cwf->Delete();
useThis->Delete();
......@@ -427,6 +428,9 @@ avtRemoveCracksFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
// Kathleen Bonnell, Tue Jul 1 15:09:54 PDT 2008
// Removed unreferenced variable.
//
// Kathleen Biagas, Tue Aug 14 15:18:47 MST 2012
// Support double precision.
//
// ****************************************************************************
bool
......@@ -490,7 +494,8 @@ avtRemoveCracksFilter::NeedsProcessing(vtkDataSet *ds, bool *np)
int nc = strain->GetNumberOfTuples();
int idx[3] = {0, 4, 8};
float *s = (float*)strain->GetVoidPointer(0);
for (i = 0; i < 3; i++)
{
if (!np[i]) // this crack direction is not needed
......@@ -501,7 +506,7 @@ avtRemoveCracksFilter::NeedsProcessing(vtkDataSet *ds, bool *np)
for (int j = 0; j < nc && !np[i]; j++)
{
if (s[9*j+comp] != 0)
if (strain->GetComponent(j,comp) != 0)
np[i] = true;
}
}
......@@ -533,13 +538,16 @@ avtRemoveCracksFilter::NeedsProcessing(vtkDataSet *ds, bool *np)
// Jeremy Meredith, Thu Aug 7 15:30:34 EDT 2008
// Use const char* for string literals.
//
// Kathleen Biagas, Tue Aug 14 15:18:47 MST 2012
// Support double precision.
//
// ****************************************************************************
vtkDataSet *
avtRemoveCracksFilter::RemoveCracks(vtkDataSet *inds)
{
vtkFloatArray *strain = (vtkFloatArray*)inds->GetCellData()->
GetArray(atts.GetStrainVar().c_str());
vtkDataArray *strain = inds->GetCellData()->
GetArray(atts.GetStrainVar().c_str());
int nc = inds->GetNumberOfCells();
const char *centers = "avtCellCenters";
......@@ -550,16 +558,16 @@ avtRemoveCracksFilter::RemoveCracks(vtkDataSet *inds)
vtkDataSet *dsToUse = inds->NewInstance();
dsToUse->ShallowCopy(inds);
double delta[3];
int i, cellId;
vtkIdType cellId;
int processedCell[3] = {0, 0, 0};
vtkIdList *cellsToKeepIntact = vtkIdList::New();
vtkDataSet *apdInput[5];
for (i = 0; i < 5; i++)
for (int i = 0; i < 5; i++)
apdInput[i] = dsToUse->NewInstance();
int apdInputNum = 0;
for (i = 0; i < nc; i++)
for (int i = 0; i < nc; i++)
{
cellId = i;
delta[0] = strain->GetComponent(i, 0);
......@@ -574,18 +582,19 @@ avtRemoveCracksFilter::RemoveCracks(vtkDataSet *inds)
int crackOrder[3] = {0, 1, 2};
OrderThem2(delta, crackOrder);
avtRemoveCracksFilter_OrderThem(delta, crackOrder);
bool first = true;
for (int j = 0; j < 3; j++)
{
int whichCrack = crackOrder[j];
processedCell[whichCrack] = 0;
if (!GetShowCrack(whichCrack, &atts) || delta[whichCrack] == 0)
if (!avtRemoveCracksFilter_GetShowCrack(whichCrack, &atts) ||
delta[whichCrack] == 0)
{
continue;
}
crackvar = GetCrackVar(whichCrack, &atts);
crackwidth = GetCrackWidth(whichCrack);
crackvar = avtRemoveCracksFilter_GetCrackVar(whichCrack, &atts);
crackwidth = avtRemoveCracksFilter_GetCrackWidth(whichCrack);
if (first)
dsToUse->ShallowCopy(inds);
......@@ -627,12 +636,13 @@ avtRemoveCracksFilter::RemoveCracks(vtkDataSet *inds)
negClip->Update();
negClip->Delete();
first = false;
if (outds2->GetNumberOfCells() <= 0)
{
outds2->Delete();
outds2 = NULL;
}
first = false;
if (outds1 == NULL && outds2 == NULL)
{
......
<
......@@ -40,14 +40,10 @@
#include <vtkCell.h>
#include <vtkCellData.h>
#include <vtkDataSet.h>
#include <vtkFloatArray.h>
#include <vtkDoubleArray.h>
#include <vtkMassProperties.h>
#include <vtkMath.h>
#include <vtkObjectFactory.h>
#include <vtkPolyData.h>
#include <vtkQuad.h>
#include <vtkSlicer.h>
#include <vtkTriangle.h>
#include <DebugStream.h>
#include <ImproperUseException.h>
......@@ -77,15 +73,16 @@ vtkStandardNewMacro(vtkCrackWidthFilter);
// Kathleen Bonnell, Fri Oct 13 11:05:01 PDT 2006
// Removed vtkCellIntersections, added vtkMassProperties, vtkSlicer.
//
// Kathleen Biagas, Tue Aug 14 13:05:17 MST 2012
// Removed unused vtkQuad and vtkTriangle.
//
// ***************************************************************************
vtkCrackWidthFilter::vtkCrackWidthFilter()
{
this->triangle = vtkTriangle::New();
this->quad = vtkQuad::New();
this->MaxCrack1Width = 0.f;
this->MaxCrack2Width = 0.f;
this->MaxCrack3Width = 0.f;
this->MaxCrack1Width = 0.;
this->MaxCrack2Width = 0.;
this->MaxCrack3Width = 0.;
this->Crack1Var = NULL;
this->Crack2Var = NULL;
this->Crack3Var = NULL;
......@@ -108,20 +105,13 @@ vtkCrackWidthFilter::vtkCrackWidthFilter()
// Kathleen Bonnell, Fri Oct 13 11:05:01 PDT 2006
// Removed vtkCellIntersections, added vtkMassProperties, vtkSlicer.
//
// Kathleen Biagas, Tue Aug 14 13:05:17 MST 2012
// Removed unused vtkQuad and vtkTriangle.
//
// ***************************************************************************
vtkCrackWidthFilter::~vtkCrackWidthFilter()
{
if (this->triangle)
{
this->triangle->Delete();
this->triangle = NULL;
}
if (this->quad)
{
this->quad->Delete();
this->quad = NULL;
}
this->SetCrack1Var(NULL);
this->SetCrack2Var(NULL);
this->SetCrack3Var(NULL);
......@@ -139,7 +129,7 @@ vtkCrackWidthFilter::~vtkCrackWidthFilter()
}