Coder Social home page Coder Social logo

Support VTK 9.x about chaste HOT 7 CLOSED

chaste avatar chaste commented on June 19, 2024
Support VTK 9.x

from chaste.

Comments (7)

fcooper8472 avatar fcooper8472 commented on June 19, 2024

I have tested #152 against VTK 9.1, and the entire continuous test pack compiles and runs fine.

VTK 9.2 is going to be slightly more involved. One method was deprecated, which is addressed in 6218397.

However, VTK 9.2 causes TestVtkMeshReader to fail:

Entering TestGetNextFaceData

/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:206: Error: Expected (first_face_data.NodeIndices[0] == 11u), found (0 != 11)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:207: Error: Expected (first_face_data.NodeIndices[1] == 3u), found (11 != 3)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:208: Error: Expected (first_face_data.NodeIndices[2] == 0u), found (3 != 0)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:211: Error: Expected (next_face_data.NodeIndices[0] == 3u), found (0 != 3)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:212: Error: Expected (next_face_data.NodeIndices[1] == 8u), found (3 != 8)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:213: Error: Expected (next_face_data.NodeIndices[2] == 0u), found (8 != 0)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:218: Error: Expected (first_face_data.NodeIndices[0] == 11u), found (0 != 11)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:219: Error: Expected (first_face_data.NodeIndices[1] == 3u), found (11 != 3)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:220: Error: Expected (first_face_data.NodeIndices[2] == 0u), found (3 != 0)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:223: Error: Expected (next_face_data.NodeIndices[0] == 3u), found (0 != 3)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:224: Error: Expected (next_face_data.NodeIndices[1] == 8u), found (3 != 8)
/home/fcooper/GitRepos/Chaste/Chaste/mesh/test/reader/TestVtkMeshReader.hpp:225: Error: Expected (next_face_data.NodeIndices[2] == 0u), found (8 != 0)
Failed

It looks as though the indices might be being re-ordered? Needs further investigation.

from chaste.

jmpf avatar jmpf commented on June 19, 2024

There are tests above that one for

  • node order/position
  • element order
    These both work as expected and Chaste meshes use nodes and elements as the primary data structures.

Here the order of nodes within faces have been given an even permutation. This does not affect chirality so it's something that changes nothing. It's possible that new (or old) VTK gives back the other chirality and we flip it in the constructor.

I suggest putting the indices into std::set and using set equality with a comment to say that 9.2 is giving a different ordering. (Possibly overkill, but we're only doing it a couple of times.)

from chaste.

fcooper8472 avatar fcooper8472 commented on June 19, 2024

@jmpf just to make sure I've understood correctly, anything up to a rotation is correct, so {11, 3, 0}, {3, 0, 11} and {0, 11, 3} are all "correct"?

Perhaps there's an elegant way of checking for a rotation...

from chaste.

jmpf avatar jmpf commented on June 19, 2024

@fcooper8472 Yes. These all appear to be correct. The other way to do the test is to #ifdef on the VTK version...

I changed by mind about auto-flipping chirality in the constructor -- we can't do that for a triangular face in 3D.

from chaste.

fcooper8472 avatar fcooper8472 commented on June 19, 2024

How about something like this?

c4d048d

from chaste.

jmpf avatar jmpf commented on June 19, 2024

Probably overkill, but the rationale of the test is now crystal-clear.

from chaste.

fcooper8472 avatar fcooper8472 commented on June 19, 2024

VTK 9.0, 9.1 and 9.2 appear to all be working.

This issue can be closed as soon as the portability workflow is updated to include the new portability-06 image.

from chaste.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.