Commit fa5ef929 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Refactoring code to use namespaces and reorganizing files.

We now have a singular "sensei" library providing the "sensei"
namespace.
parent c3cc1d50
find_package(ADIOS 1.9 REQUIRED)
add_library(adios INTERFACE)
target_link_libraries(adios INTERFACE ${ADIOS_LIBRARIES})
target_include_directories(adios SYSTEM INTERFACE ${ADIOS_INCLUDE_DIRS})
if(ADIOS_DEFINITIONS)
target_compile_definitions(adios INTERFACE ${ADIOS_DEFINITIONS})
endif()
......@@ -42,50 +42,19 @@ cmake_dependent_option(
#------------------------------------------------------------------------------
include(mpi)
if(ENABLE_ADIOS)
include(adios)
endif()
add_subdirectory(utils)
# Process subdirectories.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
if(ENABLE_SENSEI)
message(STATUS "Enabled: Sensei infrastructure.")
add_subdirectory(core)
add_subdirectory(sensei)
else()
message(STATUS "Disabled: Sensei infrastructure.")
endif()
if(ENABLE_SENSEI)
if(VTK_HAS_GENERIC_ARRAYS)
add_subdirectory(analysis/histogram)
endif()
add_subdirectory(analysis/configurable)
add_subdirectory(analysis/autocorrelation)
endif()
if(ENABLE_PARALLEL3D)
message(STATUS "Enabled: Parallel3D miniapp.")
add_subdirectory(miniapps/parallel3d)
else()
message(STATUS "Disabled: Parallel3D miniapp.")
endif()
if(ENABLE_OSCILLATORS)
message(STATUS "Enabled: Oscillators miniapp.")
add_subdirectory(miniapps/oscillators)
else()
message(STATUS "Disabled: Histogram miniapp.")
endif()
if(ENABLE_CATALYST)
message(STATUS "Enabled: Catalyst")
add_subdirectory(infrastructures/catalyst)
else()
message(STATUS "Disabled: Catalyst")
endif()
if(ENABLE_ADIOS)
message(STATUS "Enabled: ADIOS")
add_subdirectory(infrastructures/adios)
else()
message(STATUS "Disabled: ADIOS")
endif()
add_subdirectory(miniapps)
add_subdirectory(endpoints)
#------------------------------------------------------------------------------
if(ENABLE_SENSEI)
set(sources AutocorrelationAnalysisAdaptor.cxx)
else()
set(sources analysis.cpp)
endif()
add_library(autocorrelation STATIC ${sources})
target_compile_options(autocorrelation PRIVATE "-std=c++11")
target_include_directories(autocorrelation INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(autocorrelation PUBLIC mpi PRIVATE diy grid)
if (ENABLE_SENSEI)
target_link_libraries(autocorrelation PUBLIC core)
endif()
add_library(configurable STATIC vtkConfigurableAnalysisAdaptor.cxx)
target_link_libraries(configurable PUBLIC mpi core PRIVATE pugixml)
target_include_directories(configurable INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
if(VTK_HAS_GENERIC_ARRAYS)
target_link_libraries(configurable PRIVATE histogram)
target_compile_options(configurable PRIVATE ENABLE_HISTOGRAM)
endif()
target_link_libraries(configurable PRIVATE autocorrelation)
if(ENABLE_CATALYST)
target_link_libraries(configurable PRIVATE catalyst)
endif()
if(ENABLE_ADIOS)
target_link_libraries(configurable PRIVATE adios)
endif()
#-----------------------------------------------------------------------
set(sources
HistogramAnalysisAdaptor.cxx
HistogramAnalysisAdaptor.h)
#-----------------------------------------------------------------------
add_library(histogram STATIC ${sources})
target_include_directories(histogram INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(histogram PUBLIC mpi core)
#include "vtk_histogram.h"
#include <vtkAOSDataArrayTemplate.h>
#include <vtkArrayDispatch.h>
#include <vtkSOADataArrayTemplate.h>
namespace {
// Private worker for histogram method. Computes the local histogram on
// array (passed to operator()). To be used with vtkArrayDispatch.
//
// Inputs:
// range: Global range of data
// bins: Number of histogram bins
// array: Local data.
//
// Outputs:
// Histogram: The histogram of the local data.
struct HistogramWorker
{
const double *Range;
int Bins;
std::vector<unsigned int> Histogram;
HistogramWorker(const double *range, int bins) : Range(range), Bins(bins) {}
template <typename ArrayT>
void operator()(ArrayT *array)
{
assert(array);
assert(array->GetNumberOfComponents() == 1);
typedef typename ArrayT::ValueType ValueType;
ValueType width = static_cast<ValueType>((this->Range[1] - this->Range[0]) / this->Bins);
ValueType min = static_cast<ValueType>(this->Range[0]);
vtkIdType numTuples = array->GetNumberOfTuples();
this->Histogram.clear();
// + 1 to store val == max. These will be moved to this last bin before
// returning (Avoids having to branch in the loop below);
this->Histogram.resize(this->Bins + 1, 0);
for (vtkIdType tIdx = 0; tIdx < numTuples; ++tIdx)
{
int bin = static_cast<int>((array->GetComponent(tIdx, 0) - min) / width);
++this->Histogram[bin];
}
// Merge the last two bins (the last is only when val == max)
this->Histogram[this->Bins-1] += this->Histogram[this->Bins];
this->Histogram.resize(this->Bins);
}
};
} // end anon namespace
void vtk_histogram(MPI_Comm comm, vtkDataArray* array, int bins)
{
int rank;
MPI_Comm_rank(comm, &rank);
// find max and min.
double range[2];
array->GetRange(range);
double g_range[2];
// Find the global max/min
MPI_Allreduce(&range[0], &g_range[0], 1, MPI_DOUBLE, MPI_MIN, comm);
MPI_Allreduce(&range[1], &g_range[1], 1, MPI_DOUBLE, MPI_MAX, comm);
// Compute local histogram
HistogramWorker worker(g_range, bins);
// vtkArrayDispatch downcasts the array to a concrete typed implementation
// that provides faster access methods.
if (!vtkArrayDispatch::Dispatch::Execute(array, worker))
{
// This happens if vtkArrayDispatch doesn't know about the array subclass
// in use.
std::cerr << "HistogramWorker dispatch failed on rank " << rank << "!\n";
worker.Histogram.resize(bins, 0);
}
// Global histogram:
std::vector<unsigned int> gHist(bins, 0);
MPI_Reduce(&worker.Histogram[0], &gHist[0], bins, MPI_UNSIGNED, MPI_SUM, 0, comm);
if (rank == 0)
{
std::cout << "Histogram '" << array->GetName() << "' (VTK):\n";
double width = (g_range[1] - g_range[0]) / bins;
for (int i = 0; i < bins; ++i)
{
printf(" %f-%f: %d\n", g_range[0] + i*width, g_range[0] + (i+1)*width, gHist[i]);
}
}
}
#ifndef VTK_HISTOGRAM_H
#define VTK_HISTOGRAM_H
#include <mpi.h>
class vtkDataArray;
/// Parallel histogram implementation using array-layout independent
/// VTK's Generic Array infrastructure.
void vtk_histogram(MPI_Comm comm, vtkDataArray* array, int bins);
#endif
#-----------------------------------------------------------------------
set (sources
vtkInsituAnalysisAdaptor.cxx
vtkInsituAnalysisAdaptor.h
vtkInsituDataAdaptor.cxx
vtkInsituDataAdaptor.h
)
#-----------------------------------------------------------------------
find_package(VTK QUIET COMPONENTS vtkCommonDataModel)
if(NOT VTK_FOUND)
message(FATAL_ERROR "VTK (vtkCommonDataModel) is required for Sensei core "
"even when not using any infrastructures. Please set VTK_DIR to point to a "
"directory containing `VTKConfig.cmake`.")
endif()
add_library(core STATIC ${sources})
target_include_directories(core SYSTEM PUBLIC ${VTK_INCLUDE_DIRS}
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(core PUBLIC ${VTK_DEFINITIONS}
INTERFACE ENABLE_SENSEI)
target_link_libraries(core PUBLIC ${VTK_LIBRARIES})
/*=========================================================================
Program: Visualization Toolkit
Module: vtkInsituAnalysisAdaptor.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkInsituAnalysisAdaptor.h"
#include "vtkObjectFactory.h"
//----------------------------------------------------------------------------
vtkInsituAnalysisAdaptor::vtkInsituAnalysisAdaptor()
{
}
//----------------------------------------------------------------------------
vtkInsituAnalysisAdaptor::~vtkInsituAnalysisAdaptor()
{
}
//----------------------------------------------------------------------------
void vtkInsituAnalysisAdaptor::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkInsituAnalysisAdaptor.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkInsituAnalysisAdaptor
// .SECTION Description
// vtkInsituAnalysisAdaptor is an adaptor for any insitu analysis framework or
// algorithm. Concrete subclasses use vtkInsituDataAdaptor instance passed to
// the Execute() method to access simulation data for further processing.
#ifndef vtkInsituAnalysisAdaptor_h
#define vtkInsituAnalysisAdaptor_h
#include "vtkObjectBase.h"
#include "vtkSetGet.h"
class vtkInsituDataAdaptor;
class vtkInsituAnalysisAdaptor : public vtkObjectBase
{
public:
vtkTypeMacro(vtkInsituAnalysisAdaptor, vtkObjectBase);
void PrintSelf(ostream& os, vtkIndent indent);
virtual bool Execute(vtkInsituDataAdaptor* data) = 0;
protected:
vtkInsituAnalysisAdaptor();
~vtkInsituAnalysisAdaptor();
private:
vtkInsituAnalysisAdaptor(const vtkInsituAnalysisAdaptor&); // Not implemented.
void operator=(const vtkInsituAnalysisAdaptor&); // Not implemented.
};
#endif
......@@ -9,10 +9,8 @@
#include <opts/opts.h>
#include <mpi.h>
#include <iostream>
#include <adios.h>
#include <adios_read.h>
#include <vtkADIOSDataAdaptor.h>
#include <vtkConfigurableAnalysisAdaptor.h>
#include <sensei/adios/DataAdaptor.h>
#include <sensei/ConfigurableAnalysis.h>
#include <vtkNew.h>
#include <vtkDataSet.h>
......@@ -55,10 +53,10 @@ int main(int argc, char** argv)
readmethods["dimes"] = ADIOS_READ_METHOD_DIMES;
readmethods["flexpath"] = ADIOS_READ_METHOD_FLEXPATH;
vtkNew<vtkConfigurableAnalysisAdaptor> analysis;
vtkNew<sensei::ConfigurableAnalysis> analysis;
analysis->Initialize(comm, config_file);
vtkNew<vtkADIOSDataAdaptor> dataAdaptor;
vtkNew<sensei::adios::DataAdaptor> dataAdaptor;
dataAdaptor->Open(comm, readmethods[readmethod], input);
do
{
......
if (ENABLE_ADIOS)
#------------------------------------------------------------------------------
add_executable(ADIOSAnalysisEndPoint ADIOSAnalysisEndPoint.cxx)
target_link_libraries(ADIOSAnalysisEndPoint PRIVATE opts mpi adios sensei)
endif()
set(sources
vtkCatalystAnalysisAdaptor.cxx
vtkCatalystSlicePipeline.cxx)
#------------------------------------------------------------------------------
find_package(ParaView QUIET COMPONENTS vtkPVCatalyst)
if(NOT ParaView_FOUND)
message(FATAL_ERROR "Catalyst analysis components require Catalyst build (or "
"install directory. Please set ParaView_DIR to point to "
"directory containing `ParaViewConfig.cmake`.")
endif()
add_library(catalyst STATIC ${sources})
target_include_directories(catalyst
SYSTEM PUBLIC ${PARAVIEW_INCLUDE_DIRS}
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(catalyst
PUBLIC ${VTK_DEFINITIONS}
INTERFACE ENABLE_CATALYST)
target_link_libraries(catalyst
PUBLIC ${VTK_LIBRARIES}
PUBLIC core)
if(ENABLE_PARALLEL3D)
message(STATUS "Enabled: Parallel3D miniapp.")
add_subdirectory(parallel3d)
else()
message(STATUS "Disabled: Parallel3D miniapp.")
endif()
if(ENABLE_OSCILLATORS)
message(STATUS "Enabled: Oscillators miniapp.")
add_subdirectory(oscillators)
else()
message(STATUS "Disabled: Oscillators miniapp.")
endif()
......@@ -26,5 +26,5 @@ find_package(Threads)
target_link_libraries(oscillator PRIVATE util ${CMAKE_THREAD_LIBS_INIT})
if(ENABLE_SENSEI)
target_link_libraries(oscillator PRIVATE core configurable)
target_link_libraries(oscillator PRIVATE sensei)
endif()
......@@ -3,16 +3,15 @@
#include "dataadaptor.h"
#include <vector>
#include <vtkConfigurableAnalysisAdaptor.h>
#include <sensei/ConfigurableAnalysis.h>
#include <vtkDataObject.h>
#include <vtkInsituAnalysisAdaptor.h>
#include <vtkNew.h>
#include <vtkSmartPointer.h>
namespace bridge
{
static vtkSmartPointer<oscillators::DataAdaptor> GlobalDataAdaptor;
static vtkSmartPointer<vtkConfigurableAnalysisAdaptor> GlobalAnalysisAdaptor;
static vtkSmartPointer<sensei::ConfigurableAnalysis> GlobalAnalysisAdaptor;
//-----------------------------------------------------------------------------
void initialize(MPI_Comm world,
......@@ -36,7 +35,7 @@ void initialize(MPI_Comm world,
from_z[cc], to_z[cc]);
}
GlobalAnalysisAdaptor = vtkSmartPointer<vtkConfigurableAnalysisAdaptor>::New();
GlobalAnalysisAdaptor = vtkSmartPointer<sensei::ConfigurableAnalysis>::New();
GlobalAnalysisAdaptor->Initialize(world, config_file);
}
......
#ifndef OSCILLATORS_DATAADAPTOR_H
#define OSCILLATORS_DATAADAPTOR_H
#include <vtkInsituDataAdaptor.h>
#include <sensei/DataAdaptor.h>
namespace oscillators
{
class DataAdaptor : public vtkInsituDataAdaptor
class DataAdaptor : public sensei::DataAdaptor
{
public:
static DataAdaptor* New();
vtkTypeMacro(DataAdaptor, vtkInsituDataAdaptor);
vtkTypeMacro(DataAdaptor, sensei::DataAdaptor);
/// @brief Initialize the data adaptor.
///
......
#include "Bridge.h"
#include "DataAdaptor.h"
#include "vtkInsituAnalysisAdaptor.h"
#include "vtkNew.h"
#include "vtkDataObject.h"
#include "vtkConfigurableAnalysisAdaptor.h"
#include <sensei/ConfigurableAnalysis.h>
#include <vtkNew.h>
#include <vtkDataObject.h>
#include <vector>
namespace BridgeInternals
{
static vtkSmartPointer<parallel3d::DataAdaptor> GlobalDataAdaptor;
static vtkSmartPointer<vtkConfigurableAnalysisAdaptor> GlobalAnalysisAdaptor;
static vtkSmartPointer<sensei::ConfigurableAnalysis> GlobalAnalysisAdaptor;
}
//-----------------------------------------------------------------------------
......@@ -33,7 +32,7 @@ void bridge_initialize(MPI_Comm comm,
tot_blocks_x, tot_blocks_y, tot_blocks_z,
block_id_x, block_id_y, block_id_z);
BridgeInternals::GlobalAnalysisAdaptor = vtkSmartPointer<vtkConfigurableAnalysisAdaptor>::New();
BridgeInternals::GlobalAnalysisAdaptor = vtkSmartPointer<sensei::ConfigurableAnalysis>::New();
BridgeInternals::GlobalAnalysisAdaptor->Initialize(comm, config_file);
}
......
......@@ -17,5 +17,5 @@ target_compile_definitions(3D_Grid PRIVATE _FILE_OFFSET_BITS=64 _LARGEFILE64_SOU
target_link_libraries(3D_Grid PRIVATE m mpi)
if(ENABLE_SENSEI)
target_link_libraries(3D_Grid PRIVATE core configurable)
target_link_libraries(3D_Grid PRIVATE sensei)
endif()
#ifndef PARALLEL3D_DATAADAPTOR_H
#define PARALLEL3D_DATAADAPTOR_H
#include "vtkInsituDataAdaptor.h"
#include <sensei/DataAdaptor.h>
#include "vtkSmartPointer.h"
#include <map>
#include <string>
......@@ -14,11 +14,11 @@ namespace parallel3d
/// DataAdaptor is an adaptor for the parallel_3d simulation (miniapp).
/// Its purpose is to map the simulation datastructures to VTK
/// data model.
class DataAdaptor : public vtkInsituDataAdaptor
class DataAdaptor : public sensei::DataAdaptor
{
public:
static DataAdaptor* New();
vtkTypeMacro(DataAdaptor, vtkInsituDataAdaptor);
vtkTypeMacro(DataAdaptor, sensei::DataAdaptor);
/// Initialize the data adaptor.
void Initialize(
......
#include "AnalysisAdaptor.h"
#include "vtkObjectFactory.h"
namespace sensei
{
//----------------------------------------------------------------------------
AnalysisAdaptor::AnalysisAdaptor()
{
}
//----------------------------------------------------------------------------
AnalysisAdaptor::~AnalysisAdaptor()
{
}
//----------------------------------------------------------------------------
void AnalysisAdaptor::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
} // end of namespace sensei
#ifndef sensei_AnalysisAdaptor_h
#define sensei_AnalysisAdaptor_h
#include "vtkObjectBase.h"
#include "vtkSetGet.h"
namespace sensei
{
class DataAdaptor;
/// @class AnalysisAdaptor
/// @brief AnalysisAdaptor is an abstract base class that defines the analysis interface.
///
/// AnalysisAdaptor is an adaptor for any insitu analysis framework or
/// algorithm. Concrete subclasses use DataAdaptor instance passed to
/// the Execute() method to access simulation data for further processing.
class AnalysisAdaptor : public vtkObjectBase
{
public:
vtkTypeMacro(AnalysisAdaptor, vtkObjectBase);
void PrintSelf(ostream& os, vtkIndent indent);
/// @brief Execute the analysis routine.
///
/// This method is called to execute the analysis routine per simulation
/// iteration.
virtual bool Execute(DataAdaptor* data) = 0;
protected:
AnalysisAdaptor();
~AnalysisAdaptor();
private:
AnalysisAdaptor(const AnalysisAdaptor&); // Not implemented.
void operator=(const AnalysisAdaptor&); // Not implemented.
};
}
#endif
#include "AutocorrelationAnalysisAdaptor.h"
#include "Autocorrelation.h"
#include "DataAdaptor.h"
// VTK includes
#include <vtkCompositeDataIterator.h>
#include <vtkFieldData.h>
#include <vtkFloatArray.h>
#include <vtkImageData.h>
#include <vtkInsituDataAdaptor.h>
#include <vtkMultiBlockDataSet.h>
#include <vtkObjectFactory.h>
#include <vtkSmartPointer.h>
......@@ -20,6 +22,7 @@
#include <grid/grid.h>
#include <grid/vertices.h>
// http://stackoverflow.com/a/12580468
template<typename T, typename ...Args>
std::unique_ptr<T> make_unique( Args&& ...args )
......@@ -37,14 +40,17 @@ namespace diy { namespace mpi { namespace detail {
template<class U> struct mpi_op< add_vectors<U> > { static MPI_Op get() { return MPI_SUM; } };
} } }
namespace sensei
{
using GridRef = grid::GridRef<float,3>;
using Vertex = GridRef::Vertex;
using Vertex4D = Vertex::UPoint;
struct Autocorrelation
struct AutocorrelationImpl
{
using Grid = grid::Grid<float,4>;
Autocorrelation(size_t window_, int gid_, Vertex from_, Vertex to_):
AutocorrelationImpl(size_t window_, int gid_, Vertex from_, Vertex to_):
window(window_),
gid(gid_),
from(from_), to(to_),
......@@ -54,8 +60,8 @@ struct Autocorrelation
corr(shape.lift(3, window))
{}
static void* create() { return new Autocorrelation; }
static void destroy(void* b) { delete static_cast<Autocorrelation*>(b); }
static void* create() { return new AutocorrelationImpl; }
static void destroy(void* b) { delete static_cast<AutocorrelationImpl*>(b); }
void process(float* data)
{
GridRef g(data, shape);
......@@ -94,11 +100,11 @@ struct Autocorrelation
size_t count = 0;
private:
Autocorrelation() {} // here just for create; to let Master manage the blocks (+ if we choose to add OOC later)
AutocorrelationImpl() {} // here just for create; to let Master manage the blocks (+ if we choose to add OOC later)
};
//-----------------------------------------------------------------------------
class AutocorrelationAnalysisAdaptor::AInternals
class Autocorrelation::AInternals
{
public:
std::unique_ptr<diy::Master> Master;
......@@ -133,7 +139,7 @@ public:
Vertex from { ext[0], ext[2], ext[4] };
Vertex to { ext[1], ext[3], ext[5] };
int bid = this->Master->communicator().rank();
Autocorrelation* b = new Autocorrelation(this->Window, bid, from, to);
AutocorrelationImpl* b = new AutocorrelationImpl(this->Window, bid, from, to);
this->Master->add(bid, b, new diy::Link);
this->NumberOfBlocks = this->Master->communicator().size();
}
......@@ -158,7 +164,7 @@ public:
Vertex from { ext[0], ext[2], ext[4] };
Vertex to { ext[1], ext[3], ext[5] };
Autocorrelation* b = new Autocorrelation(this->Window, bid, from, to);
AutocorrelationImpl* b = new AutocorrelationImpl(this->Window, bid, from, to);
this->Master->add(bid, b, new diy::Link);
}
}
......@@ -168,29 +174,29 @@ public:
}
};
vtkStandardNewMacro(AutocorrelationAnalysisAdaptor);
vtkStandardNewMacro(Autocorrelation);
//-----------------------------------------------------------------------------
AutocorrelationAnalysisAdaptor::AutocorrelationAnalysisAdaptor()
: Internals(new AutocorrelationAnalysisAdaptor::AInternals())
Autocorrelation::Autocorrelation()
: Internals(new Autocorrelation::AInternals())
{
}
//-----------------------------------------------------------------------------
AutocorrelationAnalysisAdaptor::~AutocorrelationAnalysisAdaptor()
Autocorrelation::~Autocorrelation()
{
this->PrintResults(this->Internals->KMax);
delete this->Internals;
}
//-----------------------------------------------------------------------------
void AutocorrelationAnalysisAdaptor::Initialize(MPI_Comm world,
void Autocorrelation::Initialize(MPI_Comm world,
size_t window,
int association, const char* arrayname, size_t kmax)
{
AInternals& internals = (*this->Internals);
internals.Master = make_unique<diy::Master>(world, -1, -1,
&Autocorrelation::create,
&Autocorrelation::destroy);
&AutocorrelationImpl::create,
&AutocorrelationImpl::destroy);
internals.Association = association;
internals.ArrayName = arrayname;
internals.Window = window;
......@@ -198,7 +204,7 @@ void AutocorrelationAnalysisAdaptor::Initialize(MPI_Comm world,
}
//-----------------------------------------------------------------------------
bool AutocorrelationAnalysisAdaptor::Execute(vtkInsituDataAdaptor* data)
bool Autocorrelation::Execute(DataAdaptor* data)
{
AInternals& internals = (*this->Internals);
const int association = internals.Association;
......@@ -225,7 +231,7 @@ bool AutocorrelationAnalysisAdaptor::Execute(vtkInsituDataAdaptor* data)
if (vtkDataSet* dataObj = vtkDataSet::SafeDownCast(iter->GetCurrentDataObject()))
{
int lid = internals.Master->lid(static_cast<int>(bid));
Autocorrelation* corr = internals.Master->block<Autocorrelation>(lid);
AutocorrelationImpl* corr = internals.Master->block<AutocorrelationImpl>(lid);
vtkFloatArray* fa = vtkFloatArray::SafeDownCast(
dataObj->GetAttributesAsFieldData(association)->GetArray(arrayname));
if (fa)
......@@ -244,7 +250,7 @@ bool AutocorrelationAnalysisAdaptor::Execute(vtkInsituDataAdaptor* data)
{
int bid = internals.Master->communicator().rank();
int lid = internals.Master->lid(static_cast<int>(bid));
Autocorrelation* corr = internals.Master->block<Autocorrelation>(lid);
AutocorrelationImpl* corr = internals.Master->block<AutocorrelationImpl>(lid);
vtkFloatArray* fa = vtkFloatArray::SafeDownCast(
ds->GetAttributesAsFieldData(association)->GetArray(arrayname));
if (fa)
......@@ -261,13 +267,13 @@ bool AutocorrelationAnalysisAdaptor::Execute(vtkInsituDataAdaptor* data)
}
//-----------------------------------------------------------------------------