KATRIN-Experiment / Kassiopeia

Simulation of electric and magnetic fields and particle tracking
https://katrin-experiment.github.io/Kassiopeia/index.html
Other
47 stars 29 forks source link

Rendering of complex Geometries in GeoViewer and MeshViewer #3

Closed mattik1 closed 6 years ago

mattik1 commented 6 years ago

Greetings

I am new at using or learning Kassiopeia. I have recently installed Kassiopeia 3.5.0 on Ubuntu 16.04 LTS and I have trouble rendering complex geometries in both GeoViewer and MeshViewer. The "katrin visualization" tool renders blank canvas. The simple geometries a rendered without any problems.

Upon a preliminary investigation it appears to me that geometries constructed with what looks to me like "ROOT syntax" or mathematical operations are the ones that fail to render.

For Example: The port_housing_surface with the following line of code does not render

<circular_port x="-1./sqrt(2.)" y="-1./sqrt(2.)" z="-.5" radius="0.053"/>

This suggest to me that there may be something wrong with my Kassiopeia or ROOT configuration. I might be wrong.

I then also tried to run DipoleTrapSimulation.xml and attempted to view the .vtp output in ParaView without any success. Upon investigation I noticed there was a mathematical operation in the XML as well which supports my novice hunch.

What am I doing wrong? Is there a procedure I missed during installation or configuration to allow the application to process XML input files with embedded mathematics syntax?

I followed installation procedures listed here -> https://github.com/KATRIN-Experiment/Kassiopeia

My gROOT -> GetVersion( ) result is "6.13/03"

Kindly assist

Regards

buzinsky commented 6 years ago

Hi, thanks for the clear description of your problem.

I am pretty sure that this is an not issue with your ROOT installation, so you shouldn't need to reinstall that. As a preliminary thing to check, though I think you are doing it correctly, is that the KASPER_USE_VTK flag in the cmake configuration is turned on (using ccmake, etc.). VTK is needed for visualization libraries, so you will need to install that, then reinstall kassiopeia if this is not the case.

For the complex geometries, the command that you should call from the $KASPERSYS/bin directory is:

./MeshViewer ../config/TheBag/Examples/ComplexShapes.xml example_port_housing_surface

Not port_housing_surface, if that's what you are doing?

The vtp file will be written to /path/to/install/output/TheBag/MeshPainter.vtp>. Note the GeometryViewer does not work for this particular example.

Usually using paraview is unnecessary (though possible), as a new window should popup with the geometry, in both cases of the complex port and the Dipole Trap Simulation.

Lastly, if you aren't already aware of it, the wiki will probably be of use to you: http://katrin-experiment.github.io/Kassiopeia/index.html , in particular in the sections on Getting Started, Examples and Tests, and Complex KGeoBag Shapes.

Let me know if you still have issues: if you are creating vtp files, I think you are pretty close to getting it to work. The mathematical expressions shouldn't be a problem.

mattik1 commented 6 years ago

Thanks for your response Buzinsky

I had another attempt this morning after your response. It turns out I was using the wrong "arguments" and toolkit as you pointed out. MeshViewer works well and I am also now able to view MeshPainter results in ParaView.

Much appreciated.

Regards