mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 12:47:05 +01:00
Fixes and visualisation
This commit is contained in:
@ -122,10 +122,10 @@ void GlobalSharedMemory::SharedMemoryZero(void *dest,size_t bytes)
|
|||||||
{
|
{
|
||||||
acceleratorMemSet(dest,0,bytes);
|
acceleratorMemSet(dest,0,bytes);
|
||||||
}
|
}
|
||||||
void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes)
|
//void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes)
|
||||||
{
|
//{
|
||||||
acceleratorCopyToDevice(src,dest,bytes);
|
// acceleratorCopyToDevice(src,dest,bytes);
|
||||||
}
|
//}
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
// Global shared functionality finished
|
// Global shared functionality finished
|
||||||
// Now move to per communicator functionality
|
// Now move to per communicator functionality
|
||||||
|
@ -7,8 +7,6 @@ CXX=mpicxx ../../configure \
|
|||||||
--enable-unified=yes \
|
--enable-unified=yes \
|
||||||
--prefix /Users/peterboyle/QCD/vtk/Grid/install \
|
--prefix /Users/peterboyle/QCD/vtk/Grid/install \
|
||||||
--with-lime=$CLIME \
|
--with-lime=$CLIME \
|
||||||
--with-hdf5=$HDF5 \
|
|
||||||
--with-fftw=$FFTW \
|
|
||||||
--with-openssl=$OPENSSL \
|
--with-openssl=$OPENSSL \
|
||||||
--with-gmp=$GMP \
|
--with-gmp=$GMP \
|
||||||
--with-mpfr=$MPFR \
|
--with-mpfr=$MPFR \
|
||||||
|
@ -48,15 +48,14 @@ typedef vtkMarchingCubes isosurface;
|
|||||||
|
|
||||||
int mpeg = 0 ;
|
int mpeg = 0 ;
|
||||||
int xlate = 0 ;
|
int xlate = 0 ;
|
||||||
|
int framerate = 10;
|
||||||
|
|
||||||
template <class T> void readFile(T& out, std::string const fname){
|
template <class T> void readFile(T& out, std::string const fname){
|
||||||
#ifdef HAVE_LIME
|
|
||||||
Grid::emptyUserRecord record;
|
Grid::emptyUserRecord record;
|
||||||
Grid::ScidacReader RD;
|
Grid::ScidacReader RD;
|
||||||
RD.open(fname);
|
RD.open(fname);
|
||||||
RD.readScidacFieldRecord(out,record);
|
RD.readScidacFieldRecord(out,record);
|
||||||
RD.close();
|
RD.close();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
|
||||||
@ -208,6 +207,10 @@ int main(int argc, char* argv[])
|
|||||||
xlate = 1;
|
xlate = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( GridCmdOptionExists(argv,argv+argc,"--fps") ){
|
||||||
|
arg=GridCmdOptionPayload(argv,argv+argc,"--fps");
|
||||||
|
GridCmdOptionInt(arg,framerate);
|
||||||
|
}
|
||||||
if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){
|
if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){
|
||||||
arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface");
|
arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface");
|
||||||
GridCmdOptionFloat(arg,default_contour);
|
GridCmdOptionFloat(arg,default_contour);
|
||||||
@ -420,7 +423,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New();
|
vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New();
|
||||||
writer->SetFileName("movie.avi");
|
writer->SetFileName("movie.avi");
|
||||||
writer->SetRate(1);
|
writer->SetRate(framerate);
|
||||||
writer->SetInputConnection(imageFilter->GetOutputPort());
|
writer->SetInputConnection(imageFilter->GetOutputPort());
|
||||||
writer->Start();
|
writer->Start();
|
||||||
|
|
||||||
@ -477,7 +480,7 @@ int main(int argc, char* argv[])
|
|||||||
slidercallback->fu_list = fu_list;
|
slidercallback->fu_list = fu_list;
|
||||||
sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback);
|
sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback);
|
||||||
|
|
||||||
int timerId = iren->CreateRepeatingTimer(300);
|
int timerId = iren->CreateRepeatingTimer(1000/framerate);
|
||||||
std::cout << "timerId: " << timerId << std::endl;
|
std::cout << "timerId: " << timerId << std::endl;
|
||||||
|
|
||||||
// Start the interaction and timer
|
// Start the interaction and timer
|
||||||
|
@ -2,8 +2,9 @@ libs=`grid-config --libs`
|
|||||||
ldflags=`grid-config --ldflags`
|
ldflags=`grid-config --ldflags`
|
||||||
cxxflags=`grid-config --cxxflags`
|
cxxflags=`grid-config --cxxflags`
|
||||||
cxx=`grid-config --cxx`
|
cxx=`grid-config --cxx`
|
||||||
|
cc=clang
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
LDFLAGS="$ldflags $libs " cmake .. -DCMAKE_CXX_COMPILER=$cxx -DCMAKE_CXX_FLAGS=$cxxflags
|
LDFLAGS="$ldflags $libs " cmake .. -DCMAKE_C_COMPILER=$cc -DCMAKE_CXX_COMPILER=$cxx -DCMAKE_CXX_FLAGS=$cxxflags
|
||||||
|
Reference in New Issue
Block a user