[Paraview] CoProcessing
Takuya OSHIMA
oshima at eng.niigata-u.ac.jp
Wed Aug 4 10:43:18 EDT 2010
I try to resend my mail as there seems to be a heavy delivery delay or
the mail was lost... Sorry if this is going to be a double post.
Takuya
------
Hi Jacques,
I can share what I did with my own C++ simulation code. The caveats
are that I only did a quick test so far and that my code is
serial. But it's working. Take a look at the attached cxx file.
Initializations are in
fdmCoProcessing(fdmTimeInfo *tInfo) and
fdmCoProcessing::Parse(vtkXMLDataElement *coproc).
Replace source->GetCharacterData() in Parse() with the file name of
your Python script created by the ParaView coprocessing script
generator plugin.
Per-time step processings are in
fdmCoProcessing::Exec().
Replace this->TimeInfo->GetGrid() with the output of your
adaptor. Perhaps this is where you have to elaborate.
Finalizations are in
fdmCoProcessing::~fdmCoProcessing().
If your project is CMake-based, add
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
to your CMakeLists.txt and vtkCoProcessor to your TARGET_LINK_LIBRARIES.
If my example is not enough you can also take a look at
ParaView/CoProcessing/CoProcessor/Testing/TestDriver
but I'm afraid it might be a bit too overwhelming as a starting point.
Hope this helps,
Takuya
Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
From: Jacques Papper <jacques.papper at gmail.com>
Subject: Re: [Paraview] CoProcessing
Date: Wed, 4 Aug 2010 13:02:36 +0100
> * Hi All,
>
> Sorry for my last post, I figured out that I had wrongly set my PYTHONPATH..
> All the tests work ok now. Still interested in CoProcessing adaptors examples
> though :)
>
> Thanks
> Jacques
>
> 2010/8/4 Jacques Papper <jacques.papper at gmail.com>
>
> Hi All,
>
> I'm starting to look into the ParaView CoProcessing libraries.
> I just pulled from git today, and compiled it all up following the
> guidelines in :
> http://www.paraview.org/Wiki/CoProcessing
> I didn't find :
> BUILD_PYTHON_COPROCESSING_ADAPTOR
> but instead :
> PARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator
> anyway the compilation went through without any issues.
> I then tried :
>
> ctest -R CoProcessing
> Test project /users/boreas01/jacques/PARAVIEW/ParaView-bin
> □□□ Start 491: CoProcessingTestPythonScript
> 1/3 Test #491: CoProcessingTestPythonScript ...........□□ Passed□□□ 0.45
> sec
> □□□ Start 492: CoProcessingPythonScriptGridPlot
> 2/3 Test #492: CoProcessingPythonScriptGridPlot .......***Failed□□□ 0.09
> sec
> □□□ Start 493: CoProcessingPythonScriptPressurePlot
> 3/3 Test #493: CoProcessingPythonScriptPressurePlot ...***Failed□□□ 0.09
> sec
>
> 33% tests passed, 2 tests failed out of 3
>
> Total Test time (real) =□□ 0.68 sec
>
> The following tests FAILED:
> □□□□□□□ 492 - CoProcessingPythonScriptGridPlot (Failed)
> □□□□□□□ 493 - CoProcessingPythonScriptPressurePlot (Failed)
> Errors while running CTest
>
> Is this a problem in my current installation or on the master branch ?
>
> Finally, I would like to start writing an adaptor to a C++ parallelised
> code. Can you tell me what is the closest code I can inspire myself from ?
>
> Thank you,
> Jacques
>
> PS sorry mixed up the subjects..
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fdmCoProcessing.cxx
Type: application/octet-stream
Size: 1814 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100804/5b9cb0fa/attachment.obj>
More information about the ParaView
mailing list