Commit a2bdaf88 authored by js9's avatar js9

merge from 2.0RC: pick up new CSG discretization algorithm


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@10041 18c085ea-50e0-402c-830e-de6fd14e8384
parent cb0c112b
......@@ -981,6 +981,14 @@ avtTransformManager::FindMatchingCSGDiscretization(
// Added call to find matching CSG discretization. Made it smarter about
// caching discretizations to reduce frequency of cases where a CSG mesh
// that does not vary with time is re-discretized each timestep.
//
// Jeremy Meredith, Fri Feb 26 11:43:27 EST 2010
// Added multi-pass discretization mode. Requires it to be able to
// store off the split-up mesh between domains, so we use the cache
// for it and store it with a -1 domain. This mode might fail
// (since it's restricted to a fixed-length bitfield for the boundaries)
// in which case we fall back to the Uniform algorithm.
//
// ****************************************************************************
vtkDataSet *
avtTransformManager::CSGToDiscrete(const avtDatabaseMetaData *const md,
......@@ -1052,19 +1060,91 @@ avtTransformManager::CSGToDiscrete(const avtDatabaseMetaData *const md,
bnds[0], bnds[1], bnds[2],
bnds[3], bnds[4], bnds[5]);
}
else if (dataRequest->DiscMode() == 1)
else if (dataRequest->DiscMode() == 0) // uniform
{
dgrid = csgmesh->DiscretizeSpace3(csgreg, rank, nprocs,
dataRequest->DiscTol(), dataRequest->FlatTol(),
dgrid = csgmesh->DiscretizeSpace(csgreg,
dataRequest->DiscTol(),
bnds[0], bnds[1], bnds[2],
bnds[3], bnds[4], bnds[5]);
}
else
else if (dataRequest->DiscMode() == 1) // adaptive
{
dgrid = csgmesh->DiscretizeSpace(csgreg, dataRequest->DiscTol(),
dgrid = csgmesh->DiscretizeSpace3(csgreg, rank, nprocs,
dataRequest->DiscTol(),
dataRequest->FlatTol(),
bnds[0], bnds[1], bnds[2],
bnds[3], bnds[4], bnds[5]);
}
else // if (dataRequest->DiscMode() == 2) // multi-pass
{
// Look to see if there's a processed mesh we
// stored for all domains.
vtkDataSet *processed =
(vtkDataSet*)cache.GetVTKObject(vname, type, -1, -1, mat);
// If so, make sure the settings used to generate it
// match our current settings.
if (processed)
{
void_ref_ptr oldVrDr = cache.GetVoidRef(vname,
avtVariableCache::DATA_SPECIFICATION, -1, -1);
avtDataRequest *oldDr = (avtDataRequest *) *oldVrDr;
if (oldDr->DiscBoundaryOnly() != dataRequest->DiscBoundaryOnly() ||
oldDr->DiscTol() != dataRequest->DiscTol() ||
oldDr->FlatTol() != dataRequest->FlatTol() ||
oldDr->DiscMode() != dataRequest->DiscMode())
{
processed = NULL;
}
}
// If we didn't find a mesh, process it now.
vtkCSGGrid *csgmesh = NULL;
bool success = true;
if (!processed)
{
csgmesh = vtkCSGGrid::SafeDownCast(ds);
const double *bnds = csgmesh->GetBounds();
success = csgmesh->DiscretizeSpaceMultiPass(
dataRequest->DiscTol(),
bnds[0], bnds[1], bnds[2],
bnds[3], bnds[4], bnds[5]);
if (success)
{
processed = ds;
cache.CacheVTKObject(vname, type, -1, -1, mat, csgmesh);
avtDataRequest *newdataRequest = new avtDataRequest(dataRequest);
const void_ref_ptr vr = void_ref_ptr(newdataRequest, DestructDspec);
cache.CacheVoidRef(vname, avtVariableCache::DATA_SPECIFICATION,
-1, -1, vr);
}
else
{
// clear out any old one
cache.CacheVTKObject(vname, type, -1, -1, mat, NULL);
}
}
else
{
csgmesh = vtkCSGGrid::SafeDownCast(processed);
}
// On failure, revert to Uniform mode.
if (success)
{
dgrid = csgmesh->GetMultiPassDiscretization(csgreg);
}
else
{
debug1 << "Something failed in the CSG multipass "
<< "algorithm; reverting to uniform\n";
dgrid = csgmesh->DiscretizeSpace(csgreg,
dataRequest->DiscTol(),
bnds[0], bnds[1], bnds[2],
bnds[3], bnds[4], bnds[5]);
}
}
dgrid->Update();
//
......
......@@ -44,20 +44,21 @@
//
static const char *DiscretizationModes_strings[] = {
"Uniform", "Adaptive"};
"Uniform", "Adaptive", "MultiPass"
};
std::string
MeshManagementAttributes::DiscretizationModes_ToString(MeshManagementAttributes::DiscretizationModes t)
{
int index = int(t);
if(index < 0 || index >= 2) index = 0;
if(index < 0 || index >= 3) index = 0;
return DiscretizationModes_strings[index];
}
std::string
MeshManagementAttributes::DiscretizationModes_ToString(int t)
{
int index = (t < 0 || t >= 2) ? 0 : t;
int index = (t < 0 || t >= 3) ? 0 : t;
return DiscretizationModes_strings[index];
}
......@@ -65,7 +66,7 @@ bool
MeshManagementAttributes::DiscretizationModes_FromString(const std::string &s, MeshManagementAttributes::DiscretizationModes &val)
{
val = MeshManagementAttributes::Uniform;
for(int i = 0; i < 2; ++i)
for(int i = 0; i < 3; ++i)
{
if(s == DiscretizationModes_strings[i])
{
......@@ -76,14 +77,11 @@ MeshManagementAttributes::DiscretizationModes_FromString(const std::string &s, M
return false;
}
// Type map format string
const char *MeshManagementAttributes::TypeMapFormatString = "d*d*d*d*ibb";
// ****************************************************************************
// Method: MeshManagementAttributes::MeshManagementAttributes
//
// Purpose:
// Constructor for the MeshManagementAttributes class.
// Init utility for the MeshManagementAttributes class.
//
// Note: Autogenerated by xml2atts.
//
......@@ -94,22 +92,23 @@ const char *MeshManagementAttributes::TypeMapFormatString = "d*d*d*d*ibb";
//
// ****************************************************************************
MeshManagementAttributes::MeshManagementAttributes() :
AttributeSubject(MeshManagementAttributes::TypeMapFormatString)
void MeshManagementAttributes::Init()
{
discretizationTolerance.push_back(0.01);
discretizationTolerance.push_back(0.02);
discretizationTolerance.push_back(0.025);
discretizationTolerance.push_back(0.05);
discretizationMode = Adaptive;
discretizationMode = Uniform;
discretizeBoundaryOnly = false;
passNativeCSG = false;
MeshManagementAttributes::SelectAll();
}
// ****************************************************************************
// Method: MeshManagementAttributes::MeshManagementAttributes
//
// Purpose:
// Copy constructor for the MeshManagementAttributes class.
// Copy utility for the MeshManagementAttributes class.
//
// Note: Autogenerated by xml2atts.
//
......@@ -120,8 +119,7 @@ MeshManagementAttributes::MeshManagementAttributes() :
//
// ****************************************************************************
MeshManagementAttributes::MeshManagementAttributes(const MeshManagementAttributes &obj) :
AttributeSubject(MeshManagementAttributes::TypeMapFormatString)
void MeshManagementAttributes::Copy(const MeshManagementAttributes &obj)
{
discretizationTolerance = obj.discretizationTolerance;
discretizationToleranceX = obj.discretizationToleranceX;
......@@ -131,7 +129,96 @@ MeshManagementAttributes::MeshManagementAttributes(const MeshManagementAttribute
discretizeBoundaryOnly = obj.discretizeBoundaryOnly;
passNativeCSG = obj.passNativeCSG;
SelectAll();
MeshManagementAttributes::SelectAll();
}
// Type map format string
const char *MeshManagementAttributes::TypeMapFormatString = MESHMANAGEMENTATTRIBUTES_TMFS;
const AttributeGroup::private_tmfs_t MeshManagementAttributes::TmfsStruct = {MESHMANAGEMENTATTRIBUTES_TMFS};
// ****************************************************************************
// Method: MeshManagementAttributes::MeshManagementAttributes
//
// Purpose:
// Default constructor for the MeshManagementAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
MeshManagementAttributes::MeshManagementAttributes() :
AttributeSubject(MeshManagementAttributes::TypeMapFormatString)
{
MeshManagementAttributes::Init();
}
// ****************************************************************************
// Method: MeshManagementAttributes::MeshManagementAttributes
//
// Purpose:
// Constructor for the derived classes of MeshManagementAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
MeshManagementAttributes::MeshManagementAttributes(private_tmfs_t tmfs) :
AttributeSubject(tmfs.tmfs)
{
MeshManagementAttributes::Init();
}
// ****************************************************************************
// Method: MeshManagementAttributes::MeshManagementAttributes
//
// Purpose:
// Copy constructor for the MeshManagementAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
MeshManagementAttributes::MeshManagementAttributes(const MeshManagementAttributes &obj) :
AttributeSubject(MeshManagementAttributes::TypeMapFormatString)
{
MeshManagementAttributes::Copy(obj);
}
// ****************************************************************************
// Method: MeshManagementAttributes::MeshManagementAttributes
//
// Purpose:
// Copy constructor for derived classes of the MeshManagementAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
MeshManagementAttributes::MeshManagementAttributes(const MeshManagementAttributes &obj, private_tmfs_t tmfs) :
AttributeSubject(tmfs.tmfs)
{
MeshManagementAttributes::Copy(obj);
}
// ****************************************************************************
......@@ -173,15 +260,9 @@ MeshManagementAttributes&
MeshManagementAttributes::operator = (const MeshManagementAttributes &obj)
{
if (this == &obj) return *this;
discretizationTolerance = obj.discretizationTolerance;
discretizationToleranceX = obj.discretizationToleranceX;
discretizationToleranceY = obj.discretizationToleranceY;
discretizationToleranceZ = obj.discretizationToleranceZ;
discretizationMode = obj.discretizationMode;
discretizeBoundaryOnly = obj.discretizeBoundaryOnly;
passNativeCSG = obj.passNativeCSG;
SelectAll();
MeshManagementAttributes::Copy(obj);
return *this;
}
......
......@@ -32,13 +32,13 @@ MeshManagementAttributes::SetFromNode(DataNode *parentNode)
DataNode *node;
if((node = searchNode->GetNode("discretizationTolerance")) != 0)
{
if (node->AsDoubleVector().size() == 3)
if (node->AsDoubleVector().size() == 3)
SetDiscretizationTolerance(node->AsDoubleVector());
else
{
MeshManagementAttributes tmp;
SetDiscretizationTolerance(tmp.GetDiscretizationTolerance());
}
{
MeshManagementAttributes tmp;
SetDiscretizationTolerance(tmp.GetDiscretizationTolerance());
}
}
if((node = searchNode->GetNode("discretizationToleranceX")) != 0)
SetDiscretizationToleranceX(node->AsDoubleVector());
......
......@@ -42,6 +42,7 @@
#include <string>
#include <AttributeSubject.h>
// ****************************************************************************
// Class: MeshManagementAttributes
//
......@@ -63,16 +64,27 @@ public:
enum DiscretizationModes
{
Uniform,
Adaptive
Adaptive,
MultiPass
};
// These constructors are for objects of this class
MeshManagementAttributes();
MeshManagementAttributes(const MeshManagementAttributes &obj);
protected:
// These constructors are for objects derived from this class
MeshManagementAttributes(private_tmfs_t tmfs);
MeshManagementAttributes(const MeshManagementAttributes &obj, private_tmfs_t tmfs);
public:
virtual ~MeshManagementAttributes();
virtual MeshManagementAttributes& operator = (const MeshManagementAttributes &obj);
virtual bool operator == (const MeshManagementAttributes &obj) const;
virtual bool operator != (const MeshManagementAttributes &obj) const;
private:
void Init();
void Copy(const MeshManagementAttributes &obj);
public:
virtual const std::string TypeName() const;
virtual bool CopyAttributes(const AttributeGroup *);
......@@ -134,7 +146,8 @@ public:
ID_discretizationToleranceZ,
ID_discretizationMode,
ID_discretizeBoundaryOnly,
ID_passNativeCSG
ID_passNativeCSG,
ID__LAST
};
private:
......@@ -148,6 +161,8 @@ private:
// Static class format string for type map.
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define MESHMANAGEMENTATTRIBUTES_TMFS "d*d*d*d*ibb"
#endif
......@@ -3,9 +3,10 @@
<Enum name="DiscretizationModes">
Uniform
Adaptive
MultiPass
</Enum>
<Field name="discretizationTolerance" label="discretizationTolerance" type="doubleVector">
0.010000
0.020000
0.025000
0.050000
</Field>
......@@ -16,7 +17,7 @@
<Field name="discretizationToleranceZ" label="discretizationToleranceZ" type="doubleVector">
</Field>
<Field name="discretizationMode" label="discretizationMode" type="enum" subtype="DiscretizationModes">
Adaptive
Uniform
</Field>
<Field name="discretizeBoundaryOnly" label="discretizeBoundaryOnly" type="bool">
false
......
#ifndef FIXED_LENGTH_BIT_FIELD_H
#define FIXED_LENGTH_BIT_FIELD_H
//#include <iostream>
// ****************************************************************************
// Class: FixedLengthBitField
//
// Purpose:
// Simple template-based implementation of a fixed-length bitfield.
// The template parameter is the number of bytes used to store the bits,
// and thus the number of bits this supports is 8*NBYTES.
//
// Programmer: Jeremy Meredith
// Creation: February 26, 2010
//
// ****************************************************************************
template <int NBYTES>
class FixedLengthBitField
{
private:
unsigned char bytes[NBYTES];
public:
FixedLengthBitField()
{
for (int i=0; i<NBYTES; i++)
bytes[i] = 0;
}
inline void SetBit(int bit)
{
int byte = (bit & ~0x07) >> 3;
int lbit = bit & 0x07;
bytes[byte] |= (1<<lbit);
}
inline void ClearBit(int bit)
{
int byte = (bit & ~0x07) >> 3;
int lbit = bit & 0x07;
bytes[byte] &= ~(1<<lbit);
}
inline bool TestBit(int bit)
{
int byte = (bit & ~0x07) >> 3;
int lbit = bit & 0x07;
return (bytes[byte] & (1<<lbit));
}
inline bool operator==(const FixedLengthBitField<NBYTES> &b) const
{
for (int i=0; i<NBYTES; i++)
if (bytes[i] != b.bytes[i])
return false;
return true;
}
inline const FixedLengthBitField &operator=(const FixedLengthBitField<NBYTES> &b)
{
for (int i=0; i<NBYTES; i++)
bytes[i] = b.bytes[i];
return *this;
}
#if 0
void Print(std::ostream &out)
{
for (int i=NBYTES-1; i>=0; i--)
{
if (i==NBYTES-1)
out << "0x";
else
out << "_";
for (int j=7; j>=0; j--)
{
out << TestBit(i*8 + j) ? "1" : "0";
}
}
out << endl;
}
#endif
};
#endif
......@@ -139,6 +139,9 @@ QvisMeshManagementWindow::~QvisMeshManagementWindow()
// tabSelected slot. This signal does not exist in Qt4 & the slot code
// was empty.
//
// Jeremy Meredith, Fri Feb 26 14:13:08 EST 2010
// Added a new "multi-pass" discretization algorithm
//
// ****************************************************************************
void
......@@ -187,6 +190,9 @@ QvisMeshManagementWindow::CreateWindowContents()
discretizeAdaptive->setEnabled(false);
#endif
layoutCSGGroup->addWidget(discretizeAdaptive, 2, 2);
discretizeMultiPass = new QRadioButton(tr("Multi-pass"), pageCSGGroup);
discretizationMode->addButton(discretizeMultiPass,2);
layoutCSGGroup->addWidget(discretizeMultiPass, 2, 3);
smallestZoneLabel = new QLabel(tr("Smallest Zone (% bbox diag)"), pageCSGGroup);
layoutCSGGroup->addWidget(smallestZoneLabel, 3, 0);
......@@ -240,6 +246,9 @@ QvisMeshManagementWindow::CreateWindowContents()
// Cyrus Harrison, Wed Jul 2 11:16:25 PDT 2008
// Initial Qt4 Port.
//
// Jeremy Meredith, Fri Feb 26 14:13:08 EST 2010
// Added a new "multi-pass" discretization algorithm
//
// ****************************************************************************
void
......@@ -280,18 +289,28 @@ QvisMeshManagementWindow::UpdateWindow(bool doAll)
dMode = atts->GetDiscretizationMode();
discretizationMode->blockSignals(true);
if (dMode == MeshManagementAttributes::Uniform)
{
discretizationMode->button(0)->setChecked(true);
flatEnoughLineEdit->setEnabled(false);
}
else if (dMode == MeshManagementAttributes::Adaptive)
{
#if HAVE_BILIB
discretizationMode->button(1)->setChecked(true);
flatEnoughLineEdit->setEnabled(true);
#else
GUIBase::Warning(tr("Adaptive not available. "
"Missing boost interval template library. "
"Overriding to Uniform."));
discretizationMode->button(0)->setChecked(true);
flatEnoughLineEdit->setEnabled(false);
#endif
}
else if (dMode == MeshManagementAttributes::MultiPass)
{
discretizationMode->button(2)->setChecked(true);
flatEnoughLineEdit->setEnabled(false);
}
discretizationMode->blockSignals(false);
}
break;
......@@ -325,6 +344,9 @@ QvisMeshManagementWindow::UpdateWindow(bool doAll)
// Cyrus Harrison, Wed Jul 2 11:16:25 PDT 2008
// Initial Qt4 Port.
//
// Jeremy Meredith, Fri Feb 26 14:13:08 EST 2010
// Added a new "multi-pass" discretization algorithm
//
// ****************************************************************************
void
QvisMeshManagementWindow::GetCurrentValues(const QWidget *widget)
......@@ -344,7 +366,8 @@ QvisMeshManagementWindow::GetCurrentValues(const QWidget *widget)
}
}
if (doAll || widget == discretizeUniform || widget == discretizeAdaptive)
if (doAll || widget == discretizeAdaptive ||
widget == discretizeUniform || widget == discretizeAdaptive)
{
int selectedId = discretizationMode->id(discretizationMode->checkedButton());
......@@ -352,8 +375,11 @@ QvisMeshManagementWindow::GetCurrentValues(const QWidget *widget)
mmAtts->GetDiscretizationMode() != MeshManagementAttributes::Uniform)
mmAtts->SetDiscretizationMode(MeshManagementAttributes::Uniform);
else if (selectedId == 1 &&
mmAtts->GetDiscretizationMode() != MeshManagementAttributes::Adaptive)
mmAtts->GetDiscretizationMode() != MeshManagementAttributes::Adaptive)
mmAtts->SetDiscretizationMode(MeshManagementAttributes::Adaptive);
else if (selectedId == 2 &&
mmAtts->GetDiscretizationMode() != MeshManagementAttributes::MultiPass)
mmAtts->SetDiscretizationMode(MeshManagementAttributes::MultiPass);
}
if (doAll || widget == discretizeBoundaryOnly)
......@@ -488,6 +514,8 @@ QvisMeshManagementWindow::discretizationModeChanged(int val)
mmAtts->SetDiscretizationMode(MeshManagementAttributes::Uniform);
#endif
}
else if (val == 2)
mmAtts->SetDiscretizationMode(MeshManagementAttributes::MultiPass);
SetUpdate(false);
Apply();
}
......
......@@ -79,6 +79,9 @@ class QVBox;
// Cyrus Harrison, Thu Dec 18 09:29:37 PST 2008
// Removed tabSelected slot b/c it was an empty method.
//
// Jeremy Meredith, Fri Feb 26 14:13:08 EST 2010
// Added a new "multi-pass" discretization algorithm
//
// ****************************************************************************
class GUI_API QvisMeshManagementWindow : public QvisPostableWindowObserver
......@@ -115,6 +118,7 @@ private:
QCheckBox *discretizeBoundaryOnly;
QLabel *discretizeModeLabel;
QButtonGroup *discretizationMode;
QRadioButton *discretizeMultiPass;
QRadioButton *discretizeUniform;
QRadioButton *discretizeAdaptive;
QLabel *smallestZoneLabel;
......
......@@ -63,6 +63,7 @@ public class MeshManagementAttributes extends AttributeSubject
// Enum values
public final static int DISCRETIZATIONMODES_UNIFORM = 0;
public final static int DISCRETIZATIONMODES_ADAPTIVE = 1;
public final static int DISCRETIZATIONMODES_MULTIPASS = 2;
public MeshManagementAttributes()
......@@ -76,7 +77,7 @@ public class MeshManagementAttributes extends AttributeSubject
discretizationToleranceX = new Vector();
discretizationToleranceY = new Vector();
discretizationToleranceZ = new Vector();
discretizationMode = DISCRETIZATIONMODES_ADAPTIVE;
discretizationMode = DISCRETIZATIONMODES_UNIFORM;
discretizeBoundaryOnly = false;
passNativeCSG = false;
}
......@@ -92,7 +93,7 @@ public class MeshManagementAttributes extends AttributeSubject
discretizationToleranceX = new Vector();
discretizationToleranceY = new Vector();
discretizationToleranceZ = new Vector();
discretizationMode = DISCRETIZATIONMODES_ADAPTIVE;
discretizationMode = DISCRETIZATIONMODES_UNIFORM;
discretizeBoundaryOnly = false;
passNativeCSG = false;
}
......@@ -309,6 +310,8 @@ public class MeshManagementAttributes extends AttributeSubject
str = str + "DISCRETIZATIONMODES_UNIFORM";
if(discretizationMode == DISCRETIZATIONMODES_ADAPTIVE)
str = str + "DISCRETIZATIONMODES_ADAPTIVE";
if(discretizationMode == DISCRETIZATIONMODES_MULTIPASS)
str = str + "DISCRETIZATIONMODES_MULTIPASS";
str = str + "\n";
str = str + boolToString("discretizeBoundaryOnly", discretizeBoundaryOnly, indent) + "\n";
str = str + boolToString("passNativeCSG", passNativeCSG, indent) + "\n";
......
......@@ -41,6 +41,7 @@
SET(VISIT_VTK_SOURCES
InitVTK.C
vtkAxisDepthSort.C
vtkBinaryPartitionVolumeFromVolume.C
vtkCSGCell.C
vtkCSGGrid.C
vtkConnectedTubeFilter.C
......@@ -79,6 +80,7 @@ vtkVisItProbeFilter.C
vtkVisItRectilinearGrid.C
vtkVisItSTLWriter.C
vtkVisItScalarTree.C
vtkVisItSplitter.C
vtkVisItStreamLine.C
vtkVisItStructuredGrid.C
vtkVisItStructuredGridNormals.C
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// vtkBinaryPartitionVolumeFromVolume.C //
// ************************************************************************* //
#include <vtkBinaryPartitionVolumeFromVolume.h>
#include <vtkCellArray.h>
#include <vtkCellData.h>
#include <vtkCellType.h>
#include <vtkIdList.h>
#include <vtkIdTypeArray.h>
#include <vtkIntArray.h>
#include <vtkPointData.h>
#include <vtkUnstructuredGrid.h>
#include <vtkUnsignedCharArray.h>
using std::vector;
// ****************************************************************************
// Method: vtkBinaryPartitionVolumeFromVolume constructor
//
// Programmer: Jeremy Meredith
// Creation: February 26, 2010
//
// Modifications:
//
// ****************************************************************************
vtkBinaryPartitionVolumeFromVolume::vtkBinaryPartitionVolumeFromVolume(int nPts, int ptSizeGuess)
: vtkVolumeFromVolume(nPts, ptSizeGuess)