InsertNextTupleValue does not exist in VTK 8.1?

Asked by Luc OGER

Hi,

in my Linux distribution (Suse Leap 15.0) the standard VTK package is in version8.1 which does not contained InsertNextTupleValue any more: the new name is only InsertNextTuple.

i have changed manually all the named function inside the cpp file but if I do a new git I will have to do it again. Is it a better solution to keep the compilation of the last development of Yade easy to manage?

thanks in advance

Luc

see:
trunk/pkg/dem/VTKRecorder.cpp:511:20: error: ‘class vtkDoubleArray’ has no member named ‘InsertNextTupleValue’; did you mean ‘InsertNextTuple’?
     intrAbsForceT->InsertNextTupleValue(fs);
                    InsertNextTuple

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chareyre (bruno-chareyre-9) said :
#1

Hi Luc, the clean solution is define conditional macros at build time
depending on vtk version. We could commit this if you provide it.
Thanks for mentionning this fix anyway.
Bruno

Le ven. 31 août. 2018 14:17, Luc OGER <email address hidden>
a écrit :

> New question #673172 on Yade:
> https://answers.launchpad.net/yade/+question/673172
>
> Hi,
>
> in my Linux distribution (Suse Leap 15.0) the standard VTK package is in
> version8.1 which does not contained InsertNextTupleValue any more: the new
> name is only InsertNextTuple.
>
> i have changed manually all the named function inside the cpp file but if
> I do a new git I will have to do it again. Is it a better solution to keep
> the compilation of the last development of Yade easy to manage?
>
> thanks in advance
>
> Luc
>
> see:
> trunk/pkg/dem/VTKRecorder.cpp:511:20: error: ‘class vtkDoubleArray’ has no
> member named ‘InsertNextTupleValue’; did you mean ‘InsertNextTuple’?
> intrAbsForceT->InsertNextTupleValue(fs);
> InsertNextTuple
>
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Luc OGER (luc-oger) said :
#2

inisde the CMakefilelist.txt
this is the change:

IF(ENABLE_VTK)
  IF(${VTK_MAJOR_VERSION} GREATER 5)
    TARGET_LINK_LIBRARIES(yade ${VTK_LIBRARIES})
    ADD_DEFINITIONS("-DYADE_VTK6")
  IF(${VTK_MAJOR_VERSION} GREATER 7)
   ADD_DEFINITIONS("-DYADE_VTK8")
   MESSAGE(STATUS "VTK version >7 is found")
  ELSE(${VTK_MAJOR_VERSION} GREATER 7)
   MESSAGE(STATUS "VTK version >5 and <8 is found")
  ENDIF(${VTK_MAJOR_VERSION} GREATER 7)
   ELSE(${VTK_MAJOR_VERSION} GREATER 5)
    TARGET_LINK_LIBRARIES(yade vtkHybrid)
  ENDIF(${VTK_MAJOR_VERSION} GREATER 5)
ENDIF(ENABLE_VTK)

i have also modifed VTKrecorder.cpp according to YADE_VTK8 variable but I don't know how to send it...

Luc

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

Excellent! Thanks.
Could you please send VTKrecorder.cpp as an attachment, in email to <email address hidden>?
Bruno

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

Dear Luc,
I'm preparing to commit your changes but I have a quick question: is the above CMakeLists fragment supposed to replace the current "IF(ENABLE_VTK)" block or should it be just appended?

I was expecting the first, but I realized it would mean to remove a line like "FIND_PACKAGE(VTK COMPONENTS vtkCommonCore[...])".
What do you think?
Thanks
Bruno

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

Please ignore the above questions.
Just found that there were two blocks about vtk, and your fragment is obviously a replacement for the second one.
Bruno

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

Change commited [1]. Thank you very much.
Bruno

[1] https://github.com/yade/trunk/commit/e0b91ef5f19eb8abb1cc3c24650cbcdc4ce4dc12

Can you help with this problem?

Provide an answer of your own, or ask Luc OGER for more information if necessary.

To post a message you must log in.