src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2023-05-05T12:02:53+02:00https://gitlab.psi.ch/OPAL/src/-/issues/758Quality of life improvements to PyOpal2023-05-05T12:02:53+02:00ext-rogers_cQuality of life improvements to PyOpalFollowing on from #745
Couple of extra "usability" features:
* It should be possible to pass multiple arguments to a "setup" function for PyOpal objects
* If an argument is passed that is not recognised, PyOpal should throw an error. A...Following on from #745
Couple of extra "usability" features:
* It should be possible to pass multiple arguments to a "setup" function for PyOpal objects
* If an argument is passed that is not recognised, PyOpal should throw an error. At the moment PyOpal quietly ignores unrecognised arguments - technically, this is consistent with "normal" python but it is not very nice
* It should be possible to define something as a required argument; if it is undefined, and user tries to use the class in anger (e.g. call to get_field_value) then PyOpal should throw an error.
* It should be possible to make PyOpal run silently (i.e. suppress output) or send output to a file. Bonus points if we can send PyOpal output to sys.stdout!
* In PyOpal/PyCore/Globals.cpp there is a hard coded constant for --processes (3). This should be user defined.2023.1ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/759Check attributes of the cyclotron element2023-05-12T09:45:53+02:00ext-calvo_ppedro.calvo@ciemat.esCheck attributes of the cyclotron elementSome attributes of the cyclotron element must be verified for correct assignment. For example, `MINR` cannot be negative and the initial position of the reference particle (`RINIT` and `ZINIT`) must be defined within the range of the mac...Some attributes of the cyclotron element must be verified for correct assignment. For example, `MINR` cannot be negative and the initial position of the reference particle (`RINIT` and `ZINIT`) must be defined within the range of the machine.2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/760gmsgALL should be common across all objects2023-05-09T09:50:46+02:00ext-rogers_cgmsgALL should be common across all objectsAt the moment a "gmsgALL" is implemented independently by each object. Verbose output can be controlled by command line options like --info but would be nice to control at OPTION level as is done by gmsg. Propose implementing a gmsgALL i...At the moment a "gmsgALL" is implemented independently by each object. Verbose output can be controlled by command line options like --info but would be nice to control at OPTION level as is done by gmsg. Propose implementing a gmsgALL in the same way as gmsg is done.
Task:
* Add gmsgALL to Main.cpp, test/Main.cpp, PyOpal/PyCore/Globals.cpp
* Edit relevant classes to use extern gmsgALL2023.1ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/761Remove duplicate function to check integers2023-05-09T08:03:32+02:00ext-calvo_ppedro.calvo@ciemat.esRemove duplicate function to check integersDumpFields and DumpEMFields have repeated methods to check if an input variable is an integer. A new method could be created to avoid duplication in Util namespaceDumpFields and DumpEMFields have repeated methods to check if an input variable is an integer. A new method could be created to avoid duplication in Util namespace2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/762RFCavity: unify units internally2023-05-09T10:21:56+02:00ext-calvo_ppedro.calvo@ciemat.esRFCavity: unify units internallyAccording to #357, all elements should use the same units internally to eliminate unnecessary conversions and less error-prone. Unit conversion should be done for input parameters upon reading the variables.According to #357, all elements should use the same units internally to eliminate unnecessary conversions and less error-prone. Unit conversion should be done for input parameters upon reading the variables.2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/763ascii2h5block error reading data2023-08-24T11:15:06+02:00ext-calvo_ppedro.calvo@ciemat.esascii2h5block error reading data### Summary
I've got the following error running ascii2h5block tool
```
[proc 0] E: H5Block3dWriteVector3dFieldFloat64: Write to dataset '/Step#0/Block/Efield/0' failed.
```
In addition, the loop to save the results in the h5part for...### Summary
I've got the following error running ascii2h5block tool
```
[proc 0] E: H5Block3dWriteVector3dFieldFloat64: Write to dataset '/Step#0/Block/Efield/0' failed.
```
In addition, the loop to save the results in the h5part format is not necessary, since the input files should already be sorted in the correct format. Therefore, it is sufficient to read the data directly
An enhancement can be included to ensure that the number of data in the fields matches the grid specified in the input header.
### Possible fixes
`H5Block3dSetView` has to be adapted to each field, separately for E-field and H-field.2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/764RingDefinition - Beam rotation and Momentum Tolerance2023-05-16T12:15:30+02:00ext-rogers_cRingDefinition - Beam rotation and Momentum Tolerance### Summary
I would like to be able to introduce an arbitrary rotation to beams in RingDefinition, independent of the azimuthal angle at which the ring is injected. At the moment, transverse "kicks" are enabled by `BEAM_PRINIT` but this...### Summary
I would like to be able to introduce an arbitrary rotation to beams in RingDefinition, independent of the azimuthal angle at which the ring is injected. At the moment, transverse "kicks" are enabled by `BEAM_PRINIT` but this does not permit full rotation through 360 degrees.
My use case:
We decided at a recent meeting that for consistency with the ring layout on the ground in the ring we are designing, the ring should start at "12 o'clock" and proceed in a clockwise direction. OPAL-Cycl mode currently supports element placements in clockwise or anticlockwise direction but beam can only proceed in an anti-clockwise direction.2023.1ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/765Momentum tolerance in Opal-t2023-10-05T17:49:18+02:00ext-calvo_ppedro.calvo@ciemat.esMomentum tolerance in Opal-tPart of #727
A new parameter `MOMENTUM_TOLERANCE` has recently been introduced to control fractional tolerance to deviations in the distribution compared to the reference data at initialisation. This parameter should be extended to be ...Part of #727
A new parameter `MOMENTUM_TOLERANCE` has recently been introduced to control fractional tolerance to deviations in the distribution compared to the reference data at initialisation. This parameter should be extended to be useful in Opal-t.2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/766RF Cavity, Global Offset and Debugging2023-08-22T10:13:18+02:00ext-rogers_cRF Cavity, Global Offset and DebuggingCouple more things to add into PyOpal - Variable Frequency RF Cavity, Global Offset and a couple more minor bug fixesCouple more things to add into PyOpal - Variable Frequency RF Cavity, Global Offset and a couple more minor bug fixes2023.1ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/767Problem in Command DUMPEMFIELDS and DUMPFIELDS2023-08-22T10:12:45+02:00ext-rogers_cProblem in Command DUMPEMFIELDS and DUMPFIELDS### Summary
By email from Dou Gouliang
>>>
When I use the command "DUMPFIELDS" and "DUMPEMFIELDS" , the opal_2.4 shows the error (annex 1):
```
Error> *** Error:
Error> Internal OPAL error:
Error> Assertion 'idx.i < num_gridpx_m - 1' ...### Summary
By email from Dou Gouliang
>>>
When I use the command "DUMPFIELDS" and "DUMPEMFIELDS" , the opal_2.4 shows the error (annex 1):
```
Error> *** Error:
Error> Internal OPAL error:
Error> Assertion 'idx.i < num_gridpx_m - 1' failed.
Error> idx.i = 118, num_gridpx_m - 1 = 118.000000
Error> in
Error> /afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Fields/FM3DH5BlockBase.h, line 163
```
I have checked my inputfile ,and there is no wrong experssion. The detailed experssion is :
```
DUMPEMFIELDS, COORDINATE_SYSTEM = Cartesian, X_START= -0.8, X_STEPS=1601, DX= 0.001, Y_START=-0.25, Y_STEPS=501, DY= 0.001, Z_START=-0.02, Z_STEPS=41, DZ=0.001, T_START=0,T_STEPS=1, DT=0.1 ,FILE_NAME="FIELDEM-MAPXYZ.dat";
```
When I try to split the original output area of X into two parts, opal can output the corresponding two parts normally. First change X_STEPS to 117, and then change X_START and X_STEPS to -0.215 and 204.
And I re-ran another cyclotron simulation and got the same error, except idx.i changed to 14 .
>>>
and later
>>>
I ran it again in a newer version of OPAL(opal-2022.01) and found the same errors. In particular, I used OPAL-2022.01 as a Linux binary package from the official website.
>>>
lattice in attached zip...
[input_file.zip](/uploads/0c4926991866db21e66977b22b9e06c7/input_file.zip)2023.1ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/768testing2023-07-18T10:47:51+02:00sadr_mtesting### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
(How one can reproduce the issue - this is very important)
### What is the current *bug* behavior?
(What actually happens)
### What is the expected *co...### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
(How one can reproduce the issue - this is very important)
### What is the current *bug* behavior?
(What actually happens)
### What is the expected *correct* behavior?
(What you should see instead)
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
### Possible fixes
(If you can, link to the line of code that might be responsible for the problem)2023.1https://gitlab.psi.ch/OPAL/src/-/issues/769remove deprecated Tpetra::StaticProfil2023-08-15T16:30:31+02:00gsellremove deprecated Tpetra::StaticProfil2023.1gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/770linking problems with boost::phoenix2023-08-14T12:34:54+02:00gselllinking problems with boost::phoenixDue to a bug in Boost 1.81.0 and newer we get linking related to boost::phoenix:
```
../optimizer/liboptp.a(expression.cpp.o):(.bss+0x0): multiple definition of `boost::phoenix::placeholders::uarg10'
libOPAL.a(matheval.cpp.o):(.bss+0x0):...Due to a bug in Boost 1.81.0 and newer we get linking related to boost::phoenix:
```
../optimizer/liboptp.a(expression.cpp.o):(.bss+0x0): multiple definition of `boost::phoenix::placeholders::uarg10'
libOPAL.a(matheval.cpp.o):(.bss+0x0): first defined here
```2023.1gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/771use 0.0 instead of epsilon in division by zero check2023-08-17T15:45:04+02:00gselluse 0.0 instead of epsilon in division by zero checkThe division by zero test introduced in !626 should not use a epsilon but 0.0.The division by zero test introduced in !626 should not use a epsilon but 0.0.2023.1gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/772Define TrimCoilType enum2023-08-30T09:38:40+02:00ext-calvo_ppedro.calvo@ciemat.esDefine TrimCoilType enumThe type of trim coil must be defined as a scoped enumeration to avoid string comparisonThe type of trim coil must be defined as a scoped enumeration to avoid string comparison2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/773Cyclotron: unify units internally2023-09-22T14:29:46+02:00ext-calvo_ppedro.calvo@ciemat.esCyclotron: unify units internallyAccording to #357, all elements should use the same units internally to eliminate unnecessary conversions and less error-prone. Unit conversion should be done for input parameters upon reading the variables.According to #357, all elements should use the same units internally to eliminate unnecessary conversions and less error-prone. Unit conversion should be done for input parameters upon reading the variables.2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/774VFFA-1 regression test fails2023-09-14T08:40:39+02:00ext-calvo_ppedro.calvo@ciemat.esVFFA-1 regression test failsVFFA-1 test fails since commit bfc9b5f226219494303f162371c6cc36cdabc10cVFFA-1 test fails since commit bfc9b5f226219494303f162371c6cc36cdabc10c2023.1https://gitlab.psi.ch/OPAL/src/-/issues/775Masks2023-08-30T09:34:47+02:00adelmannMasksThe issue appears to be that when I use certain masks elements, I see bleed through in a particular region. A detailed description of the problem, including reproducer can be found
[here](https://psilists.ethz.ch/sympa/arc/opal/2023-07/...The issue appears to be that when I use certain masks elements, I see bleed through in a particular region. A detailed description of the problem, including reproducer can be found
[here](https://psilists.ethz.ch/sympa/arc/opal/2023-07/msg00021.html)2023.1adelmannadelmannhttps://gitlab.psi.ch/OPAL/src/-/issues/776Remove string comparison in MultiBunchHandler2023-08-29T15:25:01+02:00ext-calvo_ppedro.calvo@ciemat.esRemove string comparison in MultiBunchHandler`setMode` and `setBining` methods can be rewritten to avoid string comparison`setMode` and `setBining` methods can be rewritten to avoid string comparison2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/777Regression test Mask-1 fails2023-09-01T09:24:51+02:00ext-calvo_ppedro.calvo@ciemat.esRegression test Mask-1 failsThe `Mask-1` regression test [fails](http://amas.web.psi.ch/opal/regressionTests/master/results_2023-08-30_21-49.xml) after merging (!633) by small differences with respect to the reference values:
```
Checksum for reference Mask-1.st...The `Mask-1` regression test [fails](http://amas.web.psi.ch/opal/regressionTests/master/results_2023-08-30_21-49.xml) after merging (!633) by small differences with respect to the reference values:
```
Checksum for reference Mask-1.stat.md5 OK
Checksum for reference Mask-1.out.md5 OK
Checksum for reference Mask-1.lbal.md5 OK
Run regression test Mask-1
Test rms_x(last) failed: 4.829711787474912e-06 (eps=2e-08)
Test rms_y(last) failed: 1.6291845585723712e-06 (eps=2e-08)
Test rms_s(last) failed: 9.365723447670588e-07 (eps=2e-08)
Test energy(last) failed: 0.00029003990081832853 (eps=2e-08)
Test numParticles(last) failed: 8.0 (eps=2e-08)
```https://gitlab.psi.ch/OPAL/src/-/issues/778RFkick bug with MTS integrator2023-09-04T11:52:38+02:00ext-calvo_ppedro.calvo@ciemat.esRFkick bug with MTS integratorWorking on #773 I have found that there is an error produced by a wrongly implemented unit change. So up, ParallelCyclotronTracker works internally in ns, therefore, several unit changes are necessary throughout the code.
`ParallelCyclo...Working on #773 I have found that there is an error produced by a wrongly implemented unit change. So up, ParallelCyclotronTracker works internally in ns, therefore, several unit changes are necessary throughout the code.
`ParallelCyclotronTracker::RFkick` method has as input variables `t` and `dt` in ns, as they are subsequently transformed to s in `RFCavity::getMomentaKick`. However, `ParallelCyclotronTracker::push` used with MTS integrator calculates `dt1` in s, and is not changed to ns before calling `RFkick`, so the results are not corrected.
This error affects the RingCyclotronMTS regression tests (OPAL/regression-tests#116).2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/779No lbal output file with ENABLE_AMR2023-09-25T16:06:46+02:00ext-calvo_ppedro.calvo@ciemat.esNo lbal output file with ENABLE_AMR`.lbal` output file is not written when OPAL is compiled with `ENABLE_AMR=TRUE`
`LBalWriter::write(PartBunchBase<double, 3>* beam)` has to be declared upper in SDDSWriter class`.lbal` output file is not written when OPAL is compiled with `ENABLE_AMR=TRUE`
`LBalWriter::write(PartBunchBase<double, 3>* beam)` has to be declared upper in SDDSWriter class2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/780Regression tests broken2023-09-29T12:25:17+02:00ext-calvo_ppedro.calvo@ciemat.esRegression tests brokenBeamLine-1, BeamLine-2 and PROSCAN-1 regression tests [are broken](http://amas.web.psi.ch/opal/regressionTests/master/results_2023-08-24_21-49.xml) since f1081e540647eef178c4350fd97b82d45e814cdcBeamLine-1, BeamLine-2 and PROSCAN-1 regression tests [are broken](http://amas.web.psi.ch/opal/regressionTests/master/results_2023-08-24_21-49.xml) since f1081e540647eef178c4350fd97b82d45e814cdc2023.1sadr_msadr_mhttps://gitlab.psi.ch/OPAL/src/-/issues/781Segmentation fault running Opal-cycl with boundary geometry2023-09-13T11:20:37+02:00ext-calvo_ppedro.calvo@ciemat.esSegmentation fault running Opal-cycl with boundary geometryI've got an unexpected segmentation fault running Opal-Cycl simulations.
```
[aceler15:459721] *** Process received signal ***
[aceler15:459721] Signal: Segmentation fault (11)
[aceler15:459721] Associated errno: Unknown error 21871 (21...I've got an unexpected segmentation fault running Opal-Cycl simulations.
```
[aceler15:459721] *** Process received signal ***
[aceler15:459721] Signal: Segmentation fault (11)
[aceler15:459721] Associated errno: Unknown error 21871 (21871)
[aceler15:459721] Signal code: (-1210805744)
[aceler15:459721] Failing at address: 0x25c
[aceler15:459721] [ 0] /usr/lib64/libc.so.6(+0x4eb50)[0x7f5ab1a7fb50]
[aceler15:459721] [ 1] opal(+0xecc644)[0x556f23eb8644]
[aceler15:459721] [ 2] opal(+0x9c528a)[0x556f239b128a]
[aceler15:459721] [ 3] opal(+0x75b576)[0x556f23747576]
[aceler15:459721] [ 4] opal(+0x75b899)[0x556f23747899]
[aceler15:459721] [ 5] opal(+0x718d6a)[0x556f23704d6a]
[aceler15:459721] [ 6] /usr/lib64/libc.so.6(+0x5126c)[0x7f5ab1a8226c]
[aceler15:459721] [ 7] /usr/lib64/libc.so.6(on_exit+0x0)[0x7f5ab1a823a0]
[aceler15:459721] [ 8] /usr/lib64/libc.so.6(__libc_start_main+0xec)[0x7f5ab1a6bd8c]
[aceler15:459721] [ 9] opal(+0x5243ae)[0x556f235103ae]
[aceler15:459721] *** End of error message ***
--------------------------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
```
I attach the input files needed to reproduce the issue:
[tracking.in](/uploads/a84549a3f0c0e72fc2528edade1b1001/tracking.in)
[particulas_1E4.dat](/uploads/b398ed9242251cb467a9f440ac6ac824/particulas_1E4.dat)
[Geom_holeTargetLine.h5](/uploads/84d6c6c15d316fc0228fd3b04affaa1a/Geom_holeTargetLine.h5)
[Gap_18ene19.h5part](https://gitlab.psi.ch/OPAL/src/uploads/e46d8e040ba6dd3d973d458949a71b47/Gap_18ene19.h5part)
[Vacio_18ene19_2mm.h5part](https://gitlab.psi.ch/OPAL/src/uploads/cf9c48fc479e96e4491f6f687e946154/Vacio_18ene19_2mm.h5part)
[BField_real_4T_2.dat](https://gitlab.psi.ch/OPAL/src/uploads/f9567783d8a24a17dbb5a36c6c30bef8/BField_real_4T_2.dat)
Curiously, the simulation finalizes properly… (see [tracking.out](/uploads/8bdb58dbba9b08d6b50f6642e1ea9be4/tracking.out))2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/782Single-particle simulation gets stuck2023-09-07T08:41:49+02:00ext-calvo_ppedro.calvo@ciemat.esSingle-particle simulation gets stuck### Summary
The simulation hangs when try to run single-particle simulation in parallel.
### Steps to reproduce
Run RingCyclotronSingleParticle regression test
```
mpirun -np 4 RingCyclotronSingleParticle.in
```
### What is the cur...### Summary
The simulation hangs when try to run single-particle simulation in parallel.
### Steps to reproduce
Run RingCyclotronSingleParticle regression test
```
mpirun -np 4 RingCyclotronSingleParticle.in
```
### What is the current *bug* behavior?
The reduce function of IPPL called in `Distribution::printDist` fails.
### What is the expected *correct* behavior?
There is an exception in `ParallelCyclotronTracker::initializeTracking_m` to avoid it, but the simulation gets stuck before entering the tracker.
### Possible fixes
A feasible solution is introduced a check between the number of particles in the distribution and the number of nodes before that, in `Distribution::checkParticleNumber`2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/783Define AMR refinement criteria as scoped enum2023-09-18T16:25:13+02:00ext-calvo_ppedro.calvo@ciemat.esDefine AMR refinement criteria as scoped enumTaggingCriteria must be defined as a scoped enumeration to avoid string comparisonTaggingCriteria must be defined as a scoped enumeration to avoid string comparison2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/785h5 file initialization2023-09-20T15:10:25+02:00ext-calvo_ppedro.calvo@ciemat.esh5 file initializationThe output file in HDF5 format (.h5) should be created only when the option `ENABLEHDF5 = TRUE`. Currently, when this option is not selected, an empty file is created. In addition, the `H5PartWrapper` call can be refactored to avoid code...The output file in HDF5 format (.h5) should be created only when the option `ENABLEHDF5 = TRUE`. Currently, when this option is not selected, an empty file is created. In addition, the `H5PartWrapper` call can be refactored to avoid code duplication.2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/786Unused degrader attributes2023-10-10T16:03:08+02:00ext-calvo_ppedro.calvo@ciemat.esUnused degrader attributesThe attributes of the degrader (`XSIZE` and `YSIZE`) are currently unused. A function should be added to verify that the particles are inside the element employing these attributes according to the [description](http://amas.web.psi.ch/op...The attributes of the degrader (`XSIZE` and `YSIZE`) are currently unused. A function should be added to verify that the particles are inside the element employing these attributes according to the [description](http://amas.web.psi.ch/opal/Documentation/master/#sec.elements.degrader-opal-t).2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/787VariableRF, FFA, Offset and MultipoleT: unify units internally2023-10-17T13:26:49+02:00ext-calvo_ppedro.calvo@ciemat.esVariableRF, FFA, Offset and MultipoleT: unify units internallyPart of #357: all elements should use the same units internally to eliminate unnecessary conversions and less error-prone.
VariableRF, FFA, Offset and MultipoleT elements use `mm` internally even though the input attributes are correctl...Part of #357: all elements should use the same units internally to eliminate unnecessary conversions and less error-prone.
VariableRF, FFA, Offset and MultipoleT elements use `mm` internally even though the input attributes are correctly implemented in `m`2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/788PyOpal cmake option2023-10-11T10:06:06+02:00ext-calvo_ppedro.calvo@ciemat.esPyOpal cmake optionThe `BUILD_OPAL_PYTHON` flag must be added as a compile option to be available from CMake settingsThe `BUILD_OPAL_PYTHON` flag must be added as a compile option to be available from CMake settings2023.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/789Compile error2023-10-16T13:16:21+02:00ext-rogers_cCompile error### Summary
The main branch fails to compile with the error
```
n file included from /usr/include/c++/11/cassert:44,
from /home/cr67/Software/install/include/boost/numeric/ublas/detail/config.hpp:16,
f...### Summary
The main branch fails to compile with the error
```
n file included from /usr/include/c++/11/cassert:44,
from /home/cr67/Software/install/include/boost/numeric/ublas/detail/config.hpp:16,
from /home/cr67/Software/install/include/boost/numeric/ublas/exception.hpp:19,
from /home/cr67/Software/install/include/boost/numeric/ublas/storage.hpp:26,
from /home/cr67/Software/install/include/boost/numeric/ublas/vector.hpp:21,
from /home/cr67/Software/install/include/boost/numeric/ublas/matrix.hpp:18,
from /home/cr67/Software/OPAL/opal_src_3/src/Algorithms/BoostMatrix.h:21,
from /home/cr67/Software/OPAL/opal_src_3/src/Classic/Algorithms/CoordinateSystemTrafo.h:4,
from /home/cr67/Software/OPAL/opal_src_3/src/Classic/AbsBeamline/ElementBase.h:67,
from /home/cr67/Software/OPAL/opal_src_3/src/AbstractObjects/Element.h:34,
from /home/cr67/Software/OPAL/opal_src_3/src/AbstractObjects/BeamSequence.h:21,
from /home/cr67/Software/OPAL/opal_src_3/src/AbstractObjects/BeamSequence.cpp:19:
/home/cr67/Software/OPAL/opal_src_3/src/Algorithms/BoostMatrix.h: In instantiation of ‘T prod_boost_vector(const boost::numeric::ublas::matrix<double>&, const T&) [with T = Vektor<double, 3>]’:
/home/cr67/Software/OPAL/opal_src_3/src/Classic/Algorithms/CoordinateSystemTrafo.h:78:29: required from here
/home/cr67/Software/OPAL/opal_src_3/src/Algorithms/BoostMatrix.h:28:19: error: ‘const class Vektor<double, 3>’ has no member named ‘size’; did you mean ‘Size’?
28 | assert(vector.size() == 3);
| ~~~~~~~^~~~
```
This arises because the compiler is expecting a method like ``Vektor::size()`` which does not exist. I note that Vektor::Size does appear to exist, but note the upper case.
Not that it should matter, but:
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
### Steps to reproduce
Build the master2023.1https://gitlab.psi.ch/OPAL/src/-/issues/790OpalRingDefinition MAX_R MIN_R options2023-11-15T13:12:39+01:00ext-rogers_cOpalRingDefinition MAX_R MIN_R optionsThere are a few issues with this code:
1) It is not in the wiki/documented
2) The exception in OpalRingDefinition.cpp is a char* not an OpalException
3) If MAX_R, MIN_R is not set, the bound checking seems to happen sometimes anyway - no...There are a few issues with this code:
1) It is not in the wiki/documented
2) The exception in OpalRingDefinition.cpp is a char* not an OpalException
3) If MAX_R, MIN_R is not set, the bound checking seems to happen sometimes anyway - note that `Classic/AbsBeamline/Ring.h` `Ring::willDoAperture_m` defaults to false, so not quite sure what is happening there.
Thanks to @carl_j for spotting.2023.1ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/793OutputPlane2023-12-20T13:35:05+01:00ext-rogers_cOutputPlaneFor some precision work it is important to have accurate readout of particle positions at a particular plane. In the presence of fields, PROBE function interpolation is not accurate enough.
As registered in Issue #22 it would be useful ...For some precision work it is important to have accurate readout of particle positions at a particular plane. In the presence of fields, PROBE function interpolation is not accurate enough.
As registered in Issue #22 it would be useful to have a probe that can be perpendicular to a reference trajectory (for e.g. calculating dispersions/etc).
To meet these requirements I have implemented a new _PluginElement_ called OutputPlane. Features:
- detects hits using a RK4 stepping routine, iteratively finding correct step size to find the intersection of tracks with the plane and registering a hit at the exact point
- position can be specified in 2D using PROBE-style placement or 3D with a centre and normal vector
- position can be specified to update to be aligned with the position/momentum vector when a particle with user-defined ID crosses the plane.
- rectangular or circular apertures can be specified (maximum distance from PROBE centre to register hits)ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/795Regression test broken: string constant duplicated2023-12-11T09:18:24+01:00ext-calvo_ppedro.calvo@ciemat.esRegression test broken: string constant duplicatedAfter merging !648 all the regression tests are broken (see [link](http://amas.web.psi.ch/opal/master/output/2023-12-01_21-49.txt)).
A string constant has been created for an attribute of OutputPlane that overwrites the name of an eleme...After merging !648 all the regression tests are broken (see [link](http://amas.web.psi.ch/opal/master/output/2023-12-01_21-49.txt)).
A string constant has been created for an attribute of OutputPlane that overwrites the name of an element. Therefore, all simulations are broken. The addition of this string constant is not necessary and should be deleted.ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.es