Commit 1faa99e2 authored by hrchilds's avatar hrchilds
Browse files

Update from April 15, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@221 18c085ea-50e0-402c-830e-de6fd14e8384
parent d6c709f4
......@@ -7481,6 +7481,12 @@ void VerdictVector::print_me()
}
*/
// Modifications:
//
// Hank Childs, Wed Apr 14 20:31:05 PDT 2004
// Do not assert.
//
VERDICT_REAL VerdictVector::interior_angle(const VerdictVector &otherVector)
{
VERDICT_REAL cosAngle=0., angleRad=0., len1=0., len2=0.;
......@@ -7489,8 +7495,10 @@ VERDICT_REAL VerdictVector::interior_angle(const VerdictVector &otherVector)
cosAngle = (*this % otherVector)/(len1 * len2);
else
{
/*
assert(len1 > 0);
assert(len2 > 0);
*/
}
if ((cosAngle > 1.0) && (cosAngle < 1.0001))
......@@ -7507,7 +7515,8 @@ VERDICT_REAL VerdictVector::interior_angle(const VerdictVector &otherVector)
angleRad = acos(cosAngle);
else
{
assert(cosAngle < 1.0001 && cosAngle > -1.0001);
//assert(cosAngle < 1.0001 && cosAngle > -1.0001);
cosAngle = 0.;
}
return( (angleRad * 180.) / VERDICT_PI );
......@@ -7553,6 +7562,12 @@ void VerdictVector::rotate(VERDICT_REAL angle, VERDICT_REAL )
rtheta_to_xy();
}
// Modifications:
//
// Hank Childs, Wed Apr 14 20:31:05 PDT 2004
// Do not assert.
//
void VerdictVector::blow_out(VERDICT_REAL gamma, VERDICT_REAL rmin)
{
// if gamma == 1, then
......@@ -7561,7 +7576,9 @@ void VerdictVector::blow_out(VERDICT_REAL gamma, VERDICT_REAL rmin)
// in between, linearly interpolate
xy_to_rtheta();
// r() = sqrt( (2. - r()) * r() ) * gamma + r() * (1-gamma);
assert(gamma > 0.0);
//assert(gamma > 0.0);
if (gamma < 0)
gamma = 0.;
// the following limits should really be roundoff-based
if (r() > rmin*1.001 && r() < 1.001) {
r() = rmin + pow(r(), gamma) * (1.0 - rmin);
......@@ -7609,6 +7626,12 @@ void VerdictVector::scale_angle(VERDICT_REAL gamma, VERDICT_REAL )
rtheta_to_xy();
}
// Modifications:
//
// Hank Childs, Wed Apr 14 20:31:05 PDT 2004
// Do not assert.
//
VERDICT_REAL VerdictVector::vector_angle_quick(const VerdictVector& vec1,
const VerdictVector& vec2)
{
......@@ -7636,9 +7659,12 @@ VERDICT_REAL VerdictVector::vector_angle_quick(const VerdictVector& vec1,
VERDICT_REAL y = vec2 % ry;
VERDICT_REAL angle;
assert(x != 0.0 || y != 0.0);
//assert(x != 0.0 || y != 0.0);
angle = atan2(y, x);
if (x == 0 || y == 0)
angle = 0.;
else
angle = atan2(y, x);
if (angle < 0.0)
{
......
......@@ -897,13 +897,22 @@ inline VerdictVector& VerdictVector::operator*=(const VERDICT_REAL scalar)
return *this;
}
// Modifications:
//
// Hank Childs, Wed Apr 14 20:28:38 PDT 2004
// Do not assert.
//
// Scales all values by 1/scalar
inline VerdictVector& VerdictVector::operator/=(const VERDICT_REAL scalar)
{
assert (scalar != 0);
xVal /= scalar;
yVal /= scalar;
zVal /= scalar;
//assert (scalar != 0);
if (scalar != 0)
{
xVal /= scalar;
yVal /= scalar;
zVal /= scalar;
}
return *this;
}
......@@ -1362,6 +1371,12 @@ inline VERDICT_REAL length_squared (VERDICT_REAL vec[] )
}
// Modifications:
//
// Hank Childs, Wed Apr 14 20:28:38 PDT 2004
// Do not assert.
//
inline VERDICT_REAL interior_angle( VERDICT_REAL vec1[], VERDICT_REAL vec2[] )
{
VERDICT_REAL len1, len2, cosAngle, angleRad;
......@@ -1372,8 +1387,11 @@ inline VERDICT_REAL interior_angle( VERDICT_REAL vec1[], VERDICT_REAL vec2[] )
}
else
{
/*
assert(len1 > 0);
assert(len2 > 0);
*/
cosAngle = 0.;
}
if ((cosAngle > 1.0) && (cosAngle < 1.0001))
......@@ -1390,7 +1408,8 @@ inline VERDICT_REAL interior_angle( VERDICT_REAL vec1[], VERDICT_REAL vec2[] )
angleRad = acos(cosAngle);
else
{
assert(cosAngle < 1.0001 && cosAngle > -1.0001);
//assert(cosAngle < 1.0001 && cosAngle > -1.0001);
angleRad = 0.;
}
return( (angleRad * 180.) / VERDICT_PI );
......
......@@ -64,6 +64,12 @@ fi
PYDIR=$VISITHOME/python/aix_5_ll
PYVERSION=python2.1
##
## Exodus
##
DEFAULT_EXODUS_INCLUDES=$VISITHOME/exodus/aix/inc
DEFAULT_EXODUS_LIBRARY=$VISITHOME/exodus/aix/lib
#
# HDF5
#
......
......@@ -64,6 +64,12 @@ fi
PYDIR=$VISITHOME/python/aix_5_ll
PYVERSION=python2.1
##
## Exodus
##
DEFAULT_EXODUS_INCLUDES=$VISITHOME/exodus/aix/inc
DEFAULT_EXODUS_LIBRARY=$VISITHOME/exodus/aix/lib
#
# HDF5
#
......
......@@ -64,6 +64,12 @@ fi
PYDIR=$VISITHOME/python/aix_5_ll
PYVERSION=python2.1
##
## Exodus
##
DEFAULT_EXODUS_INCLUDES=$VISITHOME/exodus/aix/inc
DEFAULT_EXODUS_LIBRARY=$VISITHOME/exodus/aix/lib
#
# HDF5
#
......
......@@ -64,6 +64,12 @@ fi
PYDIR=$VISITHOME/python/aix_5_ll
PYVERSION=python2.1
##
## Exodus
##
DEFAULT_EXODUS_INCLUDES=$VISITHOME/exodus/aix/inc
DEFAULT_EXODUS_LIBRARY=$VISITHOME/exodus/aix/lib
#
# HDF5
#
......
......@@ -64,6 +64,12 @@ fi
PYDIR=$VISITHOME/python/aix_5_ll
PYVERSION=python2.1
##
## Exodus
##
DEFAULT_EXODUS_INCLUDES=$VISITHOME/exodus/aix/inc
DEFAULT_EXODUS_LIBRARY=$VISITHOME/exodus/aix/lib
#
# HDF5
#
......
......@@ -644,11 +644,17 @@ avtBoundaryPlot::ReleaseData(void)
// Programmer: Jeremy Meredith
// Creation: May 7, 2003
//
// Note: original copied from avtSubsetPlot
//
// Modifications:
//
// Hank Childs, Thu Mar 18 21:18:06 PST 2004
// Re-wrote quadratic algorithm.
//
// Jeremy Meredith, Thu Apr 15 12:19:21 PDT 2004
// Allowed for zero-length arrays. This probably shouldn't happen in
// practice, but a different bug was causing a crash here.
//
// ****************************************************************************
void
......@@ -675,11 +681,10 @@ avtBoundaryPlot::SortLabels()
vector < pair < int, string > > sortedUsedLabels;
for (i = 0 ; i < usedLabels.size() ; i++)
{
while (usedLabels[i] != originalLabelPairs[origLabelIndex].first)
while (origLabelIndex < originalLabelPairs.size() &&
usedLabels[i] != originalLabelPairs[origLabelIndex].first)
{
origLabelIndex++;
if (origLabelIndex >= originalLabelPairs.size())
break;
}
if (origLabelIndex >= originalLabelPairs.size())
......
......@@ -1104,12 +1104,15 @@ PyFilledBoundaryAttributes_SetLogging(bool val)
FilledBoundaryAttributesEnableLogging = val;
}
// ****************************************************************************
// Modifications:
// Kathleen Bonnell, Fri Jul 18 13:49:42 PDT 2003
// Make defaultAtts point to the passed atts directly.
//
// ****************************************************************************
void
PyFilledBoundaryAttributes_SetDefaults(const FilledBoundaryAttributes *atts)
{
if(defaultAtts)
delete defaultAtts;
defaultAtts = new FilledBoundaryAttributes(*atts);
defaultAtts = const_cast<FilledBoundaryAttributes*>(atts);
}
......@@ -789,11 +789,17 @@ avtFilledBoundaryPlot::ReleaseData(void)
// Programmer: Jeremy Meredith
// Creation: May 9, 2003
//
// Note: original copied from avtSubsetPlot
//
// Modifications:
//
// Hank Childs, Thu Mar 18 21:18:06 PST 2004
// Re-wrote quadratic algorithm.
//
// Jeremy Meredith, Thu Apr 15 12:19:21 PDT 2004
// Allowed for zero-length arrays. This probably shouldn't happen in
// practice, but a different bug was causing a crash here.
//
// ****************************************************************************
void
......@@ -820,11 +826,10 @@ avtFilledBoundaryPlot::SortLabels()
vector < pair < int, string > > sortedUsedLabels;
for (i = 0 ; i < usedLabels.size() ; i++)
{
while (usedLabels[i] != originalLabelPairs[origLabelIndex].first)
while (origLabelIndex < originalLabelPairs.size() &&
usedLabels[i] != originalLabelPairs[origLabelIndex].first)
{
origLabelIndex++;
if (origLabelIndex >= originalLabelPairs.size())
break;
}
if (origLabelIndex >= originalLabelPairs.size())
......
......@@ -847,6 +847,10 @@ avtSubsetPlot::ReleaseData(void)
// Hank Childs, Thu Mar 18 21:18:06 PST 2004
// Re-wrote quadratic algorithm.
//
// Jeremy Meredith, Thu Apr 15 12:19:21 PDT 2004
// Allowed for zero-length arrays. This probably shouldn't happen in
// practice, but a different bug was causing a crash here.
//
// ****************************************************************************
void
......@@ -873,11 +877,10 @@ avtSubsetPlot::SortLabels()
vector < pair < int, string > > sortedUsedLabels;
for (i = 0 ; i < usedLabels.size() ; i++)
{
while (usedLabels[i] != originalLabelPairs[origLabelIndex].first)
while (origLabelIndex < originalLabelPairs.size() &&
usedLabels[i] != originalLabelPairs[origLabelIndex].first)
{
origLabelIndex++;
if (origLabelIndex >= originalLabelPairs.size())
break;
}
if (origLabelIndex >= originalLabelPairs.size())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment