src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2019-05-09T14:16:31+02:00https://gitlab.psi.ch/OPAL/src/-/issues/305Calculation of chord length in RBend wrong2019-05-09T14:16:31+02:00krausCalculation of chord length in RBend wrong### Summary
When the deflection angle is negative then the chord length that is calculated in RBend is wrong. In a rectangular bend when the orientation of the face relative to the beam (`E1`) is half of the deflection angle then the ch...### Summary
When the deflection angle is negative then the chord length that is calculated in RBend is wrong. In a rectangular bend when the orientation of the face relative to the beam (`E1`) is half of the deflection angle then the chord length should be equal to the length of the dipole. Instead the calculated length is as if `E1` was multiplied by `-1`.
### Steps to reproduce
Add `OPTION, LOGBENDTRAJECTORY=TRUE;` to the input file and track a bunch through a rectangular bend with `ANGLE < 0` and `E1 = ANGLE / 2`. Then look up the distance in the file `data/<input_fname>_<bend_name>_traj.dat` between the two locations where the reference particle crosses `x=0`.
### What is the current *bug* behavior?
The current chord length is as if `E1 = -ANGLE / 2`.
### What is the expected *correct* behavior?
The chord length should be equal to `L` in the description of the bend in the input file.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/304All cores in a parallel run with particle-matter-interaction use same sequenc...2019-05-22T19:49:00+02:00krausAll cores in a parallel run with particle-matter-interaction use same sequence of random numbersThis is similar to the case we had in the Distribution class where the sequences of random numbers were the same. There we could alleviate this problem using two different approaches. The first approach is to discard parts of the sequenc...This is similar to the case we had in the Distribution class where the sequences of random numbers were the same. There we could alleviate this problem using two different approaches. The first approach is to discard parts of the sequence on all cores except of one (see [here](https://gitlab.psi.ch/OPAL/src/blob/master/src/Distribution/Distribution.cpp#L373)). This doesn't scale well with increasing number of cores and particles. The other approach was to use a different seed on each core (see [here](https://gitlab.psi.ch/OPAL/src/blob/master/src/Distribution/Distribution.cpp#L307)). This scales well but yields different results when different number of cores are used.
In particle-matter-interaction the first approach doesn't seem feasible. The second approach is however easy to implement.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/303Strategy pattern for DataSink2019-07-08T10:11:57+02:00frey_mStrategy pattern for DataSinkI propose to change the implementation of the ```DataSink``` class where it is a base class for all various writers such as the load balancing, memory consumption etc. They all share common functions like opening and closing of the file ...I propose to change the implementation of the ```DataSink``` class where it is a base class for all various writers such as the load balancing, memory consumption etc. They all share common functions like opening and closing of the file etc. I suggest a strategy pattern.
Benefits:
* less code + simplifies adding new writers
* better code overview
* easier runtime selection of writersfrey_mkrausfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/302Cleanup legacy code2019-05-15T22:43:30+02:00snuverink_jjochem.snuverink@psi.chCleanup legacy codeIn our source code there are several preprocessor checks for `__GNUC__ < 3`. We no longer support those systems and this legacy code can be safely removed.In our source code there are several preprocessor checks for `__GNUC__ < 3`. We no longer support those systems and this legacy code can be safely removed.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/301Premature termination of integration when reference particle after MAXSTEPS i...2019-05-15T22:43:30+02:00krausPremature termination of integration when reference particle after MAXSTEPS in implicit drift.The Degrader-1 test is flagged as broken because the number of saved steps in the `.stat` file differ. This is caused by the fact that after 230 steps (MAXSTEPS) the reference particle in the OrbitThreader class is located in a drift, th...The Degrader-1 test is flagged as broken because the number of saved steps in the `.stat` file differ. This is caused by the fact that after 230 steps (MAXSTEPS) the reference particle in the OrbitThreader class is located in a drift, that isn't explicitly mentioned in the input file. During simulation ParallelTTracker stops because it seems to have reached the end of the beamline.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/300reading H5Block formatted field-maps crashes2019-04-12T10:47:46+02:00gsellreading H5Block formatted field-maps crashesif the size of the field-map in z-direction is less than the number of cores, reading the field-map crashes.
This is already fixed in OPAL 2.0: see 0172837a and #292 if the size of the field-map in z-direction is less than the number of cores, reading the field-map crashes.
This is already fixed in OPAL 2.0: see 0172837a and #292 gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/299Implement a better format for the material parameters in CollimatorPhysics2019-04-12T13:45:26+02:00krausImplement a better format for the material parameters in CollimatorPhysicsCurrently the material parameters are stored in a big `if ... else if ... else`. This isn't very nice and can't be easily extended.Currently the material parameters are stored in a big `if ... else if ... else`. This isn't very nice and can't be easily extended.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/298Reference particle has to be slowed down by material2019-08-01T05:57:13+02:00krausReference particle has to be slowed down by materialAt the moment the reference particle isn't slowed down when passing a degrader. The beam then has a different kinetic energy which poses a problem in subsequent dipoles and in the statistical analysis.At the moment the reference particle isn't slowed down when passing a degrader. The beam then has a different kinetic energy which poses a problem in subsequent dipoles and in the statistical analysis.krauskraushttps://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/296add missing license2019-04-03T16:55:09+02:00gselladd missing licenseThe OPAL license file is a placeholder only and must be replaced with GNU GPLv3 fileThe OPAL license file is a placeholder only and must be replaced with GNU GPLv3 filegsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/295ParallelTTracker crashes when using particle matter integration and space cha...2019-04-12T13:26:34+02:00krausParallelTTracker crashes when using particle matter integration and space charge solver if all particles are in material```
ParallelTTracker [2]> --- CollimatorPhysics - Name AIR1 Material AIR
ParallelTTracker [2]> Particle Statistics @ 12:29:52
ParallelTTracker [2]> entered: 1
ParallelTTracker [2]> rediffused: 0
ParallelTTracker [2]>...```
ParallelTTracker [2]> --- CollimatorPhysics - Name AIR1 Material AIR
ParallelTTracker [2]> Particle Statistics @ 12:29:52
ParallelTTracker [2]> entered: 1
ParallelTTracker [2]> rediffused: 0
ParallelTTracker [2]> stopped: 0
ParallelTTracker [2]> total in material: 50'000
Error>
Error> *** User error detected by function "boundp() "
Error> h<0, can not build a mesh
Error> h<0, can not build a mesh
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode -100.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
```krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/294ParallelCyclotronTracker crashes (in single particle?) mode when all particle...2019-04-04T13:32:15+02:00snuverink_jjochem.snuverink@psi.chParallelCyclotronTracker crashes (in single particle?) mode when all particles are lostI noticed that in single particle mode (might not be related) that if all particles (in this case on a stripper) are lost OPAL crashes:
```
OPAL> At step 25071, lost 1 particles on stripper, collimator, septum, or out of cyclotron apert...I noticed that in single particle mode (might not be related) that if all particles (in this case on a stripper) are lost OPAL crashes:
```
OPAL> At step 25071, lost 1 particles on stripper, collimator, septum, or out of cyclotron aperture
Error>
Error> *** User error detected by function "boundp() "
Error> h<0, can not build a mesh
Error> h<0, can not build a mesh
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode -100.
```
In [ParallelCyclotronTracker::deleteParticle()](https://gitlab.psi.ch/OPAL/src/blob/master/src/Algorithms/ParallelCyclotronTracker.cpp#L2169) there needs to be a check after the particles are removed if there are any particles left and early return before the [boundp()](https://gitlab.psi.ch/OPAL/src/blob/master/src/Algorithms/ParallelCyclotronTracker.cpp#L2243) call.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/293Stripper Element not losing any particles2019-04-06T09:55:12+02:00snuverink_jjochem.snuverink@psi.chStripper Element not losing any particlesDiscovered by @ext\-calvo\_p . The stripper element is not recording any particles.
This is due to a forgotten `bunch->get_bounds()` statement. This was introduced in commit 60b4de13 and 57787997 (OPAL-2.0)Discovered by @ext\-calvo\_p . The stripper element is not recording any particles.
This is due to a forgotten `bunch->get_bounds()` statement. This was introduced in commit 60b4de13 and 57787997 (OPAL-2.0)snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/292reading H5hut fieldmap fails due to unset view2019-04-12T10:57:21+02:00gsellreading H5hut fieldmap fails due to unset viewIn method FM3dH5Block::readMap() a view must be set before we can read the map.In method FM3dH5Block::readMap() a view must be set before we can read the map.gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/291Review ippl/test directory2020-03-04T08:09:21+01:00snuverink_jjochem.snuverink@psi.chReview ippl/test directoryIdeally all relevant tests of `ippl/test` can be moved into the unit test directory. And the remaining files can be deleted.
**Unit Test**
- [x] adaTests/TestDot1.cpp (see !225)
- [x] adaTests/TestDot2.cpp (see !225)
- [x] Cartesian/Te...Ideally all relevant tests of `ippl/test` can be moved into the unit test directory. And the remaining files can be deleted.
**Unit Test**
- [x] adaTests/TestDot1.cpp (see !225)
- [x] adaTests/TestDot2.cpp (see !225)
- [x] Cartesian/TestCartesian-1.cpp (see !225)
- [x] ~~Hal/yfld_q1.cpp~~ (see !245)
- [x] ~~Hal/yfld_q2.cpp~~ (see !245)
- [x] particle/chsr-2.cpp (!260, !270)
- [x] simple/* (!225 !239 !270)
- [x] ~~2ddiffusion-1.cpp~~ (!270)
- [x] bc.cpp (!270)
- [x] bc2.cpp (!270)
- [x] ~~bc3.cpp~~ (!270)
- [x] bool.cpp (!270)
- [x] ctoc.cpp (!270)
- [x] cv.cpp (!270)
- [x] ~~doof2d_complex.cpp~~ (!270)
- [x] doof2d_file.cpp (!270)
- [x] ~~doof2d_simple.cpp~~ (!270)
- [x] ~~doof2d_vis.cpp~~ (!270)
- [x] doof3d_file.cpp (!270)
- [x] ~~doof3d_vis.cpp~~ (!270)
- [x] fivefields.cpp (!270)
- [x] float.cpp (!270)
- [x] flyercode.cpp (!270)
- [x] funcface.cpp (!270)
- [x] FVecOps.cpp (!270)
- [x] ~~gcprint.cpp~~ (!270)
- [x] left.cpp (!270)
- [x] minmax.cpp (!270)
- [x] reduce.cpp (!270)
- [x] repartition.cpp (!270)
- [x] ~~repartition.cpp.org~~ (!270)
- [x] single.cpp (!270)
- [x] subdivide.cpp (!270)
- [x] subreadtest.cpp (!270)
- [x] t.cpp (!270)
- [x] t2.cpp (!270)
- [x] t3.cpp (!270)
- [x] t4.cpp (!270)
- [x] t5.cpp (!270)
- [x] t6.cpp (!270)
- [x] t7.cpp (!270)
- [x] t8.cpp (!270)
- [x] TestFieldDebug2.cpp (!270)
- [x] TestParticleDebug.cpp (!270)
- [x] ~~TestParticleDebugParallel.cpp~~ (!270)
- [x] TestPeriodicBC.cpp (!270)
- [x] tv.cpp (!270)
- [x] vc.cpp (!270)
- [x] ~~simple-new/*~~ (see !245)
- [x] sindex/* (see !239)
**Application**
- [x] ~~6dtrack/*~~ (!260)
- [x] AMR/* (see #426)
- [x] ~~CavityTrack/cavitytrack.cpp~~ (!260)
- [x] FFT/* (!260)
- [x] FFT/SeaborgRes/* (!271)
- [x] nok/t3.cpp (!264)
- [x] parallel/2ddens.cpp (!264)
- [x] parallel/dualmpi.cpp (!264)
- [x] parallel/reduce-1.cpp (!264)
- [x] parallel/reduce-2.cpp (!264)
- [x] parallel/volley.cpp (!264)
- [x] particle/chsr-1.cpp (!264)
- [x] particle/p3m3d.cpp (!260)
- [x] particle/p3m3dHeating.cpp (!260)
- [x] particle/p3m3dMicrobunching.cpp (!260)
- [x] particle/p3m3dRegressionTests.cpp (!260)
- [x] ~~particle/p3m3dTwoStream.cpp~~ (!260)
- [x] particle/p3m3dTwoStreamParallel.cpp
- [x] particle/pbconds3D.cpp (!264)
- [x] particle/PIC3d.cpp (!260)
- [x] particle/salman-1.cpp (!260)
- [x] particle/test-scatter-1.cpp (!260)
- [x] PwrSpec (!260)
- [x] simple/fermi-dirac-field.cpp (!270)
- [x] simple/ScalarAdvection.cpp (!270)
- [x] sindex/TestSIndex.cpp (!270)
- [x] toyfdtf
- [x] ~~ttrack~~ (!260)
- [x] ~~twostream-1~~ (!260)
**Remove** (!219)
- [x] hdf5/*
- [x] particle/1dperiodic.cpp
- [x] particle/cref.cpp
- [x] particle/DiscParticle.cpp
- [x] particle/FFTFieldSolver.cpp
- [x] particle/FieldCompare.cpp
- [x] particle/interpolate.cpp
- [x] particle/neighNodeTest1.cpp
- [x] particle/PairTest.cpp
- [x] particle/parexp.cpp
- [x] particle/pbconds.cpp
- [x] particle/pbconds_vis.cpp
- [x] particle/pdbtest.cpp
- [x] particle/PIC2d.cpp
- [x] particle/PIC3dBCo-p.cpp
- [x] particle/PIC3d-timing-1.cpp
- [x] particle/PIC3dBCo-p.cpp.nok
- [x] particle/spatial.cpp
- [x] particle/spatial.cpp.org
- [x] particle/test-update-1.cpp
- [x] particle/typtest.cpp
- [x] particle/uniform.cpp
- [x] particle/vlasovBB1D.cpp
- [x] poissonsolvers/*
- [x] speed/*snuverink_jjochem.snuverink@psi.chfrey_msnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/290Cleanup tests directory from non-unit tests2019-04-05T14:40:28+02:00snuverink_jjochem.snuverink@psi.chCleanup tests directory from non-unit testsThe tests directory is polluted with other input files. These should be (re)moved.The tests directory is polluted with other input files. These should be (re)moved.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/289Cleanup unused and outdated files2019-04-18T08:44:12+02:00snuverink_jjochem.snuverink@psi.chCleanup unused and outdated filesI propose to remove all unused and outdated files from the repo.
The following source files are affected:
* MPWriter/MPReader
* ~~bet/math/functions~~
* ~~bet/math/svdfit~~
* ~~bet/error.h/cpp (superseeded by BetError.h)~~
* ~~bet/erro...I propose to remove all unused and outdated files from the repo.
The following source files are affected:
* MPWriter/MPReader
* ~~bet/math/functions~~
* ~~bet/math/svdfit~~
* ~~bet/error.h/cpp (superseeded by BetError.h)~~
* ~~bet/error.C~~
* ~~bet/math/integrate (Leff,Leff2,Labs not used in profile)~~
* ~~bet/math/sort all except sort2~~
* Algorithms/AutophaseTracker
* ippl/src/Particle/ParticleSpatialLayout.hNudge and ippl/src/Particle/ParticleSpatialLayout.cppNudge
* ~~src/Classic/FixedAlgebra/ ComplexEigen and FComplexEigen~~
* ~~src/Classic/Algebra/NormalForm~~
* src/Classic/Utilities/Gauss
* src/Errors
* optimizer/Comm/Splitter/ReadSplitFromFile.h
* ~~ippl/test/ directory~~
* TaperDomain
* TracerParticles
* Elements/OpalBeamBeam3D
* Elements/OpalBeamBeam
Other files:
* src/Classic/ReadMe
* .gitattributes
More (added 16.04):
* Distribution/halton1d_sequence.cpp
* src/Classic/Main.cpp
* src/Classic/DipoleFieldTest.cpp
* Structure/PriEmissionPhysics.cppsnuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/288attribute nullptr bug2019-05-08T18:00:43+02:00gsellattribute nullptr bugThe attribute base class doesn't initialise the base pointer in some cases.The attribute base class doesn't initialise the base pointer in some cases.gsellgsellhttps://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/286Cyclotron elements geometry option: annulus sector2023-01-27T11:45:55+01:00snuverink_jjochem.snuverink@psi.chCyclotron elements geometry option: annulus sectorSuggested by @matlocha_t: provide an annulus sector as a geometry option for the cyclotron elements (CColimator, Septum, Stripper):
![image](/uploads/9cff1d89a79d8cee66dcd30aa9d21e95/image.png)
The shape can be described as in ANSYS (h...Suggested by @matlocha_t: provide an annulus sector as a geometry option for the cyclotron elements (CColimator, Septum, Stripper):
![image](/uploads/9cff1d89a79d8cee66dcd30aa9d21e95/image.png)
The shape can be described as in ANSYS (https://www.sharcnet.ca/Software/Ansys/16.2.3/en-us/help/ans_cmd/Hlp_C_CYL4.html) with a centre position (x,y), two radii (r1, r2) and two angles.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.ch