From cb35f849b3bfb93c609782b39581c2c0d10712d4 Mon Sep 17 00:00:00 2001 From: albajacas_a Date: Thu, 26 Nov 2020 10:54:29 +0100 Subject: [PATCH] removed bug. Total dist will be computed only when the solve() function gets removed from undulator.cpp --- .clang-format | 1 + CMakeLists.txt | 2 +- CMakeModules/FindMITHRA.cmake | 32 +- src/Algorithms/ParallelTTracker.cpp | 33 +- src/Algorithms/ParallelTTracker.h | 25 +- src/CMakeLists.txt | 5 + src/Classic/AbsBeamline/BeamlineVisitor.h | 8 + src/Classic/AbsBeamline/CMakeLists.txt | 17 +- src/Classic/AbsBeamline/ElementBase.cpp | 4 + src/Classic/AbsBeamline/ElementBase.h | 1 + .../AbsBeamline/SpecificElementVisitor.h | 16 + src/Classic/AbsBeamline/Undulator.cpp | 347 ++++++++++++++++++ src/Classic/AbsBeamline/Undulator.h | 116 ++++++ src/Classic/Algorithms/DefaultVisitor.cpp | 9 + src/Classic/Algorithms/DefaultVisitor.h | 5 + src/Classic/BeamlineCore/CMakeLists.txt | 17 +- src/Classic/BeamlineCore/UndulatorRep.cpp | 77 ++++ src/Classic/BeamlineCore/UndulatorRep.h | 75 ++++ src/Elements/CMakeLists.txt | 17 +- src/Elements/OpalUndulator.cpp | 94 +++++ src/Elements/OpalUndulator.h | 62 ++++ src/OpalConfigure/Configure.cpp | 6 + tests/classic_src/AbsBeamline/CMakeLists.txt | 4 + .../classic_src/AbsBeamline/UndulatorTest.cpp | 114 ++++++ tools/emacs/opal.el | 8 +- 25 files changed, 1063 insertions(+), 32 deletions(-) create mode 100644 src/Classic/AbsBeamline/Undulator.cpp create mode 100644 src/Classic/AbsBeamline/Undulator.h create mode 100644 src/Classic/BeamlineCore/UndulatorRep.cpp create mode 100644 src/Classic/BeamlineCore/UndulatorRep.h create mode 100644 src/Elements/OpalUndulator.cpp create mode 100644 src/Elements/OpalUndulator.h create mode 100644 tests/classic_src/AbsBeamline/UndulatorTest.cpp diff --git a/.clang-format b/.clang-format index c84d276d7..cc30390a6 100644 --- a/.clang-format +++ b/.clang-format @@ -10,6 +10,7 @@ AllowShortLambdasOnASingleLine: Empty AllowShortLoopsOnASingleLine: false BreakBeforeBinaryOperators: NonAssignment ColumnLimit: 100 +DerivePointerAlignment: false IndentWidth: 4 IncludeBlocks: Preserve IndentGotoLabels: false diff --git a/CMakeLists.txt b/CMakeLists.txt index 4151f3d3e..fb0579e11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,7 +208,7 @@ option (ENABLE_OPAL_FEL "Enable OPAL FEL" OFF) if (ENABLE_OPAL_FEL) message (STATUS "Enable OPAL FEL: " ${ENABLE_OPAL_FEL}) find_package (MITHRA MODULE REQUIRED) - add_definitions (-DOPAL_FEL) + add_definitions (-DENABLE_OPAL_FEL) endif() option (DBG_SCALARFIELD "Enable dump of scalar field rho_m" OFF) diff --git a/CMakeModules/FindMITHRA.cmake b/CMakeModules/FindMITHRA.cmake index 6e1062e46..150b23331 100644 --- a/CMakeModules/FindMITHRA.cmake +++ b/CMakeModules/FindMITHRA.cmake @@ -3,23 +3,47 @@ # https://github.com/aryafallahi/mithra # # MITHRA_INCLUDE_DIR +# MITHRA_LIBRARY_DIR # MITHRA_FOUND -find_path (MITHRA_INCLUDE_DIR mithra/classes.hh - HINTS $ENV{MITHRA_INCLUDE_PATH} $ENV{MITHRA_INCLUDE_DIR} $ENV{MITHRA_PREFIX}/include $ENV{MITHRA_DIR}/include $ENV{MITHRA}/include - PATHS ENV C_INCLUDE_PATH CPLUS_INCLUDE_PATH +find_path (MITHRA_INCLUDE_DIR mithra/classes.h + HINTS $ENV{MITHRA_INCLUDE_DIR} $ENV{MITHRA_INCLUDE_PATH} $ENV{MITHRA_PREFIX}/include $ENV{MITHRA}/include ) -if (MITHRA_INCLUDE_DIR) +find_path (MITHRA_LIBRARY_DIR libmithra.a + HINTS $ENV{MITHRA_LIBRARY_DIR} $ENV{MITHRA_LIBRARY_PATH} $ENV{MITHRA_PREFIX}/lib $ENV{MITHRA}/lib +) + +if (MITHRA_INCLUDE_DIR AND MITHRA_LIBRARY_DIR) set (MITHRA_FOUND "YES") endif () if (MITHRA_FOUND) if (NOT MITHRA_FIND_QUIETLY) message (STATUS "Found MITHRA include dir: ${MITHRA_INCLUDE_DIR}") + message (STATUS "Found MITHRA library dir: ${MITHRA_LIBRARY_DIR}") endif () else (MITHRA_FOUND) if (MITHRA_FIND_REQUIRED) + if (NOT MITHRA_INCLUDE_DIR) + message (WARNING + "MITHRA include directory was not found! " + "Make sure that MITHRA is compiled and that " + "the directory mithra/include/mithra has been automatically created. " + "Also make sure that at least one of the following " + "environment variables is set: " + "MITHRA_INCLUDE_DIR, MITHRA_INCLUDE_PATH, MITHRA_PREFIX, or MITHRA.") + endif () + if (NOT MITHRA_LIBRARY_DIR) + message (WARNING + "MITHRA library was not found! " + "Make sure that MITHRA is compiled and that " + "the directory mithra/lib has been automatically created. " + "Also make sure that at least one of the following " + "environment variables is set: " + "MITHRA_LIBRARY_DIR, MITHRA_LIBRARY_PATH, MITHRA_PREFIX, or MITHRA.") + endif () + message (STATUS "MITHRA can be downloaded and compiled from https://github.com/aryafallahi/mithra.git") message (FATAL_ERROR "Could not find MITHRA!") endif (MITHRA_FIND_REQUIRED) endif (MITHRA_FOUND) diff --git a/src/Algorithms/ParallelTTracker.cpp b/src/Algorithms/ParallelTTracker.cpp index 5feec6ff8..3565273ea 100644 --- a/src/Algorithms/ParallelTTracker.cpp +++ b/src/Algorithms/ParallelTTracker.cpp @@ -51,6 +51,10 @@ #include "Structure/BoundaryGeometry.h" #include "AbsBeamline/Monitor.h" +#ifdef ENABLE_OPAL_FEL +#include "BeamlineCore/UndulatorRep.h" +#endif + class PartData; ParallelTTracker::ParallelTTracker(const Beamline &beamline, @@ -572,6 +576,9 @@ void ParallelTTracker::computeExternalFields(OrbitThreader &oth) { IpplTimings::stopTimer(fieldEvaluationTimer_m); computeWakefield(elements); +#ifdef ENABLE_OPAL_FEL + computeUndulator(elements); +#endif computeParticleMatterInteraction(elements, oth); reduce(locPartOutOfBounds, globPartOutOfBounds, OpOrAssign()); @@ -598,6 +605,30 @@ void ParallelTTracker::computeExternalFields(OrbitThreader &oth) { } } +#ifdef ENABLE_OPAL_FEL +void ParallelTTracker::computeUndulator(IndexMap::value_t &elements) { + // Check if bunch has entered undulator field. + UndulatorRep* und; + IndexMap::value_t::const_iterator it = elements.begin(); + for (; it != elements.end(); ++ it) + if ((*it)->getType() == ElementBase::UNDULATOR) { + und = dynamic_cast(it->get()); + if (!und->getHasBeenSimulated()) + break; + } + if (it == elements.end()) + return; + + // Apply MITHRA full wave solver for undulator. + CoordinateSystemTrafo refToLocalCSTrafo = (itsOpalBeamline_m.getMisalignment((*it)) * + (itsOpalBeamline_m.getCSTrafoLab2Local((*it)) * itsBunch_m->toLabTrafo_m)); + + und->apply(itsBunch_m, refToLocalCSTrafo); + + evenlyDistributeParticles(); +} +#endif + void ParallelTTracker::computeWakefield(IndexMap::value_t &elements) { bool hasWake = false; WakeFunction *wfInstance; @@ -1377,4 +1408,4 @@ void ParallelTTracker::evenlyDistributeParticles() { if (requests.size() > 0) { MPI_Waitall(requests.size(), &(requests[0]), MPI_STATUSES_IGNORE); } -} +} \ No newline at end of file diff --git a/src/Algorithms/ParallelTTracker.h b/src/Algorithms/ParallelTTracker.h index 6a808e764..bafa18118 100644 --- a/src/Algorithms/ParallelTTracker.h +++ b/src/Algorithms/ParallelTTracker.h @@ -39,8 +39,8 @@ #include "AbsBeamline/Corrector.h" #include "AbsBeamline/Degrader.h" #include "AbsBeamline/Drift.h" -#include "AbsBeamline/FlexibleCollimator.h" #include "AbsBeamline/ElementBase.h" +#include "AbsBeamline/FlexibleCollimator.h" #include "AbsBeamline/Marker.h" #include "AbsBeamline/Monitor.h" #include "AbsBeamline/Multipole.h" @@ -49,10 +49,14 @@ #include "AbsBeamline/RBend.h" #include "AbsBeamline/RBend3D.h" #include "AbsBeamline/RFCavity.h" -#include "AbsBeamline/TravelingWave.h" #include "AbsBeamline/SBend.h" #include "AbsBeamline/Septum.h" #include "AbsBeamline/Solenoid.h" +#include "AbsBeamline/TravelingWave.h" + +#ifdef ENABLE_OPAL_FEL +#include "AbsBeamline/Undulator.h" +#endif #include "Beamlines/Beamline.h" #include "Elements/OpalBeamline.h" @@ -142,7 +146,12 @@ public: /// Apply the algorithm to a RFCavity. virtual void visitTravelingWave(const TravelingWave &); - + +#ifdef ENABLE_OPAL_FEL + /// Apply the algorithm to an Undulator. + virtual void visitUndulator(const Undulator &); +#endif + /// Apply the algorithm to a SBend. virtual void visitSBend(const SBend &); @@ -151,7 +160,7 @@ public: /// Apply the algorithm to a Solenoid. virtual void visitSolenoid(const Solenoid &); - + /// Apply the algorithm to a Solenoid. virtual void visitSource(const Source &); @@ -247,6 +256,9 @@ private: void computeExternalFields(OrbitThreader &oth); void computeWakefield(IndexMap::value_t &elements); void computeParticleMatterInteraction(IndexMap::value_t elements, OrbitThreader &oth); +#ifdef ENABLE_OPAL_FEL + void computeUndulator(IndexMap::value_t &elements); +#endif void computeSpaceChargeFields(unsigned long long step); // void prepareOpalBeamlineSections(); void dumpStats(long long step, bool psDump, bool statDump); @@ -338,6 +350,11 @@ inline void ParallelTTracker::visitTravelingWave(const TravelingWave &as) { itsOpalBeamline_m.visit(as, *this, itsBunch_m); } +#ifdef ENABLE_OPAL_FEL +inline void ParallelTTracker::visitUndulator(const Undulator &u) { + itsOpalBeamline_m.visit(u, *this, itsBunch_m); +} +#endif inline void ParallelTTracker::visitSBend(const SBend &bend) { itsOpalBeamline_m.visit(bend, *this, itsBunch_m); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2604a58eb..f1ee3b63f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -145,6 +145,11 @@ target_link_libraries( opal ${CMAKE_DL_LIBS} ) +if (ENABLE_OPAL_FEL) + include_directories (${MITHRA_INCLUDE_DIR}) + target_link_libraries(libOPAL ${MITHRA_LIBRARY_DIR}/libmithra.a) +endif() + install (TARGETS ${TEST_EXE} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") install (TARGETS opal RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") install (TARGETS libOPAL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") diff --git a/src/Classic/AbsBeamline/BeamlineVisitor.h b/src/Classic/AbsBeamline/BeamlineVisitor.h index 5f7584a1e..40c464d68 100644 --- a/src/Classic/AbsBeamline/BeamlineVisitor.h +++ b/src/Classic/AbsBeamline/BeamlineVisitor.h @@ -69,6 +69,9 @@ class Solenoid; class Source; class Stripper; class TravelingWave; +#ifdef ENABLE_OPAL_FEL +class Undulator; +#endif class VariableRFCavity; class VariableRFCavityFringeField; class VerticalFFAMagnet; @@ -156,6 +159,11 @@ public: /// Apply the algorithm to a RF cavity. virtual void visitTravelingWave(const TravelingWave &) = 0; +#ifdef ENABLE_OPAL_FEL + /// Apply the algorithm to an undulator space. + virtual void visitUndulator(const Undulator &) = 0; +#endif + /// Apply the algorithm to a sector bend. virtual void visitSBend(const SBend &) = 0; diff --git a/src/Classic/AbsBeamline/CMakeLists.txt b/src/Classic/AbsBeamline/CMakeLists.txt index a14f66386..14eb7daae 100644 --- a/src/Classic/AbsBeamline/CMakeLists.txt +++ b/src/Classic/AbsBeamline/CMakeLists.txt @@ -43,12 +43,6 @@ set (_SRCS VerticalFFAMagnet.cpp ) -include_directories ( - ${CMAKE_CURRENT_SOURCE_DIR} - ) - -add_opal_sources (${_SRCS}) - set (HDRS AttributeSet.h BeamlineVisitor.h @@ -92,4 +86,15 @@ set (HDRS VerticalFFAMagnet.h ) +if (ENABLE_OPAL_FEL) + list (APPEND _SRCS Undulator.cpp) + list (APPEND HDRS Undulator.h) +endif () + +include_directories ( + ${CMAKE_CURRENT_SOURCE_DIR} + ) + +add_opal_sources (${_SRCS}) + install (FILES ${HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/AbsBeamline") diff --git a/src/Classic/AbsBeamline/ElementBase.cpp b/src/Classic/AbsBeamline/ElementBase.cpp index 8613c5197..c3e2a8474 100644 --- a/src/Classic/AbsBeamline/ElementBase.cpp +++ b/src/Classic/AbsBeamline/ElementBase.cpp @@ -232,6 +232,10 @@ std::string ElementBase::getTypeString(ElementBase::ElementType type) { return "Stripper"; case TRAVELINGWAVE: return "TravelingWave"; +#ifdef ENABLE_OPAL_FEL + case UNDULATOR: + return "Undulator"; +#endif case VARIABLERFCAVITY: return "VariableRFCavity"; case ANY: diff --git a/src/Classic/AbsBeamline/ElementBase.h b/src/Classic/AbsBeamline/ElementBase.h index 87f5d6e8e..3095bf644 100644 --- a/src/Classic/AbsBeamline/ElementBase.h +++ b/src/Classic/AbsBeamline/ElementBase.h @@ -132,6 +132,7 @@ public: , SOURCE , STRIPPER , TRAVELINGWAVE + , UNDULATOR , VARIABLERFCAVITY , ANY}; diff --git a/src/Classic/AbsBeamline/SpecificElementVisitor.h b/src/Classic/AbsBeamline/SpecificElementVisitor.h index f64540f91..79758e861 100644 --- a/src/Classic/AbsBeamline/SpecificElementVisitor.h +++ b/src/Classic/AbsBeamline/SpecificElementVisitor.h @@ -54,6 +54,10 @@ #include "AbsBeamline/Source.h" #include "AbsBeamline/Stripper.h" +#ifdef ENABLE_OPAL_FEL +#include "AbsBeamline/Undulator.h" +#endif + #include "Beamlines/Beamline.h" #include "Beamlines/FlaggedElmPtr.h" @@ -155,6 +159,11 @@ public: /// Apply the algorithm to a RF cavity. virtual void visitTravelingWave(const TravelingWave &); +#ifdef ENABLE_OPAL_FEL + /// Apply the algorithm to an undulator. + virtual void visitUndulator(const Undulator &); +#endif + /// Apply the algorithm to a sector bend. virtual void visitSBend(const SBend &); @@ -342,6 +351,13 @@ void SpecificElementVisitor::visitTravelingWave(const TravelingWave &eleme CastsTrait::apply(allElementsOfTypeE, element); } +#ifdef ENABLE_OPAL_FEL +template +void SpecificElementVisitor::visitUndulator(const Undulator &element) { + CastsTrait::apply(allElementsOfTypeE, element); +} +#endif + template void SpecificElementVisitor::visitSBend(const SBend &element) { CastsTrait::apply(allElementsOfTypeE, element); diff --git a/src/Classic/AbsBeamline/Undulator.cpp b/src/Classic/AbsBeamline/Undulator.cpp new file mode 100644 index 000000000..c3d2402c0 --- /dev/null +++ b/src/Classic/AbsBeamline/Undulator.cpp @@ -0,0 +1,347 @@ +// +// Class Undulator +// Defines all the methods used by the Undulator element. +// The Undulator element uses a full wave solver from the +// MITHRA library, see . +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#include "AbsBeamline/Undulator.h" + +#include "AbsBeamline/BeamlineVisitor.h" +#include "Algorithms/PartBunchBase.h" +#include "Physics/Physics.h" + +#include +#include +#include "mithra/classes.h" +#include "mithra/database.h" +#include "mithra/datainput.h" +#include "mithra/fdtdSC.h" +#include "mithra/fieldvector.h" +#include "mithra/readdata.h" +#include "mithra/stdinclude.h" + +extern Inform* gmsg; + +Undulator::Undulator() : Undulator("") { +} + +Undulator::Undulator(const Undulator& right) + : Component(right), + k_m(right.k_m), + lambda_m(right.lambda_m), + numPeriods_m(right.numPeriods_m), + angle_m(right.angle_m), + fname_m(right.fname_m), + meshLength_m(right.meshLength_m), + meshResolution_m(right.meshResolution_m), + truncationOrder_m(right.truncationOrder_m), + totalTime_m(right.totalTime_m), + dtBunch_m(right.dtBunch_m), + hasBeenSimulated_m(right.hasBeenSimulated_m) { +} + +Undulator::Undulator(const std::string& name) + : Component(name), + k_m(0.0), + lambda_m(0.0), + numPeriods_m(0), + angle_m(0.0), + fname_m(""), + meshLength_m(3, 0.0), + meshResolution_m(3, 0.0), + truncationOrder_m(2), + totalTime_m(0.0), + dtBunch_m(0.0), + hasBeenSimulated_m(false) { +} + +Undulator::~Undulator() { +} + +void Undulator::accept(BeamlineVisitor& visitor) const { + visitor.visitUndulator(*this); +} + +void Undulator::initialise( + PartBunchBase* bunch, double& /*startField*/, double& /*endField*/) { + RefPartBunch_m = bunch; +} + +void Undulator::apply( + PartBunchBase* itsBunch, CoordinateSystemTrafo const& refToLocalCSTrafo) { + Inform msg("MITHRA FW solver ", *gmsg); + + // Get local coordinates w.r.t. undulator. + const unsigned int localNum = itsBunch->getLocalNum(); + for (unsigned int i = 0; i < localNum; ++i) { + itsBunch->R[i] = refToLocalCSTrafo.transformTo(itsBunch->R[i]); + itsBunch->P[i] = refToLocalCSTrafo.rotateTo(itsBunch->P[i]); + } + + itsBunch->calcBeamParameters(); + msg << "Bunch before undulator in local coordinate system: " << endl; + itsBunch->print(msg); + + MITHRA::helloMessage(); + + // Prepare parameters for full wave solver. + MITHRA::BunchInitialize bunchInit; + bunchInit.bunchType_ = "other"; + bunchInit.numberOfParticles_ = itsBunch->getTotalNum(); + bunchInit.cloudCharge_ = + itsBunch->getTotalNum() * itsBunch->getChargePerParticle() / (-Physics::q_e); + bunchInit.initialGamma_ = itsBunch->get_gamma(); + for (unsigned int d = 0; d < 3; ++d) + bunchInit.initialDirection_[d] = itsBunch->get_pmean()[d]; + bunchInit.initialDirection_ /= euclidean_norm(itsBunch->get_pmean()); + MITHRA::Bunch bunch; + bunch.bunchInit_.push_back(bunchInit); + bunch.timeStep_ = getDtBunch(); + msg << "Bunch parameters have been transferred to the full-wave solver." << endl; + + MITHRA::Undulator undulator; + undulator.k_ = getK(); + undulator.lu_ = getLambda(); + undulator.length_ = getNumPeriods(); + undulator.theta_ = getAngle(); + double lFringe = 2 * undulator.lu_; // Fringe field length is 2*lu. + undulator.dist_ = lFringe - itsBunch->get_maxExtent()[2]; // Bunch-head to undulator distance. + std::vector undulators; + undulators.push_back(undulator); + msg << "Undulator parameters have been transferred to the full-wave solver." << endl; + + MITHRA::Mesh mesh; + mesh.initialize(); + mesh.lengthScale_ = 1.0; // OPAL uses metres. + mesh.timeScale_ = 1.0; // OPAL uses seconds. + mesh.meshCenter_ = MITHRA::FieldVector(0.0); + mesh.meshLength_ = getMeshLength(); + mesh.meshResolution_ = getMeshResolution(); + mesh.totalTime_ = getTotalTime(); + // If simulation time is not given, run the full-wave solver until the end of the undulator. + if (mesh.totalTime_ == 0) + mesh.totalDist_ = lFringe + undulator.lu_ * undulator.length_; + mesh.truncationOrder_ = getTruncationOrder(); + mesh.spaceCharge_ = true; + mesh.optimizePosition_ = true; + msg << "Mesh parameters have been transferred to the full-wave solver." << endl; + + MITHRA::Seed seed; + std::vector externalFields; + std::vector FELs; + + // Get filename with desired output data. + if (!fname_m.empty()) { + std::list jobFile = MITHRA::read_file(fname_m.c_str()); + MITHRA::cleanJobFile(jobFile); + MITHRA::ParseDarius parser(jobFile, mesh, bunch, seed, undulators, externalFields, FELs); + parser.setJobParameters(); + } + + MITHRA::FdTdSC solver(mesh, bunch, seed, undulators, externalFields, FELs); + + // Transfer particles to full wave solver and destroy them from itsBunch. + MITHRA::Charge charge; + charge.q = itsBunch->getChargePerParticle() / (-Physics::q_e); + for (unsigned int i = 0; i < localNum; ++i) { + for (unsigned int d = 0; d < 3; ++d) { + charge.rnp[d] = itsBunch->R[i][d]; + charge.gbnp[d] = itsBunch->P[i][d]; + } + solver.chargeVectorn_.push_back(charge); + } + itsBunch->destroy(localNum, 0, true); + msg << "Particles have been transferred to the full-wave solver." << endl; + + // Print the parameters for the simulation. + mesh.show(); + bunch.show(); + seed.show(); + for (unsigned int i = 0; i < undulators.size(); i++) { + undulators[i].show(); + } + for (unsigned int i = 0; i < externalFields.size(); i++) { + externalFields[i].show(); + } + + // Run the full-wave solver. + timeval simulationStart; + gettimeofday(&simulationStart, NULL); + solver.solve(); + + // Get total computational time of the full wave simulation. + timeval simulationEnd; + gettimeofday(&simulationEnd, NULL); + double deltaTime = (simulationEnd.tv_usec - simulationStart.tv_usec) / 1.0e6; + deltaTime += (simulationEnd.tv_sec - simulationStart.tv_sec); + msg << "::: Total full wave simulation time [seconds] = " << deltaTime << endl; + + // Lorentz Transformation back to undulator local coordinates. + // First you need to get the position of the bunch tail. + double zMin = 1e100; + for (auto iter = solver.chargeVectorn_.begin(); iter != solver.chargeVectorn_.end(); iter++) { + zMin = std::min(zMin, iter->rnp[2]); + } + allreduce(&zMin, 1, std::less()); + + const double gammaBeta = solver.gamma_ * solver.beta_; + const double factor = gammaBeta * solver.c0_ * (solver.timeBunch_ + solver.dt_) + lFringe; + for (auto iter = solver.chargeVectorn_.begin(); iter != solver.chargeVectorn_.end(); iter++) { + double dist = zMin - iter->rnp[2]; + // Lorentz transform. + iter->rnp[2] = solver.gamma_ * iter->rnp[2] + factor; + iter->gbnp[2] = + solver.gamma_ * iter->gbnp[2] + gammaBeta * std::sqrt(1 + iter->gbnp.norm2()); + // Shift to bring all particles to same time in lab frame. + double gammaParticle = std::sqrt(1 + iter->gbnp.norm2()); + iter->rnp[0] += iter->gbnp[0] / gammaParticle * dist * gammaBeta; + iter->rnp[1] += iter->gbnp[1] / gammaParticle * dist * gammaBeta; + iter->rnp[2] += iter->gbnp[2] / gammaParticle * dist * gammaBeta; + } + + // Get total time elapsed in laboratory frame. + mesh.totalTime_ = + solver.gamma_ * (solver.time_ + solver.beta_ / solver.c0_ * (zMin - bunch.zu_)); + + // Return particles to itsBunch in local coordinates. + msg << "Transferring particles back to OPAL bunch." << endl; + itsBunch->create(solver.chargeVectorn_.size()); + const double dt = itsBunch->getdT(); + const unsigned int newLocalNum = itsBunch->getLocalNum(); + std::list::iterator iter = solver.chargeVectorn_.begin(); + for (unsigned int i = 0; i < newLocalNum; ++i) { + for (unsigned int d = 0; d < 3; ++d) { + itsBunch->R[i][d] = iter->rnp[d]; + itsBunch->P[i][d] = iter->gbnp[d]; + } + itsBunch->Q[i] = iter->q * (-Physics::q_e); + itsBunch->dt[i] = dt; + iter++; + } + itsBunch->setT(itsBunch->getT() + mesh.totalTime_); + + // Transform back to reference coordinate system. + CoordinateSystemTrafo localToRefCSTrafo = refToLocalCSTrafo.inverted(); + for (unsigned int i = 0; i < newLocalNum; ++i) { + itsBunch->R[i] = localToRefCSTrafo.transformTo(itsBunch->R[i]); + itsBunch->P[i] = localToRefCSTrafo.rotateTo(itsBunch->P[i]); + } + itsBunch->calcBeamParameters(); + + // Update reference particle. + // The reference particle becomes the bunch-centroid after the undulator. + itsBunch->RefPartR_m = itsBunch->toLabTrafo_m.transformTo(itsBunch->get_centroid()); + itsBunch->RefPartP_m = itsBunch->toLabTrafo_m.rotateTo(itsBunch->get_pmean()); + + msg << "Bunch after undulator in reference coordinate system: " << endl; + itsBunch->print(msg); + + setHasBeenSimulated(true); +} + +void Undulator::finalise() { +} + +bool Undulator::bends() const { + return false; +} + +void Undulator::getDimensions(double& /*zBegin*/, double& /*zEnd*/) const { +} + +ElementBase::ElementType Undulator::getType() const { + return UNDULATOR; +} + +void Undulator::setK(double k) { + k_m = k; +} +double Undulator::getK() const { + return k_m; +} + +void Undulator::setLambda(double lambda) { + lambda_m = lambda; +} +double Undulator::getLambda() const { + return lambda_m; +} + +void Undulator::setNumPeriods(unsigned int np) { + numPeriods_m = np; +} +unsigned int Undulator::getNumPeriods() const { + return numPeriods_m; +} + +void Undulator::setAngle(double theta) { + angle_m = theta; +} +double Undulator::getAngle() const { + return angle_m; +} + +void Undulator::setFilename(const std::string& fname) { + fname_m = fname; +} +const std::string& Undulator::getFilename() const { + return fname_m; +} + +void Undulator::setMeshLength(const std::vector& ml) { + meshLength_m = ml; +} +std::vector Undulator::getMeshLength() const { + return meshLength_m; +} + +void Undulator::setMeshResolution(const std::vector& mr) { + meshResolution_m = mr; +} +std::vector Undulator::getMeshResolution() const { + return meshResolution_m; +} + +void Undulator::setTruncationOrder(unsigned int trunOrder) { + truncationOrder_m = trunOrder; +} +unsigned int Undulator::getTruncationOrder() const { + return truncationOrder_m; +} + +void Undulator::setTotalTime(double tt) { + totalTime_m = tt; +} +double Undulator::getTotalTime() const { + return totalTime_m; +} + +void Undulator::setDtBunch(double dtb) { + dtBunch_m = dtb; +} +double Undulator::getDtBunch() const { + return dtBunch_m; +} + +void Undulator::setHasBeenSimulated(bool hbs) { + hasBeenSimulated_m = hbs; +} +bool Undulator::getHasBeenSimulated() const { + return hasBeenSimulated_m; +} diff --git a/src/Classic/AbsBeamline/Undulator.h b/src/Classic/AbsBeamline/Undulator.h new file mode 100644 index 000000000..231e4fbcd --- /dev/null +++ b/src/Classic/AbsBeamline/Undulator.h @@ -0,0 +1,116 @@ +// +// Class Undulator +// Defines all the methods used by the Undulator element. +// The Undulator element uses a full wave solver from the +// MITHRA library, see . +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#ifndef CLASSIC_Undulator_HH +#define CLASSIC_Undulator_HH + +#include +#include + +#include "AbsBeamline/Component.h" + +class Undulator : public Component { +public: + /// Constructor with given name. + explicit Undulator(const std::string& name); + + Undulator(); + Undulator(const Undulator& right); + virtual ~Undulator(); + + /// Apply visitor to Undulator. + virtual void accept(BeamlineVisitor&) const; + + virtual void initialise(PartBunchBase* bunch, double& startField, double& endField); + + void apply(PartBunchBase* itsBunch, CoordinateSystemTrafo const& refToLocalCSTrafo); + + virtual void finalise(); + + virtual bool bends() const; + + virtual ElementBase::ElementType getType() const; + + virtual void getDimensions(double& zBegin, double& zEnd) const; + + void setK(double k); + double getK() const; + void setLambda(double lambda); + double getLambda() const; + void setNumPeriods(unsigned int np); + unsigned int getNumPeriods() const; + void setAngle(double theta); + double getAngle() const; + void setFilename(const std::string& fname); + const std::string& getFilename() const; + void setMeshLength(const std::vector& ml); + std::vector getMeshLength() const; + void setMeshResolution(const std::vector& mr); + std::vector getMeshResolution() const; + void setTruncationOrder(unsigned int trunOrder); + unsigned int getTruncationOrder() const; + void setTotalTime(double tt); + double getTotalTime() const; + void setDtBunch(double dtb); + double getDtBunch() const; + void setHasBeenSimulated(bool hbs); + bool getHasBeenSimulated() const; + +private: + /// The undulator parameter + double k_m; + + /// Undulator period + double lambda_m; + + /// Number of periods + unsigned int numPeriods_m; + + /// Polarisation angle of the undulator field + double angle_m; + + /// Mithra file with output information + std::string fname_m; + + /// Size of computational domain + std::vector meshLength_m; + + /// Mesh dx, dy, dz + std::vector meshResolution_m; + + /// First or second order absorbing boundary conditions + unsigned int truncationOrder_m; + + /// Total time to run undulator + double totalTime_m; + + /// Time step for the bunch position update + double dtBunch_m; + + /// Boolean to indicate whether this undulator has already been simulated + bool hasBeenSimulated_m; + + // Not implemented. + void operator=(const Undulator&); +}; + +#endif // CLASSIC_Undulator_HH diff --git a/src/Classic/Algorithms/DefaultVisitor.cpp b/src/Classic/Algorithms/DefaultVisitor.cpp index 0a7f19a8e..5b6afc138 100644 --- a/src/Classic/Algorithms/DefaultVisitor.cpp +++ b/src/Classic/Algorithms/DefaultVisitor.cpp @@ -54,6 +54,10 @@ #include "AbsBeamline/VariableRFCavityFringeField.h" #include "AbsBeamline/VerticalFFAMagnet.h" +#ifdef ENABLE_OPAL_FEL +#include "AbsBeamline/Undulator.h" +#endif + #include "Beamlines/Beamline.h" #include "Beamlines/FlaggedElmPtr.h" @@ -180,6 +184,11 @@ void DefaultVisitor::visitTravelingWave(const TravelingWave &trw) { applyDefault(trw); } +#ifdef ENABLE_OPAL_FEL +void DefaultVisitor::visitUndulator(const Undulator &u) { + applyDefault(u); +} +#endif void DefaultVisitor::visitSBend(const SBend &bend) { applyDefault(bend); diff --git a/src/Classic/Algorithms/DefaultVisitor.h b/src/Classic/Algorithms/DefaultVisitor.h index be82b115a..095ba5569 100644 --- a/src/Classic/Algorithms/DefaultVisitor.h +++ b/src/Classic/Algorithms/DefaultVisitor.h @@ -117,6 +117,11 @@ public: /// Apply the algorithm to a RF cavity. virtual void visitTravelingWave(const TravelingWave &); +#ifdef ENABLE_OPAL_FEL + /// Apply the algorithm to an undulator. + virtual void visitUndulator(const Undulator &); +#endif + /// Apply the algorithm to a sector bend. virtual void visitSBend(const SBend &); diff --git a/src/Classic/BeamlineCore/CMakeLists.txt b/src/Classic/BeamlineCore/CMakeLists.txt index 79bb25078..6d579e760 100644 --- a/src/Classic/BeamlineCore/CMakeLists.txt +++ b/src/Classic/BeamlineCore/CMakeLists.txt @@ -28,12 +28,6 @@ set (_SRCS YCorrectorRep.cpp ) -include_directories ( - ${CMAKE_CURRENT_SOURCE_DIR} - ) - -add_opal_sources (${_SRCS}) - set (HDRS BeamStrippingRep.h CCollimatorRep.h @@ -65,4 +59,15 @@ set (HDRS YCorrectorRep.h ) +if (ENABLE_OPAL_FEL) + list (APPEND _SRCS UndulatorRep.cpp) + list (APPEND HDRS UndulatorRep.h) +endif () + +include_directories ( + ${CMAKE_CURRENT_SOURCE_DIR} + ) + +add_opal_sources (${_SRCS}) + install (FILES ${HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/BeamlineCore") diff --git a/src/Classic/BeamlineCore/UndulatorRep.cpp b/src/Classic/BeamlineCore/UndulatorRep.cpp new file mode 100644 index 000000000..92998a059 --- /dev/null +++ b/src/Classic/BeamlineCore/UndulatorRep.cpp @@ -0,0 +1,77 @@ +// +// Class UndulatorRep +// Defines a concrete undulator/wiggler representation. +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#include "BeamlineCore/UndulatorRep.h" + +#include "Channels/IndirectChannel.h" + +// Attribute access table. +namespace { + struct Entry { + const char* name; + double (UndulatorRep::*get)() const; + void (UndulatorRep::*set)(double); + }; + + const Entry entries[] = { + {"L", &UndulatorRep::getElementLength, &UndulatorRep::setElementLength}, {0, 0, 0}}; +} // namespace + +UndulatorRep::UndulatorRep() : Undulator(), geometry(0.0) { +} + +UndulatorRep::UndulatorRep(const UndulatorRep& right) : Undulator(right), geometry(right.geometry) { +} + +UndulatorRep::UndulatorRep(const std::string& name) : Undulator(name), geometry(0.0) { +} + +UndulatorRep::~UndulatorRep() { +} + +ElementBase* UndulatorRep::clone() const { + return new UndulatorRep(*this); +} + +Channel* UndulatorRep::getChannel(const std::string& aKey, bool create) { + for (const Entry* entry = entries; entry->name != 0; ++entry) { + if (aKey == entry->name) { + return new IndirectChannel(*this, entry->get, entry->set); + } + } + + return ElementBase::getChannel(aKey, create); +} + +NullField& UndulatorRep::getField() { + return field; +} + +const NullField& UndulatorRep::getField() const { + return field; +} + +StraightGeometry& UndulatorRep::getGeometry() { + return geometry; +} + +const StraightGeometry& UndulatorRep::getGeometry() const { + return geometry; +} \ No newline at end of file diff --git a/src/Classic/BeamlineCore/UndulatorRep.h b/src/Classic/BeamlineCore/UndulatorRep.h new file mode 100644 index 000000000..443f91c12 --- /dev/null +++ b/src/Classic/BeamlineCore/UndulatorRep.h @@ -0,0 +1,75 @@ +// +// Class UndulatorRep +// Defines a concrete undulator/wiggler representation. +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#ifndef CLASSIC_UndulatorRep_HH +#define CLASSIC_UndulatorRep_HH + +#include "AbsBeamline/Undulator.h" + +#include "BeamlineGeometry/StraightGeometry.h" +#include "Fields/NullField.h" + +class UndulatorRep : public Undulator { +public: + /// Constructor with given name. + explicit UndulatorRep(const std::string& name); + + UndulatorRep(); + UndulatorRep(const UndulatorRep&); + virtual ~UndulatorRep(); + + /// Return clone. + // Return an identical deep copy of the element. + virtual ElementBase* clone() const; + + /// Construct a read/write channel. + // This method constructs a Channel permitting read/write access to + // the attribute [b]aKey[/b] and returns it. + // If the attribute does not exist, it returns NULL. + virtual Channel* getChannel(const std::string& aKey, bool = false); + + /// Get field. + // Version for non-constant object. + virtual NullField& getField(); + + /// Get field. + // Version for constant object. + virtual const NullField& getField() const; + + /// Get geometry. + // Version for non-constant object. + virtual StraightGeometry& getGeometry(); + + /// Get geometry. + // Version for constant object. + virtual const StraightGeometry& getGeometry() const; + +private: + // Not implemented. + void operator=(const UndulatorRep&); + + /// The zero magnetic field. + NullField field; + + /// The geometry. + StraightGeometry geometry; +}; + +#endif // CLASSIC_UndulatorRep_HH diff --git a/src/Elements/CMakeLists.txt b/src/Elements/CMakeLists.txt index 752c3c79b..0ddef4b8c 100644 --- a/src/Elements/CMakeLists.txt +++ b/src/Elements/CMakeLists.txt @@ -49,12 +49,6 @@ set (_SRCS OpalStripper.cpp ) -include_directories ( - ${CMAKE_CURRENT_SOURCE_DIR} - ) - -add_opal_sources (${_SRCS}) - set (HDRS OpalBeamline.h OpalBeamStripping.h @@ -105,4 +99,15 @@ set (HDRS OpalOffset/OpalLocalCylindricalOffset.h ) +if (ENABLE_OPAL_FEL) + list (APPEND _SRCS OpalUndulator.cpp) + list (APPEND HDRS OpalUndulator.h) +endif () + +include_directories ( + ${CMAKE_CURRENT_SOURCE_DIR} + ) + +add_opal_sources (${_SRCS}) + install (FILES ${HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/Elements/OpalOffset") diff --git a/src/Elements/OpalUndulator.cpp b/src/Elements/OpalUndulator.cpp new file mode 100644 index 000000000..1c2418f6b --- /dev/null +++ b/src/Elements/OpalUndulator.cpp @@ -0,0 +1,94 @@ +// +// Class OpalUndulator +// Defines the Undulator/Wiggler element and its attributes. +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#include "Elements/OpalUndulator.h" + +#include "Attributes/Attributes.h" +#include "BeamlineCore/UndulatorRep.h" + +OpalUndulator::OpalUndulator() + : OpalElement(SIZE, "UNDULATOR", "The \"UNDULATOR\" element defines an undulator or wiggler.") { + itsAttr[K] = Attributes::makeReal("K", "Undulator strength parameter [unitless].", 1); + + itsAttr[LAMBDA] = Attributes::makeReal("LAMBDA", "Undulator period [m].", 0.0); + + itsAttr[NUMPERIODS] = Attributes::makeReal("NUMPERIODS", "Number of undulator periods.", 0.0); + + itsAttr[ANGLE] = Attributes::makeReal( + "ANGLE", "Polarisation angle of the undulator magnetic field [rad].", 0.0); + + itsAttr[FNAME] = Attributes::makeString( + "FNAME", "Jobfile specifying the output data from the undulator.", ""); + + itsAttr[MESHLENGTH] = + Attributes::makeRealArray("MESHLENGTH", "Size of computational mesh [m]."); + + itsAttr[MESHRESOLUTION] = + Attributes::makeRealArray("MESHRESOLUTION", "{dx, dy, dz} of the mesh [m]."); + + itsAttr[TRUNORDER] = + Attributes::makeReal("TRUNORDER", "Order of absorbing boundary conditions. 1st or 2nd.", 2); + + itsAttr[TOTALTIME] = + Attributes::makeReal("TOTALTIME", "Total time of the full-wave simulation [s].", 0.0); + + itsAttr[DTBUNCH] = Attributes::makeReal( + "DTBUNCH", + "Time step for the particle update can be smaller than the field update step [s].", 0.0); + + registerOwnership(); + + setElement(new UndulatorRep("UNDULATOR")); +} + +OpalUndulator::OpalUndulator(const std::string& name, OpalUndulator* parent) + : OpalElement(name, parent) { + setElement(new UndulatorRep(name)); +} + +OpalUndulator::~OpalUndulator() { +} + +OpalUndulator* OpalUndulator::clone(const std::string& name) { + return new OpalUndulator(name, this); +} + +void OpalUndulator::update() { + OpalElement::update(); + + UndulatorRep* ur = static_cast(getElement()); + /* The element length is given by the number and length of the undulator periods, plus the + * length of the two fringe fields, each measuring 2 * lambda. */ + ur->setElementLength( + Attributes::getReal(itsAttr[LAMBDA]) * (4 + Attributes::getReal(itsAttr[NUMPERIODS]))); + ur->setK(Attributes::getReal(itsAttr[K])); + ur->setLambda(Attributes::getReal(itsAttr[LAMBDA])); + ur->setNumPeriods(Attributes::getReal(itsAttr[NUMPERIODS])); + ur->setAngle(Attributes::getReal(itsAttr[ANGLE])); + ur->setFilename(Attributes::getString(itsAttr[FNAME])); + ur->setMeshLength(Attributes::getRealArray(itsAttr[MESHLENGTH])); + ur->setMeshResolution(Attributes::getRealArray(itsAttr[MESHRESOLUTION])); + ur->setTruncationOrder(Attributes::getReal(itsAttr[TRUNORDER])); + ur->setTotalTime(Attributes::getReal(itsAttr[TOTALTIME])); + ur->setDtBunch(Attributes::getReal(itsAttr[DTBUNCH])); + + // Transmit "unknown" attributes. + OpalElement::updateUnknown(ur); +} diff --git a/src/Elements/OpalUndulator.h b/src/Elements/OpalUndulator.h new file mode 100644 index 000000000..8bda3b1c5 --- /dev/null +++ b/src/Elements/OpalUndulator.h @@ -0,0 +1,62 @@ +// +// Class OpalUndulator +// Defines the Undulator/Wiggler element and its attributes. +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#ifndef OPAL_OpalUndulator_HH +#define OPAL_OpalUndulator_HH + +#include "Elements/OpalElement.h" + +class OpalUndulator : public OpalElement { +public: + enum { + K = COMMON, // The undulator parameter + LAMBDA, // The undulator period + NUMPERIODS, // Number of undulator periods + ANGLE, // Polarisation angle of the undulator + FNAME, // File specifying the wanted output from the full wave simulation + MESHLENGTH, // Size of the computational domain + MESHRESOLUTION, // Size of the grid-cells + TRUNORDER, // Order of the Absorbing Boundary Conditions, 1st or 2nd + TOTALTIME, // Total time of the full wave simulation + DTBUNCH, // Time-step for particle update can be smaller than field update step + SIZE + }; + + /// Exemplar constructor. + OpalUndulator(); + + virtual ~OpalUndulator(); + + /// Make clone. + virtual OpalUndulator* clone(const std::string& name); + + /// Update the embedded CLASSIC drift. + virtual void update(); + +private: + // Not implemented. + OpalUndulator(const OpalUndulator&); + void operator=(const OpalUndulator&); + + // Clone constructor. + OpalUndulator(const std::string& name, OpalUndulator* parent); +}; + +#endif // OPAL_OpalUndulator_HH diff --git a/src/OpalConfigure/Configure.cpp b/src/OpalConfigure/Configure.cpp index b4dd72d56..70f5a08e0 100644 --- a/src/OpalConfigure/Configure.cpp +++ b/src/OpalConfigure/Configure.cpp @@ -104,6 +104,9 @@ #include "Elements/OpalSolenoid.h" #include "Elements/OpalSource.h" #include "Elements/OpalTravelingWave.h" +#ifdef ENABLE_OPAL_FEL +#include "Elements/OpalUndulator.h" +#endif #include "Elements/OpalVKicker.h" //#include "Elements/OpalWire.h" #include "Elements/OpalStripper.h" @@ -225,6 +228,9 @@ namespace { opal->create(new OpalSolenoid()); opal->create(new OpalSource()); opal->create(new OpalTravelingWave()); +#ifdef ENABLE_OPAL_FEL + opal->create(new OpalUndulator()); +#endif opal->create(new OpalVariableRFCavity()); opal->create(new OpalVariableRFCavityFringeField()); opal->create(new OpalVerticalFFAMagnet()); diff --git a/tests/classic_src/AbsBeamline/CMakeLists.txt b/tests/classic_src/AbsBeamline/CMakeLists.txt index 4892c8b7d..f22ea77fe 100644 --- a/tests/classic_src/AbsBeamline/CMakeLists.txt +++ b/tests/classic_src/AbsBeamline/CMakeLists.txt @@ -12,6 +12,10 @@ set (_SRCS VerticalFFAMagnetTest.cpp ) +if (ENABLE_OPAL_FEL) + list (APPEND _SRCS UndulatorTest.cpp) +endif () + include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/tests/classic_src/AbsBeamline/UndulatorTest.cpp b/tests/classic_src/AbsBeamline/UndulatorTest.cpp new file mode 100644 index 000000000..8975b5e30 --- /dev/null +++ b/tests/classic_src/AbsBeamline/UndulatorTest.cpp @@ -0,0 +1,114 @@ +// +// Unit tests for class Undulator +// +// Copyright (c) 2020, Arnau Albà, Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// Implemented as part of the MSc thesis +// "Start-to-End Modelling of the AWA Micro-Bunched Electron Cooling POP-Experiment" +// +// This file is part of OPAL. +// +// OPAL is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// You should have received a copy of the GNU General Public License +// along with OPAL. If not, see . +// +#include + +#include "gtest/gtest.h" + +#include "AbsBeamline/Undulator.h" +#include "BeamlineCore/UndulatorRep.h" + +#include "Algorithms/CoordinateSystemTrafo.h" +#include "Algorithms/PartBunch.h" +#include "Algorithms/Vektor.h" +#include "Physics/Physics.h" + +#include "opal_test_utilities/SilenceTest.h" + +void testNull(Undulator& und) { + + EXPECT_EQ(und.getTypeString(), "Undulator"); + EXPECT_DOUBLE_EQ(und.getK(), 0.); + EXPECT_DOUBLE_EQ(und.getLambda(), 0.); + EXPECT_EQ(und.getNumPeriods(), (unsigned int) 0); + EXPECT_DOUBLE_EQ(und.getAngle(), 0.); + EXPECT_EQ(und.getFilename(), ""); + std::vector nullVec (3, 0.0); + std::vector meshLength = und.getMeshLength(); + std::vector meshResolution = und.getMeshResolution(); + EXPECT_EQ(meshLength, nullVec); + EXPECT_EQ(meshResolution, nullVec); + EXPECT_EQ(und.getTruncationOrder(), (unsigned int) 2); + EXPECT_DOUBLE_EQ(und.getTotalTime(), 0.); + EXPECT_DOUBLE_EQ(und.getDtBunch(), 0.); + EXPECT_EQ(und.getHasBeenSimulated(), false); +} + +TEST(UndulatorTest, TestConstructorAndGets) { + OpalTestUtilities::SilenceTest silencer; + + UndulatorRep und1; + EXPECT_EQ(und1.getName(), ""); + testNull(und1); + UndulatorRep und2("a_name"); + EXPECT_EQ(und2.getName(), "a_name"); + testNull(und2); + UndulatorRep und3(und2); + EXPECT_EQ(und3.getName(), und2.getName()); + testNull(und3); +} + +TEST(UndulatorTest, TestBends) { + OpalTestUtilities::SilenceTest silencer; + + UndulatorRep und1; + EXPECT_FALSE(und1.bends()); +} + +TEST(UndulatorTest, TestGetSet) { + OpalTestUtilities::SilenceTest silencer; + + UndulatorRep und1; + + und1.setK(1.0); + EXPECT_DOUBLE_EQ(und1.getK(), 1.0); + und1.setLambda(1.0); + EXPECT_DOUBLE_EQ(und1.getLambda(), 1.0); + und1.setNumPeriods(1); + EXPECT_EQ(und1.getNumPeriods(), (unsigned int) 1); + und1.setAngle(45.0); + EXPECT_DOUBLE_EQ(und1.getAngle(), 45.0); + und1.setFilename("file"); + EXPECT_EQ(und1.getFilename(), "file"); + std::vector testVec (3, 1.0); + und1.setMeshLength(testVec); + EXPECT_EQ(und1.getMeshLength(), testVec); + und1.setMeshResolution(testVec); + EXPECT_EQ(und1.getMeshResolution(), testVec); + und1.setTruncationOrder(1); + EXPECT_EQ(und1.getTruncationOrder(), (unsigned int) 1); + und1.setTotalTime(1.0); + EXPECT_DOUBLE_EQ(und1.getTotalTime(), 1.0); + und1.setDtBunch(1.0); + EXPECT_DOUBLE_EQ(und1.getDtBunch(), 1.0); + und1.setHasBeenSimulated(true); + EXPECT_EQ(und1.getHasBeenSimulated(), true); +} + +TEST(UndulatorTest, TestApplyFullWaveSolver) { + OpalTestUtilities::SilenceTest silencer; + + UndulatorRep und; + PartData* partData = new PartData(); + PartBunch* bunch = new PartBunch(partData); + CoordinateSystemTrafo refToLocalCSTrafo; + + und.apply(bunch, refToLocalCSTrafo); + EXPECT_EQ(und.getHasBeenSimulated(), true); +} \ No newline at end of file diff --git a/tools/emacs/opal.el b/tools/emacs/opal.el index 40ca3d435..3802e3f39 100644 --- a/tools/emacs/opal.el +++ b/tools/emacs/opal.el @@ -84,11 +84,11 @@ ) "Highlighting expressions for OPAL mode (controlstm).") -;(concat "\\<" (regexp-opt '("CCOLLIMATOR" "CYCLOTRON" "DEGRADER" "DRIFT" "ECOLLIMATOR" "FLEXIBLECOLLIMATOR" "HKICKER" "KICKER" "MARKER" "MATRIX" "MONITOR" "MULTIPOLE" "OCTUPOLE" "PROBE" "QUADRUPOLE" "RBEND" "RCOLLIMATOR" "RFCAVITY" "RINGDEFINITION" "SBEND" "SBEND3D" "SEPTUM" "SEXTUPOLE" "SOLENOID" "SOURCE" "STRIPPER" "TRAVELINGWAVE" "TRIMCOIL" "VARIABLE_RF_CAVITY" "VKICKER") t) "\\>") +;(concat "\\<" (regexp-opt '("CCOLLIMATOR" "CYCLOTRON" "DEGRADER" "DRIFT" "ECOLLIMATOR" "FLEXIBLECOLLIMATOR" "HKICKER" "KICKER" "MARKER" "MATRIX" "MONITOR" "MULTIPOLE" "OCTUPOLE" "PROBE" "QUADRUPOLE" "RBEND" "RCOLLIMATOR" "RFCAVITY" "RINGDEFINITION" "SBEND" "SBEND3D" "SEPTUM" "SEXTUPOLE" "SOLENOID" "SOURCE" "STRIPPER" "TRAVELINGWAVE" "TRIMCOIL" "UNDULATOR" "VARIABLE_RF_CAVITY" "VKICKER") t) "\\>") (defconst opal-font-lock-keywords-elements (list - '("\\<\\(C\\(?:COLLIMATOR\\|YCLOTRON\\)\\|D\\(?:EGRADER\\|RIFT\\)\\|ECOLLIMATOR\\|FLEXIBLECOLLIMATOR\\|HKICKER\\|KICKER\\|M\\(?:A\\(?:RKER\\|TRIX\\)\\|ONITOR\\|ULTIPOLE\\)\\|OCTUPOLE\\|PROBE\\|QUADRUPOLE\\|R\\(?:BEND\\|COLLIMATOR\\|FCAVITY\\|INGDEFINITION\\)\\|S\\(?:BEND\\(?:3D\\)?\\|E\\(?:PTUM\\|XTUPOLE\\)\\|O\\(?:LENOID\\|URCE\\)\\|TRIPPER\\)\\|TR\\(?:AVELINGWAVE\\|IMCOIL\\)\\|V\\(?:ARIABLE_RF_CAVITY\\|KICKER\\)\\)\\>" + '("\\<\\(C\\(?:COLLIMATOR\\|YCLOTRON\\)\\|D\\(?:EGRADER\\|RIFT\\)\\|ECOLLIMATOR\\|FLEXIBLECOLLIMATOR\\|HKICKER\\|KICKER\\|M\\(?:A\\(?:RKER\\|TRIX\\)\\|ONITOR\\|ULTIPOLE\\)\\|OCTUPOLE\\|PROBE\\|QUADRUPOLE\\|R\\(?:BEND\\|COLLIMATOR\\|FCAVITY\\|INGDEFINITION\\)\\|S\\(?:BEND\\(?:3D\\)?\\|E\\(?:PTUM\\|XTUPOLE\\)\\|O\\(?:LENOID\\|URCE\\)\\|TRIPPER\\)\\|TR\\(?:AVELINGWAVE\\|IMCOIL\\)\\|UNDULATOR\\|V\\(?:ARIABLE_RF_CAVITY\\|KICKER\\)\\)\\>" . font-lock-type-face) ) "Highlighting expressions for OPAL mode (elements).") @@ -125,11 +125,11 @@ ;ack -h 'Attributes::make.*\("[A-Z0-9_]+"' |sed 's/.*Attributes::make.*("\([^"]\+\)".*$/"\1"/' |sort|uniq >> attributes.txt ;cat attributes.txt |sort|uniq >attributes2.txt -;(concat "\\<" (regexp-opt '("A" "ALL" "ALPHA" "ALPHAX" "ALPHAY" "AMPLITUDE_MODEL" "AMR" "AMR_BFX" "AMR_BFY" "AMR_BFZ" "AMR_DENSITY" "AMR_DOMAIN_RATIO" "AMR_MAXGRIDX" "AMR_MAXGRIDY" "AMR_MAXGRIDZ" "AMR_MAXLEVEL" "AMR_MAX_NUM_PART" "AMR_MG_INTERP" "AMR_MG_NORM" "AMR_MG_NSWEEPS" "AMR_MG_PREC" "AMR_MG_REBALANCE" "AMR_MG_REUSE" "AMR_MG_SMOOTHER" "AMR_MG_TOL" "AMR_MG_VERBOSE" "AMR_MIN_NUM_PART" "AMR_REFX" "AMR_REFY" "AMR_REFZ" "AMR_REGRID_FREQ" "AMR_SCALING" "AMR_TAGGING" "AMR_YT_DUMP_FREQ" "ANGLE" "APERTURE" "APVETO" "ASCIIDUMP" "AUTOPHASE" "AZIMUTHAL_ANGLE" "AZIMUTHAL_EXTENT" "B" "B0" "BB_LENGTH" "BBLENGTH" "BBOXINCR" "BCFFTT" "BCFFTX" "BCFFTY" "BCFFTZ" "BCURRENT" "BEAM" "BEAMHALOBOUNDARY" "BEAM_PHIINIT" "BEAM_PRINIT" "BEAM_RINIT" "BETAX" "BETAY" "BFREQ" "BIRTH_CONTROL" "BMAX" "BOUNDARYGEOMETRY" "BOUNDPDESTROYFQ" "BSCALE" "C" "CATHTEMP" "CAVITY_CENTRE" "CENTRE_LENGTH" "CHARGE" "CLASS" "CLEAR" "CLOTUNEONLY" "CMD" "COEFDENOM" "COEFDENOMPHI" "COEFNUM" "COEFNUMPHI" "COLUMN" "CONDUCT" "CONST_LENGTH" "CONSTRAINTS" "CONV_HVOL_PROG" "COORDINATE_SYSTEM" "CORRT" "CORRX" "CORRY" "CORRZ" "CROSSOVER" "CSRDUMP" "CUTOFF" "CUTOFFLONG" "CUTOFFPX" "CUTOFFPY" "CUTOFFPZ" "CUTOFFR" "CUTOFFX" "CUTOFFY" "CYHARMON" "CZERO" "DDX" "DDY" "DEBIN" "DELPARTFREQ" "DENERGY" "DESCRIPTION" "DESIGNENERGY" "DISTDIR" "DISTRIBUTION" "DK1" "DK1S" "DK2" "DK2S" "DK3" "DK3S" "DKN" "DKS" "DLAG" "DPHI" "DPSI" "DR" "DT" "DTAU" "DTHETA" "DTSCINIT" "DUMP" "DUMP_DAT" "DUMP_FREQ" "DUMP_OFFSPRING" "DVARS" "DVOLT" "DX" "DY" "DZ" "E1" "E2" "EANGLE" "EBDUMP" "ECHO" "EKIN" "ELASER" "ELEMEDGE" "EMISSIONMODEL" "EMISSIONSTEPS" "EMITTED" "ENABLEHDF5" "ENABLERUTHERFORD" "END_LENGTH" "END_NORMAL_X" "END_NORMAL_Y" "END_POSITION_X" "END_POSITION_Y" "ENERGY" "EPSILON" "ESCALE" "ET" "EX" "EXPECTED_HYPERVOL" "EXPR" "EY" "FAST" "FE" "FGEOM" "FIELD_INDEX" "FIELDMAPDIR" "FIELDSOLVER" "FIELD_UNITS" "FILE" "FILE_NAME" "FILTERS" "FINT" "FLIPX" "FLIPY" "FMAPFN" "FMHIGHE" "FMLOWE" "FNAME" "FREQ" "FREQUENCY_MODEL" "FSTYPE" "FTOSCAMPLITUDE" "FTOSCPERIODS" "FULL" "GAMMA" "GAP" "GAPWIDTH" "GAS" "GENE_MUTATION_PROBABILITY" "GEOMETRY" "GREATERTHANPI" "GREENSF" "H1" "H2" "HALOSHIFT" "HAPERT" "HARMONIC_NUMBER" "HEIGHT" "HEIGHT_NEG_EXTENT" "HEIGHT_POS_EXTENT" "HGAP" "HKICK" "HYPERVOLREFERENCE" "ID1" "ID2" "IDEALIZED" "IMAGENAME" "INFO" "INITIAL_OPTIMIZATION" "INITIALPOPULATION" "INPUT" "INPUTMOUNITS" "INSIDEPOINT" "INTENSITYCUT" "INTERPL" "IS_CLOSED" "ITSOLVER" "JSON_DUMP_FREQ" "K0" "K0S" "K1" "K1S" "K2" "K2S" "K3" "K3S" "KEEP" "KICK" "KN" "KS" "L" "L1" "L2" "LAG" "LASERPROFFN" "LAT_PHIINIT" "LAT_RINIT" "LAT_THETAINIT" "LENGTH" "LENGTH_UNITS" "LFRINGE" "LINE" "LOGBENDTRAJECTORY" "LOWERBOUND" "MAGNET_END" "MAGNET_START" "MAP_ORDER" "MASS" "MATERIAL" "MAXFORDER" "MAXGENERATIONS" "MAX_HORIZONTAL_POWER" "MAXITERS" "MAX_ORDER" "MAX_R" "MAXR" "MAXSTEPS" "MAXSTEPSCO" "MAXSTEPSSI" "MAXXORDER" "MAX_Y_POWER" "MAXZ" "MB_BINNING" "MB_ETA" "MBMODE" "MEMORYDUMP" "MESSAGE" "METHOD" "MINBINEMITTED" "MIN_R" "MINR" "MINSTEPFORREBIN" "MINZ" "MODE" "MT" "MTSSUBSTEPS" "MUTATION" "MUTATION_PROBABILITY" "MX" "MY" "MZ" "N" "NAME" "NBIN" "NFREQ" "NHOLX" "NHOLY" "NLEFT" "NLHS" "NPART" "NPEAKS" "NPOINTS" "NRIGHT" "NSECTORS" "NSLICES" "NSTEPS" "NUMBLOCKS" "NUMCELLS" "NUM_COWORKERS" "NUM_IND_GEN" "NUM_MASTERS" "OBJECTIVES" "OFFSETP" "OFFSETPX" "OFFSETPY" "OFFSETPZ" "OFFSETT" "OFFSETX" "OFFSETY" "OFFSETZ" "ONE_PILOT_CONVERGE" "OPCHARGE" "OPMASS" "OPYIELD" "ORDER" "ORDERMAPS" "ORIENTATION" "ORIGIN" "OUTDIR" "OUTFN" "OUTPUT" "P0" "P1" "P2" "P3" "PARAMB" "PARFFTT" "PARFFTX" "PARFFTY" "PARTICLE" "PARTICLEMATTERINTERACTION" "PATTERN" "PC" "PDIS" "PHASE_MODEL" "PHI" "PHI0" "PHIINIT" "PHIMAX" "PHIMIN" "PHI_START" "PHI_STEPS" "PMAPFN" "POLYORDER" "PRECMODE" "PRESSURE" "PRINIT" "PSCALE" "PSDUMPEACHTURN" "PSDUMPFRAME" "PSDUMPFREQ" "PSI" "PT" "PXMULT" "PYMULT" "PZINIT" "PZMULT" "R" "R0" "R51" "R52" "R61" "R62" "RADIAL_NEG_EXTENT" "RADIAL_POS_EXTENT" "RADIUS" "RANDOM" "RANGE" "RASTER" "RC" "REBINFREQ" "RECOMBINATION_PROBABILITY" "RECYCLEBLOCKS" "REFER" "REFPOS" "REMOTEPARTDEL" "REPARTFREQ" "RESIDUUM" "RESTART_FILE" "RESTART_STEP" "RFFCFN" "RFFREQ" "RFMAPFN" "RFPHI" "RFRINGE" "RFVCFN" "RGUESS" "RHODUMP" "RINIT" "RMAX" "RMIN" "RNGTYPE" "ROTATE180" "ROTATE270" "ROTATE90" "ROTATION" "R_START" "R_STEPS" "S" "SAMPLINGS" "SBIN" "SCALABLE" "SCALE" "SCSOLVEFREQ" "SECTOR" "SEED" "SEPPEAKS" "SIGMA" "SIGMAPT" "SIGMAPX" "SIGMAPY" "SIGMAPZ" "SIGMAR" "SIGMAT" "SIGMAX" "SIGMAY" "SIGMAZ" "SIMBIN_CROSSOVER_NU" "SIMTMPDIR" "SLICES" "SLPTC" "SOL_SYNCH" "SPIRAL" "SPTDUMPFREQ" "STARTPOPULATION" "STATDUMPFREQ" "STEP" "STEPSIZE" "STEPSPERTURN" "STOP" "STOREOBJECTIVES" "STRING" "SUPERPOSE" "SURFDUMPFREQ" "SYMMETRY" "T" "T0" "TABLE" "TAN_DELTA" "TANGENTIAL_OFFSET" "TAU" "TELL" "TEMPERATURE" "TEMPLATEDIR" "TFALL" "THETA" "THETA_IN" "THETA_OUT" "THRESHOLD" "TIMEINTEGRATOR" "TIMES" "TMULT" "TOL" "TOPO" "TP" "TPULSEFWHM" "TRACE" "TRACKBACK" "TRIMCOIL" "TRIMCOILTHRESHOLD" "TRISE" "T_START" "T_STEPS" "TURNS" "TYPE" "UPPERBOUND" "VALUE" "VALUES" "VAPERT" "VARIABLE" "VARRADIUS" "VERSION" "VKICK" "VOLT" "W" "WAKEF" "WARN" "WEIGHT" "WIDTH" "WRITETOFILE" "X" "XEND" "XMULT" "XSCALE" "XSIZE" "X_START" "XSTART" "X_STEPS" "XYZSCALE" "Y" "YEND" "YMULT" "YSCALE" "YSIZE" "Y_START" "YSTART" "Y_STEPS" "Z" "Z0" "ZEND" "ZINIT" "ZSCALE" "ZSHIFT" "Z_START" "ZSTART" "Z_STEPS" "ZSTOP") t) "\\>") +;(concat "\\<" (regexp-opt '("A" "ALL" "ALPHA" "ALPHAX" "ALPHAY" "AMPLITUDE_MODEL" "AMR" "AMR_BFX" "AMR_BFY" "AMR_BFZ" "AMR_DENSITY" "AMR_DOMAIN_RATIO" "AMR_MAXGRIDX" "AMR_MAXGRIDY" "AMR_MAXGRIDZ" "AMR_MAXLEVEL" "AMR_MAX_NUM_PART" "AMR_MG_INTERP" "AMR_MG_NORM" "AMR_MG_NSWEEPS" "AMR_MG_PREC" "AMR_MG_REBALANCE" "AMR_MG_REUSE" "AMR_MG_SMOOTHER" "AMR_MG_TOL" "AMR_MG_VERBOSE" "AMR_MIN_NUM_PART" "AMR_REFX" "AMR_REFY" "AMR_REFZ" "AMR_REGRID_FREQ" "AMR_SCALING" "AMR_TAGGING" "AMR_YT_DUMP_FREQ" "ANGLE" "APERTURE" "APVETO" "ASCIIDUMP" "AUTOPHASE" "AZIMUTHAL_ANGLE" "AZIMUTHAL_EXTENT" "B" "B0" "BB_LENGTH" "BBLENGTH" "BBOXINCR" "BCFFTT" "BCFFTX" "BCFFTY" "BCFFTZ" "BCURRENT" "BEAM" "BEAMHALOBOUNDARY" "BEAM_PHIINIT" "BEAM_PRINIT" "BEAM_RINIT" "BETAX" "BETAY" "BFREQ" "BIRTH_CONTROL" "BMAX" "BOUNDARYGEOMETRY" "BOUNDPDESTROYFQ" "BSCALE" "C" "CATHTEMP" "CAVITY_CENTRE" "CENTRE_LENGTH" "CHARGE" "CLASS" "CLEAR" "CLOTUNEONLY" "CMD" "COEFDENOM" "COEFDENOMPHI" "COEFNUM" "COEFNUMPHI" "COLUMN" "CONDUCT" "CONST_LENGTH" "CONSTRAINTS" "CONV_HVOL_PROG" "COORDINATE_SYSTEM" "CORRT" "CORRX" "CORRY" "CORRZ" "CROSSOVER" "CSRDUMP" "CUTOFF" "CUTOFFLONG" "CUTOFFPX" "CUTOFFPY" "CUTOFFPZ" "CUTOFFR" "CUTOFFX" "CUTOFFY" "CYHARMON" "CZERO" "DDX" "DDY" "DEBIN" "DELPARTFREQ" "DENERGY" "DESCRIPTION" "DESIGNENERGY" "DISTDIR" "DISTRIBUTION" "DK1" "DK1S" "DK2" "DK2S" "DK3" "DK3S" "DKN" "DKS" "DLAG" "DPHI" "DPSI" "DR" "DT" "DTAU" "DTBUNCH" "DTHETA" "DTSCINIT" "DUMP" "DUMP_DAT" "DUMP_FREQ" "DUMP_OFFSPRING" "DVARS" "DVOLT" "DX" "DY" "DZ" "E1" "E2" "EANGLE" "EBDUMP" "ECHO" "EKIN" "ELASER" "ELEMEDGE" "EMISSIONMODEL" "EMISSIONSTEPS" "EMITTED" "ENABLEHDF5" "ENABLERUTHERFORD" "END_LENGTH" "END_NORMAL_X" "END_NORMAL_Y" "END_POSITION_X" "END_POSITION_Y" "ENERGY" "EPSILON" "ESCALE" "ET" "EX" "EXPECTED_HYPERVOL" "EXPR" "EY" "FAST" "FE" "FGEOM" "FIELD_INDEX" "FIELDMAPDIR" "FIELDSOLVER" "FIELD_UNITS" "FILE" "FILE_NAME" "FILTERS" "FINT" "FLIPX" "FLIPY" "FMAPFN" "FMHIGHE" "FMLOWE" "FNAME" "FREQ" "FREQUENCY_MODEL" "FSTYPE" "FTOSCAMPLITUDE" "FTOSCPERIODS" "FULL" "GAMMA" "GAP" "GAPWIDTH" "GAS" "GENE_MUTATION_PROBABILITY" "GEOMETRY" "GREATERTHANPI" "GREENSF" "H1" "H2" "HALOSHIFT" "HAPERT" "HARMONIC_NUMBER" "HEIGHT" "HEIGHT_NEG_EXTENT" "HEIGHT_POS_EXTENT" "HGAP" "HKICK" "HYPERVOLREFERENCE" "ID1" "ID2" "IDEALIZED" "IMAGENAME" "INFO" "INITIAL_OPTIMIZATION" "INITIALPOPULATION" "INPUT" "INPUTMOUNITS" "INSIDEPOINT" "INTENSITYCUT" "INTERPL" "IS_CLOSED" "ITSOLVER" "JSON_DUMP_FREQ" "K" "K0" "K0S" "K1" "K1S" "K2" "K2S" "K3" "K3S" "KEEP" "KICK" "KN" "KS" "L" "L1" "L2" "LAG" "LAMBDA" "LASERPROFFN" "LAT_PHIINIT" "LAT_RINIT" "LAT_THETAINIT" "LENGTH" "LENGTH_UNITS" "LFRINGE" "LINE" "LOGBENDTRAJECTORY" "LOWERBOUND" "MAGNET_END" "MAGNET_START" "MAP_ORDER" "MASS" "MATERIAL" "MAXFORDER" "MAXGENERATIONS" "MAX_HORIZONTAL_POWER" "MAXITERS" "MAX_ORDER" "MAX_R" "MAXR" "MAXSTEPS" "MAXSTEPSCO" "MAXSTEPSSI" "MAXXORDER" "MAX_Y_POWER" "MAXZ" "MB_BINNING" "MB_ETA" "MBMODE" "MEMORYDUMP" "MESHLENGTH" "MESHRESOLUTION" "MESSAGE" "METHOD" "MINBINEMITTED" "MIN_R" "MINR" "MINSTEPFORREBIN" "MINZ" "MODE" "MT" "MTSSUBSTEPS" "MUTATION" "MUTATION_PROBABILITY" "MX" "MY" "MZ" "N" "NAME" "NBIN" "NFREQ" "NHOLX" "NHOLY" "NLEFT" "NLHS" "NPART" "NPEAKS" "NPOINTS" "NRIGHT" "NSECTORS" "NSLICES" "NSTEPS" "NUMBLOCKS" "NUMCELLS" "NUM_COWORKERS" "NUM_IND_GEN" "NUM_MASTERS" "NUMPERIODS" "OBJECTIVES" "OFFSETP" "OFFSETPX" "OFFSETPY" "OFFSETPZ" "OFFSETT" "OFFSETX" "OFFSETY" "OFFSETZ" "ONE_PILOT_CONVERGE" "OPCHARGE" "OPMASS" "OPYIELD" "ORDER" "ORDERMAPS" "ORIENTATION" "ORIGIN" "OUTDIR" "OUTFN" "OUTPUT" "P0" "P1" "P2" "P3" "PARAMB" "PARFFTT" "PARFFTX" "PARFFTY" "PARTICLE" "PARTICLEMATTERINTERACTION" "PATTERN" "PC" "PDIS" "PHASE_MODEL" "PHI" "PHI0" "PHIINIT" "PHIMAX" "PHIMIN" "PHI_START" "PHI_STEPS" "PMAPFN" "POLYORDER" "PRECMODE" "PRESSURE" "PRINIT" "PSCALE" "PSDUMPEACHTURN" "PSDUMPFRAME" "PSDUMPFREQ" "PSI" "PT" "PXMULT" "PYMULT" "PZINIT" "PZMULT" "R" "R0" "R51" "R52" "R61" "R62" "RADIAL_NEG_EXTENT" "RADIAL_POS_EXTENT" "RADIUS" "RANDOM" "RANGE" "RASTER" "RC" "REBINFREQ" "RECOMBINATION_PROBABILITY" "RECYCLEBLOCKS" "REFER" "REFPOS" "REMOTEPARTDEL" "REPARTFREQ" "RESIDUUM" "RESTART_FILE" "RESTART_STEP" "RFFCFN" "RFFREQ" "RFMAPFN" "RFPHI" "RFRINGE" "RFVCFN" "RGUESS" "RHODUMP" "RINIT" "RMAX" "RMIN" "RNGTYPE" "ROTATE180" "ROTATE270" "ROTATE90" "ROTATION" "R_START" "R_STEPS" "S" "SAMPLINGS" "SBIN" "SCALABLE" "SCALE" "SCSOLVEFREQ" "SECTOR" "SEED" "SEPPEAKS" "SIGMA" "SIGMAPT" "SIGMAPX" "SIGMAPY" "SIGMAPZ" "SIGMAR" "SIGMAT" "SIGMAX" "SIGMAY" "SIGMAZ" "SIMBIN_CROSSOVER_NU" "SIMTMPDIR" "SLICES" "SLPTC" "SOL_SYNCH" "SPIRAL" "SPTDUMPFREQ" "STARTPOPULATION" "STATDUMPFREQ" "STEP" "STEPSIZE" "STEPSPERTURN" "STOP" "STOREOBJECTIVES" "STRING" "SUPERPOSE" "SURFDUMPFREQ" "SYMMETRY" "T" "T0" "TABLE" "TAN_DELTA" "TANGENTIAL_OFFSET" "TAU" "TELL" "TEMPERATURE" "TEMPLATEDIR" "TFALL" "THETA" "THETA_IN" "THETA_OUT" "THRESHOLD" "TIMEINTEGRATOR" "TIMES" "TMULT" "TOL" "TOPO" "TOTALTIME" "TP" "TPULSEFWHM" "TRACE" "TRACKBACK" "TRANSPARENT" "TRIMCOIL" "TRIMCOILTHRESHOLD" "TRISE" "TRUNORDER" "T_START" "T_STEPS" "TURNS" "TYPE" "UPPERBOUND" "VALUE" "VALUES" "VAPERT" "VARIABLE" "VARRADIUS" "VERSION" "VKICK" "VOLT" "W" "WAKEF" "WARN" "WEIGHT" "WIDTH" "WRITETOFILE" "X" "XEND" "XMULT" "XSCALE" "XSIZE" "X_START" "XSTART" "X_STEPS" "XYZSCALE" "Y" "YEND" "YMULT" "YSCALE" "YSIZE" "Y_START" "YSTART" "Y_STEPS" "Z" "Z0" "ZEND" "ZINIT" "ZSCALE" "ZSHIFT" "Z_START" "ZSTART" "Z_STEPS" "ZSTOP") t) "\\>") (defconst opal-font-lock-keywords-parameters (list - '("\\<\\(A\\(?:L\\(?:L\\|PHA[XY]?\\)\\|M\\(?:PLITUDE_MODEL\\|R\\(?:_\\(?:BF[XYZ]\\|D\\(?:ENSITY\\|OMAIN_RATIO\\)\\|M\\(?:AX\\(?:GRID[XYZ]\\|LEVEL\\|_NUM_PART\\)\\|G_\\(?:INTERP\\|N\\(?:ORM\\|SWEEPS\\)\\|PREC\\|RE\\(?:\\(?:BALANC\\|US\\)E\\)\\|SMOOTHER\\|TOL\\|VERBOSE\\)\\|IN_NUM_PART\\)\\|RE\\(?:F[XYZ]\\|GRID_FREQ\\)\\|SCALING\\|TAGGING\\|YT_DUMP_FREQ\\)\\)?\\)\\|NGLE\\|P\\(?:ERTURE\\|VETO\\)\\|SCIIDUMP\\|UTOPHASE\\|ZIMUTHAL_\\(?:ANGLE\\|EXTENT\\)\\)\\|B\\(?:0\\|B\\(?:LENGTH\\|OXINCR\\|_LENGTH\\)\\|C\\(?:FFT[TXYZ]\\|URRENT\\)\\|E\\(?:AM\\(?:HALOBOUNDARY\\|_\\(?:\\(?:P\\(?:HI\\|R\\)\\|R\\)INIT\\)\\)?\\|TA[XY]\\)\\|FREQ\\|IRTH_CONTROL\\|MAX\\|OUND\\(?:ARYGEOMETRY\\|PDESTROYFQ\\)\\|SCALE\\)\\|C\\(?:A\\(?:THTEMP\\|VITY_CENTRE\\)\\|ENTRE_LENGTH\\|HARGE\\|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T\\|T\\(?:ART\\|OP\\)\\)\\|_ST\\(?:ART\\|EPS\\)\\)\\|[ABCKLNRSTW-Z]\\)\\>" . font-lock-variable-name-face) ) "Highlighting expressions for OPAL mode (parameters).") -- GitLab