src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2021-06-10T18:19:07+02:00https://gitlab.psi.ch/OPAL/src/-/issues/13Speedup boundary geometry initialization2021-06-10T18:19:07+02:00gsellSpeedup boundary geometry initializationInitializing the boundary geometry is quite time consuming. Instead of running the initialization again and again for every run, we should save the computed data-structures to a file. This should include:
* the voxel-mesh
* the two...Initializing the boundary geometry is quite time consuming. Instead of running the initialization again and again for every run, we should save the computed data-structures to a file. This should include:
* the voxel-mesh
* the two spanning corners
* the number of voxels for x,y,z
* the voxel ID's
* triangle ID to voxel ID mapping
* triangle mesh
* points
* triangles defined point ID's
* triangle normalgsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/45Unification of OPAL-Cyc and OPAL-T2021-06-10T18:11:10+02:00frey_mUnification of OPAL-Cyc and OPAL-TAccording to the OPAL round table meeting of today (i.e. 2. March 2017) we need to unify the OPAL flavors OPAL-T and OPAL-Cyc in the following points:
- units
- convention of vertical and longitudinal plane
- definition of particle dist...According to the OPAL round table meeting of today (i.e. 2. March 2017) we need to unify the OPAL flavors OPAL-T and OPAL-Cyc in the following points:
- units
- convention of vertical and longitudinal plane
- definition of particle distribution (i.e. different meaning of py)
- OPAL-Cyc allows single particle tracking but in OPAL-T minimum 10 particles are needed
The points are also listed in Valeria's wiki page at point
[OPAL-Cyc: RINGDEFINITION](https://gitlab.psi.ch/AMAS-members/rizzoglio_v/wikis/OPAL_Meeting.html)adelmannadelmannhttps://gitlab.psi.ch/OPAL/src/-/issues/62Static code analysis of OPAL2021-06-18T11:43:05+02:00snuverink_jjochem.snuverink@psi.chStatic code analysis of OPALI have run the OPAL source code through the static analysis tool cppcheck (http://cppcheck.sourceforge.net/). The log is [attached](/uploads/306d150e867ff0c780275c6c6c69f64a/cppcheck-2.4.1.txt) (cppcheck v2.4.1 - updated 18-06-2021, comm...I have run the OPAL source code through the static analysis tool cppcheck (http://cppcheck.sourceforge.net/). The log is [attached](/uploads/306d150e867ff0c780275c6c6c69f64a/cppcheck-2.4.1.txt) (cppcheck v2.4.1 - updated 18-06-2021, commit 052a732c).
I started using it after I lost access to Coverity, which I had access to at CERN and which I found quite useful. Cppcheck is also quite good, but not so extensive and has no GUI.
Just as an example, memory leaks are flagged sometimes since there is a leak in one of the logical branches:
`[src/Classic/AbsBeamline/Cyclotron.cpp:931]: (error) Resource leak: f`
The line reads:
`931: CHECK_CYC_FSCANF_EOF(fscanf(f, "%lf", &BP.rmin));`
Since `CHECK_CYC_FSCANF_EOF` can throw, `f` is leaked in that case. But I would say this is (close to) a false positive, and doesn't need fixing. Other things that are flagged are somewhat personal style. But often these can also indicate bugs or typos. In general there are few false positives.
The log file contains certainly some things I think should be fixed like the usual uninitialised members, unused variables, etc. And others that I would leave. There are different categories. I fixed most of the few errors it found in src/src (see 4359206a).
Over time, I plan to go through, fix some of the simpler and more serious ones, make separate issues for the more complicated ones and rerun.
Please have a look if there are any issues in the code parts that you are maintaining.https://gitlab.psi.ch/OPAL/src/-/issues/146Rewrite the ArbitraryDomain class.2021-06-09T18:40:56+02:00krausRewrite the ArbitraryDomain class.Currently the ArbitraryDomain class only works when it is partitioned in z-direction. Rewrite it such that the global linear indexing works also with PARFFTX=TRUE and/or PARFFTY=TRUE.Currently the ArbitraryDomain class only works when it is partitioned in z-direction. Rewrite it such that the global linear indexing works also with PARFFTX=TRUE and/or PARFFTY=TRUE.winklehner_dfrey_mwinklehner_dhttps://gitlab.psi.ch/OPAL/src/-/issues/211Unify energy units2021-06-10T19:17:23+02:00krausUnify energy unitsOPAL expects inputs in eV, MeV and GeV. Clean this up to a single unit, e. g. MeV. @all please comment!OPAL expects inputs in eV, MeV and GeV. Clean this up to a single unit, e. g. MeV. @all please comment!krausadelmannkraushttps://gitlab.psi.ch/OPAL/src/-/issues/250Store stat files of Sampler (and Optimizer?) in a single file2021-06-10T17:58:47+02:00krausStore stat files of Sampler (and Optimizer?) in a single fileThe stat files should be stored into a single file such that all data from all runs can be evaluated in post processing. The data should be supplemented with the values of the design variables. File formats that come into considerations ...The stat files should be stored into a single file such that all data from all runs can be evaluated in post processing. The data should be supplemented with the values of the design variables. File formats that come into considerations are HDF5, SDDS, a NoSQL database, zip/tar gunzip etc.krausadelmanngsellkraushttps://gitlab.psi.ch/OPAL/src/-/issues/260Implement improved and low energy CSR methods2021-06-18T11:28:29+02:00krausImplement improved and low energy CSR methodsThe formulas to compute the CSR kick that is current used workes only for high energy beams. Better formulas such as [D. Sagan's](http://accelconf.web.cern.ch/AccelConf/e06/PAPERS/THPCH024.PDF) exist and are well tested.The formulas to compute the CSR kick that is current used workes only for high energy beams. Better formulas such as [D. Sagan's](http://accelconf.web.cern.ch/AccelConf/e06/PAPERS/THPCH024.PDF) exist and are well tested.ext-neveu_next-neveu_nhttps://gitlab.psi.ch/OPAL/src/-/issues/261Reintroduce methods to compute Schottky effect2021-06-10T17:58:09+02:00krausReintroduce methods to compute Schottky effectThis was once introduced by Zha into Opal but couldn't be maintained. It was therefore removed from the code.This was once introduced by Zha into Opal but couldn't be maintained. It was therefore removed from the code.https://gitlab.psi.ch/OPAL/src/-/issues/270Flexible Energy Bins2021-06-10T17:57:44+02:00krausFlexible Energy BinsCurrently the user has to define how many energy bins are used. They are then used for `MINSTEPFORREBIN` steps whether this is necessary or not (or sufficient). Instead the number of bins should be controlled by the difference in gamma. ...Currently the user has to define how many energy bins are used. They are then used for `MINSTEPFORREBIN` steps whether this is necessary or not (or sufficient). Instead the number of bins should be controlled by the difference in gamma. If all particles have the same gamma then only one energy bin should be used. On contrary if the energy spread is big many bins should be used.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/279Trimcoil: PHIMIN and PHIMAX as arrays2021-06-10T17:57:30+02:00frey_mTrimcoil: PHIMIN and PHIMAX as arraysIn order to have one instance of a trim coil instead of multiple instances it is better having the arguments PHIMIN and PHIMAX as arrays. Otherwise one needs to specify the same trim coil n-times for n-sectors.In order to have one instance of a trim coil instead of multiple instances it is better having the arguments PHIMIN and PHIMAX as arrays. Otherwise one needs to specify the same trim coil n-times for n-sectors.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/287Reference Particle Class for all Trackers2021-06-10T17:56:59+02:00snuverink_jjochem.snuverink@psi.chReference Particle Class for all TrackersThe cyclotron tracker has no good reference particle treatment. In addition, it would be nice to adapt the reference particle treatment of the t-tracker into a separate class. This can be used for all trackers.The cyclotron tracker has no good reference particle treatment. In addition, it would be nice to adapt the reference particle treatment of the t-tracker into a separate class. This can be used for all trackers.snuverink_jjochem.snuverink@psi.chkraussnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/297Suggestion for improvements to the Optimiser2021-06-10T17:56:24+02:00snuverink_jjochem.snuverink@psi.chSuggestion for improvements to the OptimiserSome suggestions and observations to improve usability of the optimiser by Michael Abo-Bakr (as far as not already covered in other issues):
* [ ] For 1 or 2 optimisation parameters there is no hypervolume calculation.
* [ ] It would be...Some suggestions and observations to improve usability of the optimiser by Michael Abo-Bakr (as far as not already covered in other issues):
* [ ] For 1 or 2 optimisation parameters there is no hypervolume calculation.
* [ ] It would be very nice to get at the end a final best solution in the output (defined with some cost function)
* [ ] .json format is not always ideal for reading or writing new generation files (as starting condition)
* [ ] Not all individuals appear to be really new.
* [ ] Option to adaptively change optimisation parameters (mutation, crossover etc.)snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/354Add Analytic model of a transverse deflecting cavity (TCAV)2021-06-10T17:54:19+02:00adelmannAdd Analytic model of a transverse deflecting cavity (TCAV)adelmannkrausext-neveu_nadelmannhttps://gitlab.psi.ch/OPAL/src/-/issues/357Unify units in Elements and Input / Output2023-10-17T13:29:00+02:00frey_mUnify units in Elements and Input / OutputAccording to #45 and #227 the units of OPAL-T and OPAL-Cycl should be unified.
The following units should be used:
* meter
* second
* MeV or eV
* Tesla
* MV
For the full list see http://amas.web.psi.ch/opal/Documentation/master/OPAL...According to #45 and #227 the units of OPAL-T and OPAL-Cycl should be unified.
The following units should be used:
* meter
* second
* MeV or eV
* Tesla
* MV
For the full list see http://amas.web.psi.ch/opal/Documentation/master/OPAL_Manual.html#sec.conventions.units
Some elements are already fixed. This issue (as discussed with @gsell) should keep track of elements that are not yet updated. If an element is missing, please add it to the list.
Developers that fixed an element should mark it here:
- [x] Bend2D - no fixing needed
- [x] BeamStripping (!368, !479)
- [x] CCollimator (!368, !479)
- [x] ~~Corrector~~ deleted in !390
- [x] Cyclotron (!632)
- [x] ~~CyclotronValley~~ deleted in !218
- [ ] Degrader
- [ ] Drift
- [ ] FlexibleCollimator
- [ ] Monitor
- [ ] Multipole
- [ ] MultipoleTBase
- [ ] MultipoleTCurvedConstRadius
- [ ] MultipoleTCurvedVarRadius
- [x] MultipoleT (!643)
- [ ] MultipoleTStraight
- [x] Offset
- [x] ~~ParallelPlate~~ deleted in !390
- [x] PluginElement (!368)
- [x] Probe (!368, !479)
- [x] RBend3D - no fixing needed
- [x] RBend - no fixing needed
- [x] RFCavity (!619)
- [x] ~~RFQuadrupole~~ deleted in !390
- [x] Ring (!632, !643)
- [x] SBend3D - no fixing needed
- [x] SBend - no fixing needed
- [x] ScalingFFAMagnet (!643)
- [x] ~~SectorFieldMapComponent~~ deleted in !230
- [x] Septum (!368, !479)
- [ ] Solenoid
- [x] Source - no fixing needed
- [x] Stripper (!368, !479)
- [ ] TravelingWave
- [x] TrimCoil
- [x] VariableRFCavityFringeField (!643)
- [x] VariableRFCavity (!643)
- [x] VerticalFFAMagnet (!643)
Input / Output
- [ ] ID1 and ID2 in stat file and track file
- [ ] Field Maps (!506)snuverink_jjochem.snuverink@psi.chext-calvo_ppedro.calvo@ciemat.esext-rogers_ckraussnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/547Replace all plain pointers with smart pointers2022-11-05T23:09:24+01:00krausReplace all plain pointers with smart pointersWe should replace all plain pointers with smart pointers, either from std or from boost.
#### Some random notes
- Each class `T` for which a shared pointer `std::shared_ptr<T>` is used should feature a `typedef std::shared_ptr<T> SP`. T...We should replace all plain pointers with smart pointers, either from std or from boost.
#### Some random notes
- Each class `T` for which a shared pointer `std::shared_ptr<T>` is used should feature a `typedef std::shared_ptr<T> SP`. This reduces the amount of code we have to write.
- Cyclic references have to be avoided using weak pointers.
#### ToDos
- [ ] `ElementBase *` -> `std::shared_ptr<ElementBase>`
- [ ] return type of Object::clone
- [ ] (almost) all occurrences of the keyword `new`
- [ ] replace (occurrences of) `Pointer` class
- [ ] replace pointers in Classic/Fields with smart pointers (#744)
- [ ] replace plain pointers in Classic/AbsBeamline with smart pointers (#746)https://gitlab.psi.ch/OPAL/src/-/issues/555Move Distribution attribute from the TrackRun command to the Beam command.2021-06-10T17:47:27+02:00krausMove Distribution attribute from the TrackRun command to the Beam command.It seems more logic to have them together since the distribution describes the beam of particles.It seems more logic to have them together since the distribution describes the beam of particles.https://gitlab.psi.ch/OPAL/src/-/issues/576Emit particles from position of Source element2021-08-11T14:35:52+02:00krausEmit particles from position of Source elementCurrently the particles are always emitted from `z = 0` even if the source element is shifted.Currently the particles are always emitted from `z = 0` even if the source element is shifted.https://gitlab.psi.ch/OPAL/src/-/issues/608Use library to parse the command line arguments2021-06-10T17:40:49+02:00krausUse library to parse the command line argumentsCurrently the command line arguments are parsed with manually written `if ... else if ... `. Additionally the arguments are parsed in different locations. Instead we should use a library such as Boost Program_options.Currently the command line arguments are parsed with manually written `if ... else if ... `. Additionally the arguments are parsed in different locations. Instead we should use a library such as Boost Program_options.https://gitlab.psi.ch/OPAL/src/-/issues/614Make sampler more robust2020-10-09T10:33:26+02:00bellotti_rMake sampler more robust**Current state**<br />
If one machine configuration crashes (e. g. segfault), the entire random sample dies.
**Why is it bad**<br />
I'm referring to a situation where the sampler reads from a TSV file instead of generating configurati...**Current state**<br />
If one machine configuration crashes (e. g. segfault), the entire random sample dies.
**Why is it bad**<br />
I'm referring to a situation where the sampler reads from a TSV file instead of generating configurations.<br />
- The more machines are run in parallel, the more configurations have to be restarted. This is a cumbersome manual process, and therefore error prone.
- All progress of simulations in progress is lost. (waste of resources)
- The unfinished machine settings have to be identified, copied to a new TSV file, and another RS has to be started, which is again a manual process.
Long story short, this bug imposes unnecessary work and introduces unnecessary error sources for OPAL users.https://gitlab.psi.ch/OPAL/src/-/issues/619review and cleanup IPPL FieldLayout classes2021-06-10T17:34:40+02:00gsellreview and cleanup IPPL FieldLayout classesOnly layout constructors using NDIndex are used in OPAL. The layout constructors using 1 to 6 arguments of type index are not used and can be removedOnly layout constructors using NDIndex are used in OPAL. The layout constructors using 1 to 6 arguments of type index are not used and can be removedgsellgsell