Code Monkey home page Code Monkey logo

aviz's People

Contributors

ahashibon avatar joanadler avatar nathanfranklin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aviz's Issues

make error GIT_REVISION

In compiling pr #6, on some machines there is the following error:

src/main.cpp:107: error: expected ‘)’ before ‘GIT_REVISION’

GIT_REVISION is set in aviz.pro:

git describeGIT_REVISION = $$system($$quote(git describe))
DEFINES += $$quote(GIT_REVISION=\'\"$$GIT_REVISION\"\')

cleanup of glCanvasArea.cpp

There is lots of code repeat that should be cleaned up.

    // Go through all the particles and make a list of
    // known types
    int numberOfParticleTypes = 0;
    for (i=0;i<ad.numberOfParticles;i++) {
        if (this->particleIsInSlice(i)) {
            isInList = FALSE;
            for (int j=0;j<numberOfParticleTypes;j++) {
                if (typeCmp( (char *)&particleTypes[j], (char *)&ad.particles[i].type ) == TRUE) {
                    isInList = TRUE;
                    j = numberOfParticleTypes;
                }
            }
            if (isInList == FALSE) {
                // Found a new particle -- add it to the list
                if (numberOfParticleTypes < MAX_PARTICLE_TYPES) {
                    typeCopy( (char *)&ad.particles[i].type, (char *)&particleTypes[numberOfParticleTypes]);
                    numberOfParticleTypes++;
                }
            }
        }
    }

addToolButton deprecated in Qt4

Due to addToolButton being deprecated in Qt4, the "generate" push button is just added current layout which needs to be checked/evaluated... and most likely removed.

commit 30ece55

Add description of properties to xzy file

Add description to end of file so that Aviz knows additional information about the parameters.

This is related to simphony/simphony-aviz#8

The file and new ending will look like the following:

4
#XZYfile
X0 1.9265350878690097e+00 1.2235141067428751e+01 -9.0000000000000000e+00 1.0 1.0
X0 1.9265350878690097e+00 1.2235141067428751e+01 -5.0000000000000000e+00 1.0 1.0
properties:
        -name: CUBA.RADIUS
        -name: CUBA.MASS

cleanup of setData

In MainFile, the different dialogs setData is called:

                ab->setData();
                lcb->setData();
                plb->setData();
                pb->setData();
                sb->setData();
                if (bb)
                    bb->setData();
                if (trab)
                    trab->setData();

They each create a QComBox with each type. There is lots of repeated code as well as repeated work (i.e. finding each type) that could be improved.

Provide online documentation

doc/aviz.tex contains the documentation which is used to generate the html files in the doc directory. This documentation can be provided online.

The html files can be automatically generated and then removed from the repository.

VERSION_STRING used to check file versions

In fileFunctions.cpp, VERSION_STRING is used to check if files (param files etc) are of an acceptable version. I think a version number (major, minor..) should be used instead.

property 1 is incorrectly displayed

error_property1

Version 6.5, commit b29c73a

Input file:

10
#XZYfile
X0 1.9265350878690097e+00 1.2235141067428751e+01 -9.0000000000000000e+00 1.0 1.0
X0 1.9907529241313100e+01 1.2235141067428751e+01 0.0000000000000000e+00 2.0  2.0
X0 2.5044956142297124e+01 7.7859988610910245e+00 0.0000000000000000e+00 2.0 2.0
X0 2.2476242691805112e+01 1.4459712170597616e+01 0.0000000000000000e+00 2.0 2.0
X0 1.0274853801968051e+01 1.3347426619013184e+01 0.0000000000000000e+00 2.0 2.0
X0 1.2843567252460064e+01 1.7796568825350910e+01 0.0000000000000000e+00 2.0 2.0
X0 1.6696637428198084e+01 1.5571997722182049e+01 0.0000000000000000e+00 2.0 2.0
X0 2.4402777779674121e+01 2.0021139928519776e+01 0.0000000000000000e+00 2.0 2.0
X0 1.2843567252460064e+01 6.6737133095065921e+00 0.0000000000000000e+00 2.0 2.0
X0 7.7061403514760389e+00 1.1122855515844320e+01 3.0000000000000000e+01 5.0 5.0

Property 2 (which has the exact same values) is properly displayed, but property 1 is displayed incorrectly.

File display error on machine with "de" locale

error_401_points

Left side with locale LC_NUMERIC="en_US: 400 points are being correctly displayed.
Right side: Ubuntu with locale LC_NUMERIC=de_DE.UTF-8 : it appears that only a few points are displayed.

atof is being used to read floats in the file but failing on the de locale as the files contains decimal point instead of comma.

File:

400
#XZYfile
X0 1.9265350878690097e+00 1.2235141067428751e+01 0.0000000000000000e+00
X0 1.9907529241313100e+01 1.2235141067428751e+01 0.0000000000000000e+00
X0 2.5044956142297124e+01 7.7859988610910245e+00 0.0000000000000000e+00
....

support qt5

https://blog.qt.io/blog/2015/05/26/qt-4-8-7-released/ :

Qt 4.8.7 is planned to be the last patch release of the Qt 4 series. Standard support is available until December 2015, after which extended support will be available. We recommend all active projects to migrate to Qt 5, as new operating systems and compilers with Qt 4.8 will not be supported.

leaks in imageFileFunctions

cpp check reports the following:
[imageFileFunctions.cpp:87]: (error) Memory leak: buf
[imageFileFunctions.cpp:202]: (error) Memory leak: row_pointers

Regression: Error opening example data file 'alox.xyz'

Tested on qt5 branch 8c32a48 on Ubuntu 14.04 (it onyl shows a few points..instead of 5400)
and the following error:

The maximum number of particle type entries (256) is exceeded -- recompile
The maximum number of particle type entries (256) is exceeded -- recompile
The maximum number of particle type entries (256) is exceeded -- recompile
The maximum number of particle type entries (256) is exceeded -- recompile
The maximum number of particle type entries (256) is exceeded -- recompile
The maximum number of particle type entries (256) is exceeded -- recompile

On Suse, v6.5.0-14-g6914c7c
`Problem reading line #12: Incorrect format of type``

But on an earlier version, Suse on v6.5.0-1-g7be0896 7be0896, it works.

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.