Commit c3db4763 authored by hrchilds's avatar hrchilds

Update from June 27, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23 18c085ea-50e0-402c-830e-de6fd14e8384
parent c703b77d
......@@ -301,6 +301,37 @@ SumDoubleArrayAcrossAllProcessors(double *inArray, double *outArray,int nArray)
}
// ****************************************************************************
// Function: SumFloatArrayAcrossAllProcessors
//
// Purpose:
// Sums an array of floats across all processors.
//
// Arguments:
// inArray The input.
// outArray The sums of the inArrays across all processors.
// nArray The number of entries in inArray/outArray.
//
// Programmer: Hank Childs
// Creation: June 26, 2002
//
// ****************************************************************************
void
SumFloatArrayAcrossAllProcessors(float *inArray, float *outArray, int nArray)
{
#ifdef PARALLEL
MPI_Allreduce(inArray, outArray, nArray, MPI_FLOAT, MPI_SUM,
MPI_COMM_WORLD);
#else
for (int i = 0 ; i < nArray ; i++)
{
outArray[i] = inArray[i];
}
#endif
}
// ****************************************************************************
// Function: SumFloatAcrossAllProcessors
//
......
......@@ -13,6 +13,7 @@ PIPELINE_API int PAR_Rank(void);
PIPELINE_API int PAR_Size(void);
PIPELINE_API void SumIntAcrossAllProcessors(int&);
PIPELINE_API void SumFloatAcrossAllProcessors(float&);
PIPELINE_API void SumFloatArrayAcrossAllProcessors(float *, float *, int);
PIPELINE_API void SumDoubleAcrossAllProcessors(double&);
PIPELINE_API void SumDoubleArrayAcrossAllProcessors(double *, double *,int);
PIPELINE_API void SumIntArrayAcrossAllProcessors(int *, int *, int);
......
......@@ -108,13 +108,21 @@ VisWinPlots::VisWinPlots(VisWindowColleagueProxy &p) : VisWinColleague(p)
// Mark C. Miller, Thu Dec 19 11:38:05 PST 2002
// Delete the externally rendered images actor
//
// Jeremy Meredith, Thu Jun 26 13:57:09 PDT 2003
// Delete the plot actors (since they contain pointers to the
// transparency actors) before delete the transparency actor itself.
//
// ****************************************************************************
VisWinPlots::~VisWinPlots()
{
//
// We don't own the plots, so we shouldn't delete them.
// The plots reference the transparency actor, so we need to free those up
// before the transparency actor is deleted. If there are additional
// references to these plots elsewhere, it may cause problems --
// especially if we ever allow plots to be added to multiple windows.
//
plots.clear();
if (bbox != NULL)
{
......
<?xml version="1.0"?>
<Plugin name="Histogram" type="plot" label="Histogram" version="1.0" vartype="scalar" iconFile="Histogram.xpm">
<Attribute name="HistogramAttributes" purpose="Attributes for Histogram Plot" persistent="false" exportAPI="" exportInclude="" codefile="HistogramAttributes.code">
<Enum name="OutputType">
Curve
Block
</Enum>
<Enum name="TwoDAmount">
Area
RevolvedVolume
</Enum>
<Field name="specifyRange" label="Specify Range?" type="bool">
false
</Field>
<Field name="min" label="Minimum" type="double" enabler="specifyRange:true">
0.000000
</Field>
<Field name="max" label="Maximum" type="double" enabler="specifyRange:true">
1.000000
</Field>
<Field name="outputType" label="Type of Output" type="enum" subtype="OutputType">
Block
</Field>
<Field name="numBins" label="Number of Bins" type="int">
32
</Field>
<Field name="twoDAmount" label="Calculate 2D based on" type="enum" subtype="TwoDAmount">
RevolvedVolume
</Field>
<Field name="lineStyle" label="Line Style" type="linestyle">
0
</Field>
<Field name="lineWidth" label="Line Width" type="linewidth">
0
</Field>
<Field name="color" label="Color" type="att" subtype="ColorAttribute">
</Field>
<Function name="ChangesRequireRecalculation" user="true" member="true">
</Function>
</Attribute>
</Plugin>
/* XPM */
static const char *Histogram_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 121 2",
/* colors */
" c #9AB6B8",
" . c #8AA2A5",
" X c #BCBFBF",
" o c #BBE0E2",
" O c #BBDEE2",
" + c #BADEE1",
" @ c #92A5A6",
" # c #BBDCE2",
" $ c #88A2A6",
" % c #BAE0E4",
" & c #B9E0E3",
" * c #8EA5A5",
" = c #FEFFFF",
" - c #92A9AC",
" ; c #9FA5A5",
" : c #F9F9FA",
" > c #8AA1A4",
" , c #BDBEBF",
" < c #BCBEBE",
" 1 c #AECFD1",
" 2 c #B3B6B5",
" 3 c #E5E5E6",
" 4 c #B9DBDF",
" 5 c #E4E5E5",
" 6 c #E3E5E4",
" 7 c #89A3A6",
" 8 c #B5D7DB",
" 9 c #8C9795",
" 0 c #B3B8B8",
" q c #BCDFE5",
" w c #BBDFE4",
" e c #97A3A3",
" r c #878F90",
" t c #8FA4A5",
" y c #CDCFCE",
" u c #9DA9AC",
" i c #FFFEFF",
" p c #FEFEFE",
" a c #FCFCFC",
" s c #8FA6A8",
" d c #869192",
" f c #F2F2F2",
" g c #B2B3B3",
" h c #A7B2B2",
" j c #8AA2A6",
" k c #B8D8DD",
" l c #7E8D8D",
" z c #97B2B6",
" x c #8FAAAE",
" c c #8EAAAD",
" v c #BADEE2",
" b c #7C8D8E",
" n c #9DAAAB",
" m c #FFFFFE",
" M c #899494",
" N c #BAE0E5",
" B c #FBFBFA",
" V c #9FAEB0",
" C c #8AA1A5",
" Z c #BCBEBF",
" A c #90ABAE",
" S c #BCDFE3",
" D c #BBDFE2",
" F c #748082",
" G c #BADDE1",
" H c #95B3B6",
" J c #9EA9AB",
" K c #B3B8B9",
" L c #B3B6B9",
" P c #BAE1E4",
" I c #878F91",
" U c #FEFEFF",
" Y c #9AA9AA",
" T c #C4C3C6",
" R c #9AB6B7",
" E c #8AA2A4",
" W c #BCBFBE",
" Q c #BCBDBE",
" ! c #93A5A6",
" ~ c #BADAE0",
" ^ c #E4E6E5",
" / c #88A2A5",
" ( c #96B2B6",
" ) c #E1E0E2",
" _ c #768786",
" ` c #BBE0E4",
" ' c #BAE0E3",
" ] c #9DAAAC",
" [ c #9DA8AC",
".0 c #FFFFFF",
" } c #9BAAAA",
" | c #FEFFFE",
". c #9AA6A9",
".. c #FBFBFB",
".X c #FAFBFA",
".o c #F9F9F9",
".O c #ABC9CA",
".+ c #8BA1A4",
".@ c #F1F1F1",
".# c #95AFB1",
".$ c #90ABAC",
".% c #AECFD0",
".& c #8CA5A8",
".* c #E6E5E6",
".= c #8AA3A6",
".- c #E4E3E4",
".; c #B8D9DD",
".: c #849FA0",
".> c #778686",
"., c #8EABAD",
".< c #BCDFE4",
".1 c #BBDFE3",
".2 c #93A4A8",
".3 c #B9DDE1",
".4 c #95B3B7",
".5 c #FEFEFD",
".6 c #868F91",
".7 c #A0AFB1",
".8 c #8D979B",
".9 c #7F9297",
".0 c None",
/* pixels */
".0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 5 2 2 2 2 6",
".0.0.0.0.0.0.0.0.0 a B B.X.. =.0.0.0.0.0.0.0.0.0.0.0 Q 4 + + ~ Z",
".0.0.0.0.0.0.0.0 m.8.&.&.& _ U.0.0.0.0.0.0.0.0.0.0.0 Q G ' ' # X",
".0.0.0.0.0.0.0.0 | V ' ' ' - |.0.0.0.0.0.0.0.0.0.0.0 Q G ' ' # X",
".0.0.0.0.0.0.0.0 | V ' ' ' - |.0.0.0 = = = =.0.0.0.0 Q G ' ' # X",
".0.0.0.0.0.0.0.0 | V ' ' ' - |.0.0.0 U U i U p.0.0.0 Q G ' ' # X",
".0.0.0.0.0.0.0.0 | V ' ' ' - |.0.0 :.> * t t ; =.0.0 Q G ' ' # X",
".0.0.0.0 p p p p.5.7 ' ' ' - |.0 =.o.$ ' ' ` h =.0.0 Q G ' ' # X",
".0.0.0.0 f l ! @.2.9 ' ' ' - |.0 =.o.$ ' ' ` h =.0.0 Q G ' ' # X",
".0.0.0.0.@ ( q N P C ' ' ' - |.0 =.o.$ ' ' ` h =.0.0 Q G ' ' # X",
".0.0.0.0.@ H % & % E ' ' ' s ^.* 3 ) A ' ' ` h =.0.0 Q G ' ' # X",
".0.0.0.0.@ H % ' % E ' ' '.: R .# c ' ' ` h =.0.0 Q G ' ' # X",
".0.0.0.0.@ H % ' % E ' ' ' $ o ' ' 8., ' ' ' b Y Y Y F v & ' # X",
".0.0.0.0.@ H % ' % E ' ' ' $ o ' ' 8., ' ' & . % w w.= v & ' # X",
".0.0.0.0.@ H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
".0.0.0.0.@ H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
".0.0.0.0.@ H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
".- Z < , g H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" L.; k k.O.4 % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" K o ' o 1 H % ' % E ' ' ' $ o ' ' 8., ' ' ' / ` ' ' 7 v & ' # X",
" 0 ' w.1.% z % w.1 > w w w j D w S 8 x w w w.+ ` w w 7 O.< w.3 W",
" T ] n u e 9 J n ] I ] ] n.6 ] ] n. M n ] ] r ] n n d [ n n } y"
};
This diff is collapsed.
Function: ChangesRequireRecalculation
Declaration: bool ChangesRequireRecalculation(const HistogramAttributes &) const;
Definition:
bool
HistogramAttributes::ChangesRequireRecalculation(const HistogramAttributes &obj) const
{
if (specifyRange != obj.GetSpecifyRange())
return true;
if (specifyRange && (min != obj.GetMin()))
return true;
if (specifyRange && (max != obj.GetMax()))
return true;
if (outputType != obj.GetOutputType())
return true;
if (numBins != obj.GetNumBins())
return true;
if (twoDAmount != obj.GetTwoDAmount())
return true;
return false;
}
#ifndef HISTOGRAMATTRIBUTES_H
#define HISTOGRAMATTRIBUTES_H
#include <string>
#include <AttributeSubject.h>
#include <ColorAttribute.h>
// ****************************************************************************
// Class: HistogramAttributes
//
// Purpose:
// Attributes for Histogram Plot
//
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Jun 26 10:33:55 PDT 2003
//
// Modifications:
//
// ****************************************************************************
class HistogramAttributes : public AttributeSubject
{
public:
enum OutputType
{
Curve,
Block
};
enum TwoDAmount
{
Area,
RevolvedVolume
};
HistogramAttributes();
HistogramAttributes(const HistogramAttributes &obj);
virtual ~HistogramAttributes();
virtual void operator = (const HistogramAttributes &obj);
virtual bool operator == (const HistogramAttributes &obj) const;
virtual bool operator != (const HistogramAttributes &obj) const;
virtual const std::string TypeName() const;
virtual bool CopyAttributes(const AttributeGroup *);
virtual AttributeSubject *CreateCompatible(const std::string &) const;
// Property selection methods
virtual void SelectAll();
void SelectColor();
// Property setting methods
void SetSpecifyRange(bool specifyRange_);
void SetMin(double min_);
void SetMax(double max_);
void SetOutputType(OutputType outputType_);
void SetNumBins(int numBins_);
void SetTwoDAmount(TwoDAmount twoDAmount_);
void SetLineStyle(int lineStyle_);
void SetLineWidth(int lineWidth_);
void SetColor(const ColorAttribute &color_);
// Property getting methods
bool GetSpecifyRange() const;
double GetMin() const;
double GetMax() const;
OutputType GetOutputType() const;
int GetNumBins() const;
TwoDAmount GetTwoDAmount() const;
int GetLineStyle() const;
int GetLineWidth() const;
const ColorAttribute &GetColor() const;
ColorAttribute &GetColor();
// Enum conversion functions
static std::string OutputType_ToString(OutputType);
static bool OutputType_FromString(const std::string &, OutputType &);
protected:
static std::string OutputType_ToString(int);
public:
static std::string TwoDAmount_ToString(TwoDAmount);
static bool TwoDAmount_FromString(const std::string &, TwoDAmount &);
protected:
static std::string TwoDAmount_ToString(int);
public:
// Keyframing methods
virtual std::string GetFieldName(int index) const;
virtual AttributeGroup::FieldType GetFieldType(int index) const;
virtual std::string GetFieldTypeName(int index) const;
virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const;
// User-defined methods
bool ChangesRequireRecalculation(const HistogramAttributes &) const;
private:
bool specifyRange;
double min;
double max;
int outputType;
int numBins;
int twoDAmount;
int lineStyle;
int lineWidth;
ColorAttribute color;
};
#endif
package llnl.visit.plots;
import llnl.visit.AttributeSubject;
import llnl.visit.CommunicationBuffer;
import llnl.visit.Plugin;
import llnl.visit.ColorAttribute;
// ****************************************************************************
// Class: HistogramAttributes
//
// Purpose:
// Attributes for Histogram Plot
//
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Thu Jun 26 10:33:56 PDT 2003
//
// Modifications:
//
// ****************************************************************************
public class HistogramAttributes extends AttributeSubject implements Plugin
{
// Constants
public final static int OUTPUTTYPE_CURVE = 0;
public final static int OUTPUTTYPE_BLOCK = 1;
public final static int TWODAMOUNT_AREA = 0;
public final static int TWODAMOUNT_REVOLVEDVOLUME = 1;
public HistogramAttributes()
{
super(9);
specifyRange = false;
min = 0;
max = 1;
outputType = OUTPUTTYPE_BLOCK;
numBins = 32;
twoDAmount = TWODAMOUNT_REVOLVEDVOLUME;
lineStyle = 0;
lineWidth = 0;
color = new ColorAttribute();
}
public HistogramAttributes(HistogramAttributes obj)
{
super(9);
specifyRange = obj.specifyRange;
min = obj.min;
max = obj.max;
outputType = obj.outputType;
numBins = obj.numBins;
twoDAmount = obj.twoDAmount;
lineStyle = obj.lineStyle;
lineWidth = obj.lineWidth;
color = new ColorAttribute(obj.color);
SelectAll();
}
public boolean equals(HistogramAttributes obj)
{
// Create the return value
return ((specifyRange == obj.specifyRange) &&
(min == obj.min) &&
(max == obj.max) &&
(outputType == obj.outputType) &&
(numBins == obj.numBins) &&
(twoDAmount == obj.twoDAmount) &&
(lineStyle == obj.lineStyle) &&
(lineWidth == obj.lineWidth) &&
(color == obj.color));
}
public String GetName() { return "Histogram"; }
public String GetVersion() { return "1.0"; }
// Property setting methods
public void SetSpecifyRange(boolean specifyRange_)
{
specifyRange = specifyRange_;
Select(0);
}
public void SetMin(double min_)
{
min = min_;
Select(1);
}
public void SetMax(double max_)
{
max = max_;
Select(2);
}
public void SetOutputType(int outputType_)
{
outputType = outputType_;
Select(3);
}
public void SetNumBins(int numBins_)
{
numBins = numBins_;
Select(4);
}
public void SetTwoDAmount(int twoDAmount_)
{
twoDAmount = twoDAmount_;
Select(5);
}
public void SetLineStyle(int lineStyle_)
{
lineStyle = lineStyle_;
Select(6);
}
public void SetLineWidth(int lineWidth_)
{
lineWidth = lineWidth_;
Select(7);
}
public void SetColor(ColorAttribute color_)
{
color = color_;
Select(8);
}
// Property getting methods
public boolean GetSpecifyRange() { return specifyRange; }
public double GetMin() { return min; }
public double GetMax() { return max; }
public int GetOutputType() { return outputType; }
public int GetNumBins() { return numBins; }
public int GetTwoDAmount() { return twoDAmount; }
public int GetLineStyle() { return lineStyle; }
public int GetLineWidth() { return lineWidth; }
public ColorAttribute GetColor() { return color; }
// Write and read methods.
public void WriteAtts(CommunicationBuffer buf)
{
if(WriteSelect(0, buf))
buf.WriteBool(specifyRange);
if(WriteSelect(1, buf))
buf.WriteDouble(min);
if(WriteSelect(2, buf))
buf.WriteDouble(max);
if(WriteSelect(3, buf))
buf.WriteInt(outputType);
if(WriteSelect(4, buf))
buf.WriteInt(numBins);
if(WriteSelect(5, buf))
buf.WriteInt(twoDAmount);
if(WriteSelect(6, buf))
buf.WriteInt(lineStyle);
if(WriteSelect(7, buf))
buf.WriteInt(lineWidth);
if(WriteSelect(8, buf))
color.Write(buf);
}
public void ReadAtts(int n, CommunicationBuffer buf)
{
for(int i = 0; i < n; ++i)
{
int index = (int)buf.ReadByte();
switch(index)
{
case 0:
SetSpecifyRange(buf.ReadBool());
break;
case 1:
SetMin(buf.ReadDouble());
break;
case 2:
SetMax(buf.ReadDouble());
break;
case 3:
SetOutputType(buf.ReadInt());
break;
case 4:
SetNumBins(buf.ReadInt());
break;
case 5:
SetTwoDAmount(buf.ReadInt());
break;
case 6:
SetLineStyle(buf.ReadInt());
break;
case 7:
SetLineWidth(buf.ReadInt());
break;
case 8:
color.Read(buf);
Select(8);
break;
}
}
}
// Attributes
private boolean specifyRange;
private double min;
private double max;
private int outputType;
private int numBins;
private int twoDAmount;
private int lineStyle;
private int lineWidth;
private ColorAttribute color;
}
// ************************************************************************* //
// File: HistogramCommonPluginInfo.C
// ************************************************************************* //
#include <HistogramPluginInfo.h>
#include <HistogramAttributes.h>
// ****************************************************************************
// Method: HistogramCommonPluginInfo::AllocAttributes
//
// Purpose:
// Return a pointer to a newly allocated attribute subject.
//
// Returns: A pointer to the newly allocated attribute subject.
//
// Programmer: childs -- generated by xml2info
// Creation: Thu Jun 26 10:33:56 PDT 2003
//
// ****************************************************************************
AttributeSubject *
HistogramCommonPluginInfo::AllocAttributes()
{
return new HistogramAttributes;
}
// ****************************************************************************
// Method: HistogramCommonPluginInfo::CopyAttributes
//
// Purpose:
// Copy a Histogram attribute subject.
//
// Arguments:
// to The destination attribute subject.
// from The source attribute subject.
//
// Programmer: childs -- generated by xml2info
// Creation: Thu Jun 26 10:33:56 PDT 2003
//
// ****************************************************************************
void
HistogramCommonPluginInfo::CopyAttributes(AttributeSubject *to,
AttributeSubject *from)
{
*((HistogramAttributes *) to) = *((HistogramAttributes *) from);
}
// ************************************************************************* //
// File: HistogramEnginePluginInfo.C
// ************************************************************************* //
#include <HistogramPluginInfo.h>
#include <avtHistogramPlot.h>
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the Histogram plot.
//
// Programmer: childs -- generated by xml2info
// Creation: Thu Jun 26 10:33:56 PDT 2003
//
// ****************************************************************************
extern "C" EnginePlotPluginInfo* GetEngineInfo()
{
return new HistogramEnginePluginInfo;
}
// ****************************************************************************
// Method: HistogramEnginePluginInfo::AllocAvtPlot
//
// Purpose:
// Return a pointer to a newly allocated avt plot.
//
// Returns: A pointer to the newly allocated avt plot.
//
// Programmer: childs -- generated by xml2info
// Creation: Thu Jun 26 10:33:56 PDT 2003
//
// ****************************************************************************
avtPlot *
HistogramEnginePluginInfo::AllocAvtPlot()
{
return new avtHistogramPlot;
}
// ************************************************************************* //
// File: HistogramGUIPluginInfo.C
// ************************************************************************* //
#include <HistogramPluginInfo.h>
#include <HistogramAttributes.h>
#include <QvisHistogramPlotWindow.h>
// ****************************************************************************
// Function: GetGUIInfo
//
// Purpose:
// Return a new GUIPluginInfo for the Histogram plot.