Commit c3a7455c authored by Ken Martin's avatar Ken Martin
Browse files

merge from the main tree

parent a25f3ae2
......@@ -34,7 +34,7 @@
#include <math.h>
#include <stdio.h>
vtkCxxRevisionMacro(vtkBoxClipDataSet, "1.6");
vtkCxxRevisionMacro(vtkBoxClipDataSet, "1.6.2.1");
vtkStandardNewMacro(vtkBoxClipDataSet);
//----------------------------------------------------------------------------
......@@ -773,6 +773,7 @@ void vtkBoxClipDataSet::PyramidToTetra(vtkIdType *pyramId, vtkIdType *cellIds,v
//
//
//----------------------------------------------------------------------------
void vtkBoxClipDataSet::TetraGrid(vtkIdType typeobj, vtkIdType npts, vtkIdType *cellIds,vtkCellArray *newCellArray)
{
vtkIdType tab[4];
......@@ -1132,8 +1133,7 @@ void vtkBoxClipDataSet::TetraGrid(vtkIdType typeobj, vtkIdType npts, vtkIdType *
}
break;
case 5: //VTK_PYRAMID nptos:5
//Create 2 tetrahedra
case VTK_PYRAMID: //Create 2 tetrahedra
if(npts== 5)
{
//note: the first element vpyram[][0] is the smallest index of pyramid
......@@ -1158,6 +1158,10 @@ void vtkBoxClipDataSet::TetraGrid(vtkIdType typeobj, vtkIdType npts, vtkIdType *
exit(0);
}
break;
default:
cout << " unhandled type, awaiting fix for this " << typeobj << endl;
}
}
......
......@@ -92,7 +92,7 @@ static char * makeEntry(const char *s)
// Timing data ---------------------------------------------
vtkCxxRevisionMacro(vtkDistributedDataFilter, "1.13");
vtkCxxRevisionMacro(vtkDistributedDataFilter, "1.13.2.1");
vtkStandardNewMacro(vtkDistributedDataFilter);
......@@ -365,6 +365,57 @@ void vtkDistributedDataFilter::SetController(vtkMultiProcessController *c)
this->NumProcesses = c->GetNumberOfProcesses();
this->MyId = c->GetLocalProcessId();
}
void vtkDistributedDataFilter::AssignBoundaryCellsToOneRegionOn()
{
this->SetAssignBoundaryCellsToOneRegion(1);
}
void vtkDistributedDataFilter::AssignBoundaryCellsToOneRegionOff()
{
this->SetAssignBoundaryCellsToOneRegion(0);
}
void vtkDistributedDataFilter::SetAssignBoundaryCellsToOneRegion(int val)
{
if (val)
{
this->IncludeAllIntersectingCells = 0;
this->ClipCells = 0;
}
}
void
vtkDistributedDataFilter::AssignBoundaryCellsToAllIntersectingRegionsOn()
{
this->SetAssignBoundaryCellsToAllIntersectingRegions(1);
}
void
vtkDistributedDataFilter::AssignBoundaryCellsToAllIntersectingRegionsOff()
{
this->SetAssignBoundaryCellsToAllIntersectingRegions(0);
}
void
vtkDistributedDataFilter::SetAssignBoundaryCellsToAllIntersectingRegions(int val)
{
if (val)
{
this->IncludeAllIntersectingCells = 1;
this->ClipCells = 0;
}
}
void vtkDistributedDataFilter::DivideBoundaryCellsOn()
{
this->SetDivideBoundaryCells(1);
}
void vtkDistributedDataFilter::DivideBoundaryCellsOff()
{
this->SetDivideBoundaryCells(0);
}
void vtkDistributedDataFilter::SetDivideBoundaryCells(int val)
{
if (val)
{
this->IncludeAllIntersectingCells = 1;
this->ClipCells = 1;
}
}
//-------------------------------------------------------------------------
// Execute
//-------------------------------------------------------------------------
......
......@@ -162,6 +162,39 @@ public:
vtkGetMacro(ClipCells, int);
vtkSetMacro(ClipCells, int);
// Description:
// Another way to set ClipCells and IncludeAllIntersectingCells.
// AssignBoundaryCellsToOneRegion turns off both ClipCells and
// IncludeAllIntersectingCells. Each cell will be included in
// exactly one process' output unstructured grid.
void AssignBoundaryCellsToOneRegionOn();
void AssignBoundaryCellsToOneRegionOff();
void SetAssignBoundaryCellsToOneRegion(int val);
// Description:
// Another way to set ClipCells and IncludeAllIntersectingCells.
// AssignBoundaryCellsToAllIntersectingRegions turns off ClipCells
// turns on IncludeAllIntersectingCells. A cell will be included
// in the output unstructured grid built for every region that it
// intersects. If a cell intersects two process' spatial regions,
// both processes will have that cell in their output grid.
void AssignBoundaryCellsToAllIntersectingRegionsOn();
void AssignBoundaryCellsToAllIntersectingRegionsOff();
void SetAssignBoundaryCellsToAllIntersectingRegions(int val);
// Description:
// Another way to set ClipCells and IncludeAllIntersectingCells.
// DivideBoundaryCells turns on both ClipCells and
// IncludeAllIntersectingCells. A cell that straddles a processor
// boundary will be split along the boundary, with each process
// getting the portion of the cell that lies in it's spatial region.
void DivideBoundaryCellsOn();
void DivideBoundaryCellsOff();
void SetDivideBoundaryCells(int val);
// Description:
// Build a vtkUnstructuredGrid for a spatial region from the
// data distributed across processes. Execute() must be called
......@@ -296,6 +329,9 @@ private:
int RetainKdtree;
int IncludeAllIntersectingCells;
int ClipCells;
int AssignBoundaryCellsToOneRegion;
int AssignBoundaryCellsToAllIntersectingRegions;
int DivideBoundaryCells;
int Timing;
......
......@@ -67,7 +67,7 @@ static char * makeEntry(const char *s)
// Timing data ---------------------------------------------
vtkCxxRevisionMacro(vtkPKdTree, "1.12");
vtkCxxRevisionMacro(vtkPKdTree, "1.12.2.1");
vtkStandardNewMacro(vtkPKdTree);
const int vtkPKdTree::NoRegionAssignment = 0; // default
......@@ -728,6 +728,7 @@ int vtkPKdTree::DivideTest(int L, int R, int level)
return 1;
}
int vtkPKdTree::DivideRegion(vtkKdNode *kd, int L, int level, int tag)
{
int R = L + kd->GetNumberOfCells() - 1;
......@@ -753,22 +754,16 @@ int vtkPKdTree::DivideRegion(vtkKdNode *kd, int L, int level, int tag)
// couldn't divide along maxdim - all points we're at same location
// should probably try a different direction
kd->SetDim(3); // indicates region is not divided
FreeItem(this->SubGroup);
return 0;
}
float *newDataBounds = this->DataBounds(L, midpt, R);
if (newDataBounds == NULL)
{
FreeItem(this->SubGroup);
return -1;
}
vtkKdNode *left = new vtkKdNode();
vtkKdNode *right = new vtkKdNode();
int fail = ( (left == NULL) || (right == NULL) );
int fail = ( (newDataBounds == NULL) || (left == NULL) || (right == NULL) );
if (this->AllCheckForFailure(fail, "Divide Region", "memory allocation"))
{
......@@ -1819,12 +1814,13 @@ void vtkPKdTree::CheckFixRegionBoundaries(vtkKdNode *tree)
for (int dim=0; dim<3; dim++)
{
if ((left->Min[dim] - tree->Min[dim]) != 0.0) left->Min[dim] = tree->Min[dim];
if ((right->Max[dim] - tree->Max[dim]) != 0.0) right->Max[dim] = tree->Max[dim];
if (dim != nextDim) // the dimension I did *not* divide along
{
if ((left->Min[dim] - tree->Min[dim]) != 0.0) left->Min[dim] = tree->Min[dim];
if ((left->Max[dim] - tree->Max[dim]) != 0.0) left->Max[dim] = tree->Max[dim];
if ((right->Min[dim] - tree->Min[dim]) != 0.0) right->Min[dim] = tree->Min[dim];
if ((right->Max[dim] - tree->Max[dim]) != 0.0) right->Max[dim] = tree->Max[dim];
}
else
{
......
......@@ -23,7 +23,7 @@
#include "vtkSocketController.h"
#include "vtkTiledDisplaySchedule.h"
vtkCxxRevisionMacro(vtkPVDuplicatePolyData, "1.7");
vtkCxxRevisionMacro(vtkPVDuplicatePolyData, "1.7.2.1");
vtkStandardNewMacro(vtkPVDuplicatePolyData);
vtkCxxSetObjectMacro(vtkPVDuplicatePolyData,Controller, vtkMultiProcessController);
......@@ -53,6 +53,7 @@ vtkPVDuplicatePolyData::~vtkPVDuplicatePolyData()
}
this->SetController(0);
this->SetSocketController(0);
}
......
......@@ -20,7 +20,7 @@
#include "vtkPointsProjectedHull.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkPointsProjectedHull, "1.10.2.1");
vtkCxxRevisionMacro(vtkPointsProjectedHull, "1.10.2.2");
vtkStandardNewMacro(vtkPointsProjectedHull);
static const int xdim=0, ydim=1, zdim=2;
......
......@@ -17,7 +17,7 @@
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkTiledDisplaySchedule, "1.9");
vtkCxxRevisionMacro(vtkTiledDisplaySchedule, "1.9.2.1");
vtkStandardNewMacro(vtkTiledDisplaySchedule);
......@@ -454,7 +454,7 @@ void vtkTiledDisplaySchedule::InitializeTiles(int numTiles, int numProcs)
{
int tIdx, pIdx;
int sum, max;
int* totalProcessLengths;
int* totalProcessLengths=0;
vtkTiledDisplaySchedule* ts;
vtkTiledDisplayProcess* p;
int i, j;
......@@ -572,6 +572,7 @@ void vtkTiledDisplaySchedule::InitializeTiles(int numTiles, int numProcs)
tileSchedules[tIdx] = NULL;
}
delete [] tileSchedules;
delete [] totalProcessLengths;
}
//-------------------------------------------------------------------------
......
......@@ -1044,6 +1044,7 @@ static int kwsysProcessInitialize(kwsysProcess* cp)
memset(cp->CommandExitCodes, 0, sizeof(int)*cp->NumberOfCommands);
/* Allocate memory to save the real working directory. */
if ( cp->WorkingDirectory )
{
#if defined(MAXPATHLEN)
cp->RealWorkingDirectoryLength = MAXPATHLEN;
......
SET( ParaViewShared_SRCS
vtkDesktopDeliveryClient.cxx
vtkPVApplication.cxx
vtkPVClientServerModule.cxx
vtkPVExtentTranslator.cxx
......@@ -212,8 +213,6 @@ IF (PARAVIEW_USE_ICE_T)
SET( ParaViewClient_SRCS
${ParaViewClient_SRCS}
#vtkIceTComposite.cxx
vtkDesktopDeliveryClient.cxx
vtkDesktopDeliveryServer.cxx
vtkIceTFactory.cxx
vtkPVDeskTopRenderModule.cxx
vtkPVDeskTopRenderModuleUI.cxx
......@@ -224,6 +223,7 @@ IF (PARAVIEW_USE_ICE_T)
)
SET( ParaViewServer_SRCS
${ParaViewServer_SRCS}
vtkDesktopDeliveryServer.cxx
vtkIceTRenderManager.cxx
vtkIceTClientCompositeManager.cxx
vtkIceTRenderer.cxx
......
......@@ -286,7 +286,7 @@
menu_name="D3" root_name="D3"
module_type="Filter"
multiprocess_support="multiple_processes"
long_help="Repartition a data set."
long_help="Repartition a data set into load-balanced spatially convex regions."
short_help="Repartition a data set.">
<Filter class="vtkDistributedDataFilter">
<Input name="Input"
......@@ -295,15 +295,20 @@
<InputMenu trace_name="Input" label="Input"
help="Set the input to this filter."
input_name="Input"/>
<LabeledToggle label="Clip cells"
trace_name="ClipCells"
variable="ClipCells"
help="Turn this on if you want cells clipped to spatial boundary regions."
<LabeledToggle label="Assign cells uniquely"
trace_name="AssignBoundaryCellsToOneRegion"
variable="AssignBoundaryCellsToOneRegion"
help="Each cell is assigned to one process only (isosurfacing)"
default_value="1"/>
<LabeledToggle label="or Duplicate cells"
trace_name="AssignBoundaryCellsToAllIntersectingRegions"
variable="AssignBoundaryCellsToAllIntersectingRegions"
help="Cells on processor boundaries will be duplicated"
default_value="0"/>
<LabeledToggle label="Include all intersecting cells"
trace_name="IncludeAllIntersectingCells"
variable="IncludeAllIntersectingCells"
help="Turn this on if you want all cells that intersect spatial boundaries."
<LabeledToggle label="or Divide cells"
trace_name="DivideBoundaryCells"
variable="DivideBoundaryCells"
help="Cells on processor boundaries will be split (volume rendering)"
default_value="0"/>
<StringEntry variable="GlobalIdArrayName"
trace_name="GlobalIdArrayName"
......@@ -1725,6 +1730,7 @@
<Input name="Source"
class="vtkDataSet">
<GroupRequirement quantity="Single"/>
<ArrayRequirement attribute="Point"/>
</Input>
</Filter>
<SelectWidget type="object"
......
......@@ -62,7 +62,7 @@
long_help="3D arrow with a long cylindrical shaft and a cone for the tip."
short_help="Create a 3D arrow">
<Source class="vtkPVArrowSource"/>
<!-- Scales are used here because vtkSphereSource sets these ranges for these parameters. -->
<!-- Scales are used here because vtkArrowSource sets these ranges for these parameters. -->
<Scale label="Tip resolution" trace_name="TipResolution"
variable="TipResolution"
help="Set the number of faces on the tip."
......@@ -292,7 +292,7 @@
help="Set the radius of the sphere" />
<Scale label="Theta Resolution" trace_name="Theta Resolution"
variable="ThetaResolution"
default_value="8" resolution="1" data_range="3 1024"
default_value="8" resolution="1" range="3 1024"
display_entry="1" display_value="0" entry_and_label_on_top="0"
help="Set the number of points in the longitude direction (ranging from Start Theta to End Theta)" />
<Scale label="Start Theta" trace_name="Start Theta"
......
......@@ -57,7 +57,7 @@
#endif
vtkCxxRevisionMacro(vtkClientCompositeManager, "1.27");
vtkCxxRevisionMacro(vtkClientCompositeManager, "1.27.2.1");
vtkStandardNewMacro(vtkClientCompositeManager);
vtkCxxSetObjectMacro(vtkClientCompositeManager,Compositer,vtkCompositer);
......@@ -584,7 +584,6 @@ void vtkClientCompositeManager::EndRender()
vtkRenderer *ren = vtkRenderer::New();
ren->SetRenderWindow(this->RenderWindow);
ren->SetLayer(1);
renderers->ReplaceItem(0, ren);
vtkImageActor *imageActor = vtkImageActor::New();
......
......@@ -33,7 +33,7 @@
//#include <vtkRef.h>
vtkCxxRevisionMacro(vtkDesktopDeliveryClient, "1.13");
vtkCxxRevisionMacro(vtkDesktopDeliveryClient, "1.13.2.1");
vtkStandardNewMacro(vtkDesktopDeliveryClient);
vtkDesktopDeliveryClient::vtkDesktopDeliveryClient()
......@@ -105,13 +105,7 @@ void vtkDesktopDeliveryClient::PreRenderProcessing()
this->Controller->Receive(&this->RemoteDisplay, 1, this->ServerProcessId,
vtkDesktopDeliveryServer::REMOTE_DISPLAY_TAG);
if (this->RemoteDisplay)
{
// Turn swap buffers off so we can put the final image into the render
// window before it is shown to the viewer.
this->RenderWindow->SwapBuffersOff();
}
else
if ( ! this->RemoteDisplay)
{
if (this->ImageReductionFactor > 1)
{
......@@ -228,10 +222,6 @@ void vtkDesktopDeliveryClient::PostRenderProcessing()
}
this->RenderWindowImageUpToDate = true;
}
// Force swap buffers here.
this->RenderWindow->SwapBuffersOn();
this->RenderWindow->Frame();
}
else
{
......
......@@ -43,7 +43,7 @@ static void SatelliteEndParallelRender(vtkObject *caller,
unsigned long vtkNotUsed(event),
void *clientData, void *);
vtkCxxRevisionMacro(vtkDesktopDeliveryServer, "1.6");
vtkCxxRevisionMacro(vtkDesktopDeliveryServer, "1.6.2.1");
vtkStandardNewMacro(vtkDesktopDeliveryServer);
vtkDesktopDeliveryServer::vtkDesktopDeliveryServer()
......@@ -126,11 +126,18 @@ void vtkDesktopDeliveryServer
// Remove observers to RenderWindow. We use the prm instead.
if (this->ObservingRenderWindow)
{
this->RenderWindow->RemoveObserver(this->StartRenderTag);
this->RenderWindow->RemoveObserver(this->EndRenderTag);
vtkRendererCollection *rens = this->RenderWindow->GetRenderers();
vtkRenderer *ren;
rens->InitTraversal();
ren = rens->GetNextItem();
if (ren)
{
rens->RemoveObserver(this->StartRenderTag);
rens->RemoveObserver(this->EndRenderTag);
this->ObservingRenderWindow = false;
}
}
}
else
{
// Apparently we added and then removed a ParallelRenderManager.
......@@ -139,25 +146,30 @@ void vtkDesktopDeliveryServer
{
vtkCallbackCommand *cbc;
vtkRendererCollection *rens = this->RenderWindow->GetRenderers();
vtkRenderer *ren;
rens->InitTraversal();
ren = rens->GetNextItem();
if (ren)
{
this->ObservingRenderWindow = true;
cbc= vtkCallbackCommand::New();
cbc->SetCallback(::SatelliteStartRender);
cbc->SetClientData((void*)this);
this->StartRenderTag
= this->RenderWindow->AddObserver(vtkCommand::StartEvent,cbc);
// renWin will delete the cbc when the observer is removed.
= ren->AddObserver(vtkCommand::StartEvent,cbc);
cbc->Delete();
cbc = vtkCallbackCommand::New();
cbc->SetCallback(::SatelliteEndRender);
cbc->SetClientData((void*)this);
this->EndRenderTag
= this->RenderWindow->AddObserver(vtkCommand::EndEvent,cbc);
// renWin will delete the cbc when the observer is removed.
= ren->AddObserver(vtkCommand::EndEvent,cbc);
cbc->Delete();
}
}
}
}
void vtkDesktopDeliveryServer::SetRenderWindow(vtkRenderWindow *renWin)
......@@ -166,10 +178,17 @@ void vtkDesktopDeliveryServer::SetRenderWindow(vtkRenderWindow *renWin)
if (this->ObservingRenderWindow && this->ParallelRenderManager)
{
vtkRendererCollection *rens = this->RenderWindow->GetRenderers();
vtkRenderer *ren;
rens->InitTraversal();
ren = rens->GetNextItem();
if (ren)
{
// Don't need the observers we just attached.
this->RenderWindow->RemoveObserver(this->StartRenderTag);
this->RenderWindow->RemoveObserver(this->EndRenderTag);
ren->RemoveObserver(this->StartRenderTag);
ren->RemoveObserver(this->EndRenderTag);
this->ObservingRenderWindow = false;
}
}
}
......
......@@ -170,7 +170,7 @@ public:
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVAnimationInterface);
vtkCxxRevisionMacro(vtkPVAnimationInterface, "1.102.2.2");
vtkCxxRevisionMacro(vtkPVAnimationInterface, "1.102.2.3");
vtkCxxSetObjectMacro(vtkPVAnimationInterface,ControlledWidget, vtkPVWidget);
......@@ -947,6 +947,15 @@ void vtkPVAnimationInterface::SetCurrentTime(int time)
{
vtkPVAnimationInterfaceEntry* entry
= vtkPVAnimationInterfaceEntry::SafeDownCast(it->GetObject());
if ( entry->GetCustomScript() )
{
if ( entry->GetScript() )
{
this->Script(entry->GetScript());
}
}
else
{
vtkPVWidgetProperty *prop = entry->GetCurrentProperty();
if (prop)
{
......@@ -957,6 +966,7 @@ void vtkPVAnimationInterface::SetCurrentTime(int time)
if ( entry->GetPVSource() )
{
entry->GetPVSource()->UpdateVTKSourceParameters();
}
}
}
......@@ -1190,7 +1200,6 @@ void vtkPVAnimationInterface::SaveImagesCallback()
saveDialog->SaveDialogOn();
saveDialog->Create(this->Application, 0);
saveDialog->SetTitle("Save Animation Images");
saveDialog->SetDefaultExtension(".jpg");
saveDialog->SetFileTypes("{{jpeg} {.jpg}} {{tiff} {.tif}} {{Portable Network Graphics} {.png}}");
if ( saveDialog->Invoke() &&
......@@ -1329,7 +1338,6 @@ void vtkPVAnimationInterface::SaveGeometryCallback()
saveDialog->SaveDialogOn();
saveDialog->Create(this->Application, 0);
saveDialog->SetTitle("Save Animation Geometry");
saveDialog->SetDefaultExtension(".pvd");
saveDialog->SetFileTypes("{{ParaView Data Files} {.pvd}}");
if(saveDialog->Invoke() && (strlen(saveDialog->GetFileName()) > 0))
{
......
......@@ -68,7 +68,7 @@ public:
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVAnimationInterfaceEntry);
vtkCxxRevisionMacro(vtkPVAnimationInterfaceEntry, "1.25.2.1");
vtkCxxRevisionMacro(vtkPVAnimationInterfaceEntry, "1.25.2.2");
vtkCxxSetObjectMacro(vtkPVAnimationInterfaceEntry, CurrentProperty,
vtkPVWidgetProperty);
......@@ -76,6 +76,7 @@ vtkCxxSetObjectMacro(vtkPVAnimationInterfaceEntry, CurrentProperty,
//-----------------------------------------------------------------------------
vtkPVAnimationInterfaceEntry::vtkPVAnimationInterfaceEntry()
{
this->Parent = 0;
this->Observer = vtkPVAnimationInterfaceEntryObserver::New();
this->Observer->AnimationEntry = this;
this->DeleteEventTag = 0;
......@@ -375,6 +376,7 @@ void vtkPVAnimationInterfaceEntry::SwitchScriptTime(int i)
pvApp->Script("pack %s -fill x -expand 1 -pady 2 -padx 2",
this->DummyFrame->GetWidgetName());
this->GetMethodMenuButton()->SetButtonText("None");
this->CustomScript = 1;
}
}
......@@ -704,6 +706,10 @@ void vtkPVAnimationInterfaceEntry::SetCustomScript(const char* script)
this->CustomScript = 1;
this->Dirty = 1;
this->SetScript(script);
if ( !this->Parent )
{
return;
}
this->AddTraceEntry("$kw(%s) SetCustomScript {%s}", this->GetTclName(),
script);
this->GetMethodMenuButton()->SetButtonText("Script");
......@@ -888,5 +894,7 @@ void vtkPVAnimationInterfaceEntry::PrintSelf(ostream& os, vtkIndent indent)
<< (this->SaveStateScript?this->SaveStateScript:"(none") << endl;
os << indent << "CurrentProperty: " << this->CurrentProperty << endl;
os << indent << "CustomScript: " << this->CustomScript << endl;
}
......@@ -142,6 +142,10 @@ public:
// Set custom script
void SetCustomScript(const char* script);
// Description:
// Is the entry doing a custom script?
vtkGetMacro(CustomScript, int);
// Description:
// Prepare to be played or whatever.
void Prepare();
......
......@@ -101,7 +101,7 @@
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVApplication);
vtkCxxRevisionMacro(vtkPVApplication, "1.247.2.2");
vtkCxxRevisionMacro(vtkPVApplication, "1.247.2.3");
vtkCxxSetObjectMacro(vtkPVApplication, RenderModule, vtkPVRenderModule);
......@@ -850,77 +850,6 @@ int vtkPVApplication::ParseCommandLineArguments(int argc, char*argv[])
this->UseStereoRendering = 1;
}
#ifdef VTK_USE_MPI
// Temporarily removing this