Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • OPAL/opal-x/src
  • germann_e/src
  • binder_j/opalx-elements
3 results
Show changes
Commits on Source (185)
Showing
with 2641 additions and 311 deletions
.DS_Store
.ipynb_checkpoints
#*
*~
*.o
*.a
*.aux
*.h5
#*#
*.dat
optimizer/Tests/*.exe
build
data
......
......@@ -31,24 +31,47 @@ option (USE_STATIC_LIBRARIES "Link with static libraries if available" ON)
message (STATUS "Build type is: " ${CMAKE_BUILD_TYPE})
# Check the compiler type
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
message(STATUS "Using GCC")
add_compile_options(-Wno-overloaded-virtual)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(STATUS "Using Clang")
add_compile_options(-Wno-overloaded-virtual)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(STATUS "Using Intel Compiler")
add_compile_options(-diag-disable 611)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "ARM")
message(STATUS "Using ARM Compiler")
add_compile_options(--diag_suppress=611)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AMD")
message(STATUS "Using AMD Compiler")
add_compile_options(-Wno-overloaded-virtual)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "NVIDIA")
message(STATUS "Using NVIDIA CUDA Compiler")
add_compile_options(-Xcudafe --diag_suppress=611)
else()
message(WARNING "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
endif()
# Select flags.
set (CMAKE_CXX_STANDARD 20)
set (CMAKE_CUDA_EXTENSIONS OFF)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3")
set (CMAKE_CXX_FLAGS_RELEASE "-g -O3 ")
#set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 -g")
#set (CMAKE_CXX_FLAGS_RELEASE "-O0")
set (CMAKE_CXX_FLAGS_DEBUG "-g")
set (CMAKE_CXX_FLAGS_DEBUG "-g -O0")
if (NOT "${IPPL_PLATFORMS}" STREQUAL "CUDA" AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# Use sanitizer flags for GCC or Clang only
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address,undefined")
endif ()
#if ("${IPPL_PLATFORMS}" STREQUAL "CUDA")
# set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -G") #-diag-suppress=611")
#endif()
if ("${IPPL_PLATFORMS}" STREQUAL "CUDA")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -G -diag-suppress=611")
endif()
message (STATUS "CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
......@@ -56,10 +79,6 @@ message (STATUS "CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
add_definitions (-DNOCTAssert)
#add_compile_options (-ferror-limit=1)
#add_compile_options (-fsanitize=undefined,address)
#add_compile_options (-Wno-deprecated-declarations)
#add_compile_options (-Wno-unused)
#add_compile_options (-Wextra)
add_compile_options (-Wno-error=uninitialized)
add_compile_options (-Wno-error=restrict)
add_compile_options (-Wno-error=unused-function)
......@@ -68,11 +87,26 @@ add_compile_options (-Wno-error=unused-but-set-variable)
add_compile_options (-Wno-error=maybe-uninitialized)
add_compile_options (-Wno-error=reorder)
add_compile_options (-Wno-cpp)
add_compile_options (-Wno-overloaded-virtual)
add_compile_options (-funroll-loops)
add_compile_options (-fstrict-aliasing)
add_compile_options (-DKOKKOS_DEPENDENCE)
add_compile_options (-Wno-return-type)
add_compile_options (-gdwarf-2) # avoid dwarf errors on merlin
add_compile_options (-gdwarf-4) # avoid dwarf errors on merlin
option (OPALX_ARCH_HOPPER90 "Enable HOPPE GPU" OFF)
if(OPALX_ARCH_HOPPER90)
add_compile_options (-Wdangling-reference) # need for G&H
endif ()
option (OPALX_SANITIZER "Enable Sanitizer" OFF)
if (OPALX_SANITIZER)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address,undefined")
add_link_options (-fsanitize=undefined,address)
else ()
message (STATUS "Sanitizer status is: ${OPALX_SANITIZER}")
add_compile_options (-fno-sanitize=all)
endif ()
# Resolve all library dependencies
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
......@@ -83,39 +117,32 @@ message (STATUS "The C++ compiler version is: ${CMAKE_CXX_COMPILER_VERSION}")
message (STATUS "The MPI C++ compiler is: ${MPI_CXX_COMPILER}")
message (STATUS "The underlying C++ compiler is: ${CMAKE_CXX_COMPILER}")
#find_package(Heffte 2.2.0 REQUIRED)
#message (STATUS "Found Heffte_DIR: ${Heffte_DIR}")
#find_library(HEFFTE_LIBRARY heffte HINTS ${Heffte_DIR}/../..)
#message (STATUS "Found HEFFTE lib: ${HEFFTE_LIBRARY}")
#
#
#find_package(Kokkos REQUIRED)
#message (STATUS "Found Kokkos_DIR: ${Kokkos_DIR}")
#if ("${Kokkos_DEVICES}" MATCHES "CUDA")
# set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g -G --diag-suppress=20011")
#endif()
#find_library(KOKKOS_LIBRARY1 NAMES kokkoscore HINTS ${Kokkos_DIR}/../..)
#find_library(KOKKOS_LIBRARY2 NAMES kokkoscontainers HINTS ${Kokkos_DIR}/../..)
#find_library(KOKKOS_LIBRARY3 NAMES kokkossimd HINTS ${Kokkos_DIR}/../..)
#message (STATUS "Found Kokkos lib: ${KOKKOS_LIBRARY1}:${KOKKOS_LIBRARY2}:${KOKKOS_LIBRARY3}")
message (STATUS "Found IPPL_DIR: ${IPPL_DIR}")
message(STATUS "Found IPPL_DIR: ${IPPL_DIR}")
if(NOT IPPL_VERSION)
set(IPPL_VERSION "3.2.0")
message(STATUS "Defaulting to IPPL-${IPPL_VERSION}")
endif()
# Allow the user to specify a branch or tag; default to "master" if not provided.
set(IPPL_GIT_TAG "master" CACHE STRING "Branch or tag for IPPL (default: master)")
message(STATUS "Fetching IPPL branch/tag: ${IPPL_GIT_TAG}")
# Declare the external dependency
FetchContent_Declare(ippl
#URL https://github.com/IPPL-framework/ippl/archive/refs/tags/IPPL-${IPPL_VERSION}.tar.gz
GIT_REPOSITORY https://github.com/IPPL-framework/ippl.git
GIT_TAG ${IPPL_GIT_TAG}
GIT_SHALLOW True
DOWNLOAD_EXTRACT_TIMESTAMP True
)
# Make IPPL available
FetchContent_MakeAvailable(ippl)
include_directories("${IPPL_SOURCE_DIR}/src")
#find_library(IPPL_LIBRARY ippl HINTS ${IPPL_LIBRARY_DIR})
message (STATUS "Found Ippl_INC: ${IPPL_INCLUDE_DIR}")
message (STATUS "Found Ippl_LIB: ${IPPL_LIBRARY}")
# Print relevant paths
message(STATUS "Found Ippl_INC: ${IPPL_INCLUDE_DIR}")
message(STATUS "Found Ippl_LIB: ${IPPL_LIBRARY}")
message (STATUS "FFTW lib(s): ${OPAL_FFTW_LIBS}")
message (STATUS "MPI lib(s): ${OPAL_MPI_LIBS}")
......@@ -242,6 +269,7 @@ endif ()
#
# Handle options
#
option (BUILD_OPAL_UNIT_TESTS "Unit tests" OFF)
if (BUILD_OPAL_UNIT_TESTS)
find_package (GTest REQUIRED HINT $ENV{GTEST_PREFIX})
......@@ -261,10 +289,10 @@ if (ENABLE_DOXYDOC)
)
endif ()
option (DBG_SCALARFIELD "Enable dump of scalar field rho_m" OFF)
if (DBG_SCALARFIELD)
message (STATUS "Write scalar rho_m field is enabled ")
add_definitions (-DDBG_SCALARFIELD)
option (OPALX_FIELD_DEBUG "Enable dump of scalar and vector fields (only one rank for now)" OFF)
if (OPALX_FIELD_DEBUG)
message (STATUS "Write scalar/vector field enabled ")
add_definitions (-DOPALX_FIELD_DEBUG)
endif ()
#
......@@ -276,12 +304,10 @@ add_custom_target(
src/OPALrevision.h
)
add_custom_command(
OUTPUT src/OPALrevision.h
COMMAND ./gen_OPALrevision
add_custom_target(makeOPALrevision
# OUTPUT src/OPALrevision.h
COMMAND ${CMAKE_SOURCE_DIR}/gen_OPALrevision
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS
# always_rebuild
)
add_subdirectory (src)
......
......@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = "OPAL (Object Oriented Parallel Accelerator Library)"
PROJECT_NAME = "OPALX (Object Oriented Parallel Accelerator Library for Exascal)"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
......@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ./doc
OUTPUT_DIRECTORY = /psi/home/adelmann/webhosting/people/aadelmann/pub/opalx
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
......@@ -764,7 +764,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = /Users/adelmann/git/ippl/src /Users/adelmann/OPAL/tmp/src/OPAL/opal-x-src/src
INPUT = /psi/home/adelmann/opalx/src /psi/home/adelmann/opalx/build/_deps/ippl-src/src
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......@@ -784,8 +784,9 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
FILE_PATTERNS = *.c* \
*.h*
FILE_PATTERNS = *.cpp* \
*.hpp* \
*.h*
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
......@@ -800,7 +801,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
EXCLUDE = #*.*#
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
......
......@@ -4,55 +4,122 @@
# BUILDING OPAL-X on Merlin
## Modules needed
## Modules needed OPENMP build
load_ipplomp() {
module purge
module use unstable
module load cmake/3.25.2
module load gcc/11.4.0 # does not work for openmp and mixed module load gcc/12.3.0
module load openmpi
module load boost
module load fftw
module load gtest
module load gsl
module load hdf5
module load H5hut
module load boost
module load cuda/12.1.1
export BOOST_ROOT=$BOOST_DIR
export OMP_PROC_BIND=spread
}
```
cmake/3.25.2
## build for Kokkos, FEFFTe and IPPL
openmpi/4.1.5_slurm
% git clone git@github.com:IPPL-framework/ippl-build-scripts.git
fftw/3.3.10_merlin6
set the correct environment, adjust the path in ITB_DOWNLOAD_DIR
gsl/2.7
% export ITB_DOWNLOAD_DIR=/data/project/general/isodarUQ/adelmann
% export ITB_SRC_DIR=${ITB_DOWNLOAD_DIR}/downloads
% export ITB_PREFIX=${ITB_DOWNLOAD_DIR}/install
% mkdir -p ${ITB_SRC_DIR}
% mkdir -p ${ITB_PREFIX}
H5hut/2.0.0rc6_slurm
Now you can build serial and with openmp
gcc/12.3.0
% ./999-build-everything -t serial --kokkos --heffte --ippl --export -u
% ./999-build-everything -t openmp --enable-openmp --kokkos --heffte --ippl --export -u
boost/1.82.0_slurm
gtest/1.13.0-1
here is still a problem with cuda (./999-build-everything -t mixed --enable-cuda --enable-openmp --kokkos --heffte --ippl --export --arch=PASCAL6 -u)
hdf5/1.10.8_slurm
## Checkout OPAL-X
gnutls/3.5.19
```
% git clone git@gitlab.psi.ch:OPAL/opal-x/src.git
Change to build-script
401-build-opal -r openmp --export -u
## Clone repo and build opal-x with OPENMP
```
$ git clone git@gitlab.psi.ch:OPAL/opal-x/src.git opal-x
$ cd opal-x
$ ./gen_OPALrevision
```
### To compile for OPENMP:
```
$ mkdir build_openmp && cd build_openmp
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20 -DENABLE_SOLVERS=ON -DENABLE_FFT=ON -DIPPL_PLATFORMS=openmp
```
### To compile for GPU, for example Amper80 on Gwendolen
```
$ mkdir build_cuda && cd build_cuda
```
in debug mode:
```
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DIPPL_PLATFORMS=CUDA -DKokkos_ARCH_AMPERE80=ON -DCMAKE_CXX_STANDARD=20 -DENABLE_FFT=ON -DENABLE_SOLVERS=ON
```
and release (optimized) mode:
```
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DIPPL_PLATFORMS=CUDA -DKokkos_ARCH_AMPERE80=ON -DCMAKE_CXX_STANDARD=20 -DENABLE_FFT=ON -DENABLE_SOLVERS=ON
```
### To compile for other GPU architecture, like Pascal on the Merlin's login node
```
$ mkdir build_cuda_login && cd build_cuda_login
```
in debug mode:
```
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DIPPL_PLATFORMS=CUDA -DKokkos_ARCH_PASCAL61=ON -DCMAKE_CXX_STANDARD=20 -DENABLE_FFT=ON -DENABLE_SOLVERS=ON
```
and release (optimized) mode:
```
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DIPPL_PLATFORMS=CUDA -DKokkos_ARCH_PASCAL61=ON -DCMAKE_CXX_STANDARD=20 -DENABLE_FFT=ON -DENABLE_SOLVERS=ON
```
### Submitting jobs on Gwendolen and Merlin GPUs
To execute opal-x on merlin's gpus (compile for PASCAL61), the job script should looks like
```
#!/bin/bash
#SBATCH --error=merlin.error
#SBATCH --output=merlin.out
#SBATCH --time=00:10:00
#SBATCH --nodes=1
#SBATCH --ntasks=2
#SBATCH --cluster=gmerlin6
#SBATCH --partition=gpu-short
#SBATCH --account=merlin
##SBATCH --exclusive
#SBATCH --gpus=2
#SBATCH --nodelist=merlin-g-001
##unlink core
ulimit -c unlimited
srun ./opalx DriftTest-1.in --info 10 --kokkos-map-device-id-by=mpi_rank
```
and for Gwendolen (compile for AMPERE80)
```
#!/bin/bash
#SBATCH --error=gwendolen.error
#SBATCH --output=gwendolen.out
#SBATCH --time=00:02:00
#SBATCH --nodes=1
#SBATCH --ntasks=2
#SBATCH --clusters=gmerlin6
#SBATCH --partition=gwendolen # Mandatory, as gwendolen is not the default partition
#SBATCH --account=gwendolen # Mandatory, as gwendolen is not the default account
##SBATCH --exclusive
#SBATCH --gpus=2
##unlink core
ulimit -c unlimited
srun ./opalx DriftTest-1.in --info 10 --kokkos-map-device-id-by=mpi_rank
```
The documentation has been moved to the [Wiki](https://gitlab.psi.ch/OPAL/src/wikis/home).
#!/bin/bash -l
#
function echocolor() { # $1 = string
COLOR='\033[1;33m'
NC='\033[0m'
printf "${COLOR}$1${NC}\n"
}
#
otb_exit() {
local -i ec=$?
if [[ -n "${BASH_VERSION}" ]]; then
local -i n=${#BASH_SOURCE[@]}
local -r recipe_name="${BASH_SOURCE[n]}"
else
local -r recipe_name="${ZSH_ARGZERO}"
fi
echo -n "${recipe_name}: "
if (( ec == 0 )); then
echo "done!"
elif (( ec == OTB_ERR_ARG )); then
echo "argument error!"
elif (( ec == OTB_ERR_SETUP )); then
echo "error in setting everything up!"
elif (( ec == OTB_ERR_SYSTEM )); then
echo "unexpected system error!"
elif (( ec == OTB_ERR_DOWNLOAD )); then
echo "error in downloading the source file!"
elif (( ec == OTB_ERR_UNTAR )); then
echo "error in un-taring the source file!"
elif (( ec == OTB_ERR_CONFIGURE )); then
echo "error in configuring the software!"
elif (( ec == OTB_ERR_MAKE )); then
echo "error in compiling the software!"
elif (( ec == OTB_ERR_PRE_INSTALL )); then
echo "error in pre-installing the software!"
elif (( ec == OTB_ERR_INSTALL )); then
echo "error in installing the software!"
elif (( ec == OTB_ERR_POST_INSTALL )); then
echo "error in post-installing the software!"
else
echo "oops, unknown error!!!"
fi
exit ${ec}
}
export -f otb_exit > /dev/null
# General build parameters
export build_type=
compiler=${compiler:-$(which g++)}
export compiler
mode=Debug #Release
# Build targets
build_opalx=true
# OPAL settings
export ENABLE_UNIT_TESTS=OFF
EXPORT_COMMANDS=
function help() {
echo "Usage: $0 [flags...]"
echo "For long form options, arguments must be given after an equal sign (--opt=arg)."
echo "Refer to the comments in this shell script for additional details."
echo "Flags:"
echo " -h|--help: show this help"
echo " -t|--target target: preset build for target (cuda/openmp/serial) or name for custom build;"
echo " this flag is REQUIRED as it will be used to identify the build directories"
# Kokkos configuration
echo " --enable-cuda: build OPAL-X with CUDA"
echo " --enable-openmp: build OPAL-X with OpenMP"
echo " --enable-serial: build OPAL-X with in serial mode"
# Architectures: https://kokkos.github.io/kokkos-core-wiki/keywords.html#keywords-arch
echo " -g|--cudacc capability: set GPU compute capability for Kokkos CUDA (default Ampere 80, written as AMPERE80)"
echo " -c|--cpu arch: set CPU architecture for Kokkos optimizations (default local machine, i.e. NATIVE)"
# OPAL-X configuration
echo " -u|--nounit: disable OPAL-X unit tests"
# LSP: language server protocol (https://en.wikipedia.org/wiki/Language_Server_Protocol)
# CMake can be configured to export information that would allow certain editor tools (like clangd)
# to provide language- and program-aware diagnostics, such as signature mismatches or other
# symbol-related errors.
echo " --export: export OPAL compile commands for LSPs (such as clangd)"
# General build configuration
echo " -d|--debug: debug build"
echo " --mode build_mode: set build mode directly (Release, Debug, etc)"
}
# POSIX compliant long options with getopts:
# https://stackoverflow.com/a/28466267/2773311
die() { echo "$1"; exit 1; }
needs_arg() { if [ -z "$OPTARG" ]; then die "No arg for --$opt option"; fi; }
while getopts "ht:dc:ug:-:" opt; do
if [ "$opt" = "-" ]; then # long option: reformulate OPT and OPTARG
opt="${OPTARG%%=*}" # extract long option name
OPTARG="${OPTARG#"$opt"}" # extract long option argument (may be empty)
OPTARG="${OPTARG#=}" # if long option argument, remove assigning `=`
fi
case $opt in
h | help) help; exit 0 ;;
t | target) needs_arg; build_type=$OPTARG ;;
d | debug) mode=Debug ;;
mode) mode=$OPTARG ;;
u | nounit) ENABLE_UNIT_TESTS=OFF ;;
export) EXPORT_COMMANDS="-DCMAKE_EXPORT_COMPILE_COMMANDS=1" ;;
g | cudacc) needs_arg; GPU_ARCH=$OPTARG ;;
c | cpu) needs_arg; CPU_ARCH=$OPTARG ;;
enable-cuda) CUDA=ON ;;
enable-openmp) OPENMP=ON ;;
enable-serial) SERIAL=ON ;;
?) exit 1 ;;
esac
done
if [ -z "$build_type" ]; then
echo "No build target specified. Run $0 --help for more details."
exit 1
fi
#
# Can be set from outside
#
if [ ! -z $OTB_SRC_DIR ]; then
echocolor "Note: OTB_SRC_DIR was inherited and set to $OTB_SRC_DIR"
else
export OTB_SRC_DIR=/psi/home/adelmann/opal-x/downloads
fi
if [ ! -z $OTB_PREFIX ]; then
OTB_PREFIX="${OTB_PREFIX}_${build_type}"
echocolor "Note: OTB_PREFIX was inherited and set to $OTB_PREFIX"
else
export OTB_PREFIX=/psi/home/adelmann/opal-x/install_${build_type}
fi
# Heffte Ippl Kokkos (HEK)
if [ ! -z $HIK_INSTALL_DIR ]; then
HIK_INSTALL_DIR="${HIK_INSTALL_DIR}_${build_type}"
echocolor "Note: HIK_INSTALL_DIR was inherited and set to $HIK_INSTALL_DIR"
else
export HIK_INSTALL_DIR=$HOME/opal-x/ippl-build-scripts_${build_type}
fi
#
export NJOBS=15
trap "otb_exit" EXIT
CXXFLAGS=""
build_mode=${build_mode:-Debug}
compiler=${compiler:-"$(which gcc)"}
Kokkos_DIR=${ITB_PREFIX}${build_type}
echo ${Kokkos_DIR}
if [[ "$build_type" == "cuda" ]]; then
echo "Build Cuda mode."
compiler="${Kokkos_DIR:?Kokkos install directory must be provided}/bin/nvcc_wrapper"
CXXFLAGS="--expt-relaxed-constexpr"
elif [[ "$build_type" == "serial" ]]; then
echo "Build serial mode."
elif [[ "$build_type" == "openmp" ]]; then
echo "Build OpenMP mode."
CXXFLAGS="-fopenmp -w "
else
echo "Wrong build type."
fi
echo ${compiler}
cd "${OTB_SRC_DIR}" || exit "${OTB_ARG_ERR}"
if [ -d "opal-x" ]
then
echo "Found existing OPAL-X source directory in ${OTB_SRC_DIR}"
else
echo "Clone OPAL-X repo ... "
if [ -n "$USE_SSH" ]; then
git clone git@gitlab.psi.ch:OPAL/opal-x/src.git opal-x
else
git clone https://gitlab.psi.ch/OPAL/opal-x/src.git opal-x
fi
fi
mkdir -p "${OTB_SRC_DIR}/opal-x/build_${build_type}" && cd "$_" || exit "${OTB_ARG_ERR}"
#
CXX=mpicxx CC=mpicc cmake \
-DCMAKE_BUILD_TYPE="${build_mode}" \
-DHeffte_DIR=$HIK_INSTALL_DIR/lib/cmake/Heffte \
-DKokkos_DIR=$HIK_INSTALL_DIR/lib64/cmake/Kokkos \
-DIPPL_DIR=$HIK_INSTALL_DIR \
-DCMAKE_CXX_EXTENSIONS=Off \
-DCMAKE_INSTALL_PREFIX=${OTB_PREFIX} \
-DCMAKE_Fortran_COMPILER_WORKS=OFF \
-DUSE_STATIC_LIBRARIES=ON \
-DENABLE_OpenMP=ON \
-DCMAKE_CXX_COMPILER="${compiler}" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
..
#
# compile & install
make -j ${NJOBS}
make
/* Drift-0.in
OPALX
Simple Gaussian distribution test, zero steps
*/
OPTION, PSDUMPFREQ = 10; // 6d data written every 10th time step (h5).
OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat).
OPTION, BOUNDPDESTROYFQ = 10; // Delete lost particles, if any out of 10 \sigma
OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
Title, string="Test simple Gaussian distribution with space charge";
Value,{OPALVERSION};
// ----------------------------------------------------------------------------
// Global Parameters
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = 1E5; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
// ----------------------------------------------------------------------------
// Initial Momentum Calculation
REAL Edes = 0.01; //initial energy in GeV
REAL gamma = (Edes+EMASS)/EMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value, {Edes, P0};
D1: DRIFT, L = 1.0, ELEMEDGE = 0.0;
myLine: Line = (D1);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq, CHARGE = -1;
FS1: Fieldsolver, NX=32, NY=32, NZ=32, TYPE=NONE, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 5, GREENSF = STANDARD;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1e-3, SIGMAY=5e-3, SIGMAZ=10e-3, SIGMAPX=1e-6, SIGMAPY=1e-6, SIGMAPZ=1e-6;
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 1, DT = {5e-11}, ZSTOP=1.0;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;ENDTRACK;
QUIT;
SDDS1
&description
text="Statistics data 'Drift-0.in' 29/01/2025 16:45:13",
contents="stat parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name=s,
type=double,
units=m,
description="2 Path length"
&end
&column
name=numParticles,
type=long,
units=1,
description="3 Number of Macro Particles"
&end
&column
name=charge,
type=double,
units=1,
description="4 Bunch Charge"
&end
&column
name=energy,
type=double,
units=MeV,
description="5 Mean Bunch Energy"
&end
&column
name=rms_x,
type=double,
units=m,
description="6 RMS Beamsize in x"
&end
&column
name=rms_y,
type=double,
units=m,
description="7 RMS Beamsize in y"
&end
&column
name=rms_s,
type=double,
units=m,
description="8 RMS Beamsize in s"
&end
&column
name=rms_px,
type=double,
units=1,
description="9 RMS Normalized Momenta in x"
&end
&column
name=rms_py,
type=double,
units=1,
description="10 RMS Normalized Momenta in y"
&end
&column
name=rms_ps,
type=double,
units=1,
description="11 RMS Normalized Momenta in s"
&end
&column
name=emit_x,
type=double,
units=m,
description="12 Normalized Emittance x"
&end
&column
name=emit_y,
type=double,
units=m,
description="13 Normalized Emittance y"
&end
&column
name=emit_s,
type=double,
units=m,
description="14 Normalized Emittance s"
&end
&column
name=mean_x,
type=double,
units=m,
description="15 Mean Beam Position in x"
&end
&column
name=mean_y,
type=double,
units=m,
description="16 Mean Beam Position in y"
&end
&column
name=mean_s,
type=double,
units=m,
description="17 Mean Beam Position in s"
&end
&column
name=ref_x,
type=double,
units=m,
description="18 x coordinate of reference particle in lab cs"
&end
&column
name=ref_y,
type=double,
units=m,
description="19 y coordinate of reference particle in lab cs"
&end
&column
name=ref_z,
type=double,
units=m,
description="20 z coordinate of reference particle in lab cs"
&end
&column
name=ref_px,
type=double,
units=1,
description="21 x momentum of reference particle in lab cs"
&end
&column
name=ref_py,
type=double,
units=1,
description="22 y momentum of reference particle in lab cs"
&end
&column
name=ref_pz,
type=double,
units=1,
description="23 z momentum of reference particle in lab cs"
&end
&column
name=max_x,
type=double,
units=m,
description="24 Max Beamsize in x"
&end
&column
name=max_y,
type=double,
units=m,
description="25 Max Beamsize in y"
&end
&column
name=max_s,
type=double,
units=m,
description="26 Max Beamsize in s"
&end
&column
name=xpx,
type=double,
units=1,
description="27 Correlation xpx"
&end
&column
name=ypy,
type=double,
units=1,
description="28 Correlation ypy"
&end
&column
name=zpz,
type=double,
units=1,
description="29 Correlation zpz"
&end
&column
name=Dx,
type=double,
units=m,
description="30 Dispersion in x"
&end
&column
name=DDx,
type=double,
units=1,
description="31 Derivative of dispersion in x"
&end
&column
name=Dy,
type=double,
units=m,
description="32 Dispersion in y"
&end
&column
name=DDy,
type=double,
units=1,
description="33 Derivative of dispersion in y"
&end
&column
name=Bx_ref,
type=double,
units=T,
description="34 Bx-Field component of ref particle"
&end
&column
name=By_ref,
type=double,
units=T,
description="35 By-Field component of ref particle"
&end
&column
name=Bz_ref,
type=double,
units=T,
description="36 Bz-Field component of ref particle"
&end
&column
name=Ex_ref,
type=double,
units=MV/m,
description="37 Ex-Field component of ref particle"
&end
&column
name=Ey_ref,
type=double,
units=MV/m,
description="38 Ey-Field component of ref particle"
&end
&column
name=Ez_ref,
type=double,
units=MV/m,
description="39 Ez-Field component of ref particle"
&end
&column
name=dE,
type=double,
units=MeV,
description="40 energy spread of the beam"
&end
&column
name=dt,
type=double,
units=ns,
description="41 time step size"
&end
&column
name=partsOutside,
type=double,
units=1,
description="42 outside n*sigma of the beam"
&end
&column
name=DebyeLength,
type=double,
units=m,
description="43 Debye length in the boosted frame"
&end
&column
name=plasmaParameter,
type=double,
units=1,
description="44 Plasma parameter that gives no. of particles in a Debye sphere"
&end
&column
name=temperature,
type=double,
units=K,
description="45 Temperature of the beam"
&end
&column
name=rmsDensity,
type=double,
units=1,
description="46 RMS number density of the beam"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPALX 2024.1.00 git rev. #7a7c467c786b8b02d7cc45c1f08f459a1db9c2d1
opal-t
5.000000000000002e-02 1.497189858005982e-02 100000 -1.000000000000000e-15 1.000000000266142e+01 9.889155188488093e-04 4.950090865970479e-03 9.861871379461618e-03 9.970669585709366e-07 9.971722736989056e-07 1.003246656938692e-06 9.860141848324783e-10 4.936075503055458e-09 9.893815347372185e-09 -7.583392026916865e-08 9.023331798946602e-08 -1.480039934953741e-07 2.559171974980959e-12 2.296290625299323e-13 1.497189858005982e-02 3.511824029493289e-09 3.151079323058519e-10 2.054518964061428e+01 3.000478311466379e-03 1.499957329623516e-02 2.996972300651386e-02 -1.276894970111087e-03 2.690129202315001e-03 3.871437664170549e-03 -6.040473904530270e-13 4.605771783803995e-15 1.876268854707752e-11 -1.333847696846981e-16 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 1.619249972101139e-04 5.000000000000002e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
/* Drinft-1.in
OPALX
Gaus test no timestep
*/
OPTION, PSDUMPFREQ = 10; // 6d data written every 10th time step (h5).
OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat).
OPTION, BOUNDPDESTROYFQ = 10; // Delete lost particles, if any out of 10 \sigma
OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
Title, string="Test simple Gaussian distribution with space charge";
Value,{OPALVERSION};
// ----------------------------------------------------------------------------
// Global Parameters
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = 1E5; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
// ----------------------------------------------------------------------------
// Initial Momentum Calculation
REAL Edes = 0.01; //initial energy in GeV
REAL gamma = (Edes+EMASS)/EMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value, {Edes, P0};
D1: DRIFT, L = 1.0, ELEMEDGE = 0.0;
myLine: Line = (D1);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq, CHARGE = -1;
FS1: Fieldsolver, NX=32, NY=32, NZ=32, TYPE=NONE, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 5, GREENSF = STANDARD;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1e-3, SIGMAY=5e-3, SIGMAZ=10e-3, SIGMAPX=1e-6, SIGMAPY=1e-6, SIGMAPZ=1e-6;
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 10, DT = {5e-11}, ZSTOP=1.0;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;ENDTRACK;
QUIT;
This diff is collapsed.
/* Drinft-2.in
OPALX
Test simple Gaussian distribution with space charge no tracking
*/
OPTION, PSDUMPFREQ = 1; // 6d data written every 10th time step (h5).
OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat).
OPTION, BOUNDPDESTROYFQ = 10; // Delete lost particles, if any out of 10 \sigma
OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
Title, string="Test simple Gaussian distribution with space charge";
Value,{OPALVERSION};
// ----------------------------------------------------------------------------
// Global Parameters
REAL N = 32;
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = N*N*N; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
// ----------------------------------------------------------------------------
// Initial Momentum Calculation
REAL Edes = 0.01; //initial energy in GeV
REAL gamma = (Edes+EMASS)/EMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value, {Edes, P0};
D1: DRIFT, L = 0.25, ELEMEDGE = 0.0;
myLine: Line = (D1);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1e6, CHARGE = -1;
FS1: Fieldsolver, NX=N, NY=N, NZ=N, TYPE=FFT, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 5, GREENSF = STANDARD;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1e-3, SIGMAY=1e-3, SIGMAZ=1e-3, SIGMAPX=1e-6, SIGMAPY=1e-6, SIGMAPZ=1e-6;
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 1, DT = {1e-11}, ZSTOP=0.25;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;
ENDTRACK;
QUIT;
SDDS1
&description
text="Statistics data 'Drift-2.in' 29/01/2025 16:45:44",
contents="stat parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name=s,
type=double,
units=m,
description="2 Path length"
&end
&column
name=numParticles,
type=long,
units=1,
description="3 Number of Macro Particles"
&end
&column
name=charge,
type=double,
units=1,
description="4 Bunch Charge"
&end
&column
name=energy,
type=double,
units=MeV,
description="5 Mean Bunch Energy"
&end
&column
name=rms_x,
type=double,
units=m,
description="6 RMS Beamsize in x"
&end
&column
name=rms_y,
type=double,
units=m,
description="7 RMS Beamsize in y"
&end
&column
name=rms_s,
type=double,
units=m,
description="8 RMS Beamsize in s"
&end
&column
name=rms_px,
type=double,
units=1,
description="9 RMS Normalized Momenta in x"
&end
&column
name=rms_py,
type=double,
units=1,
description="10 RMS Normalized Momenta in y"
&end
&column
name=rms_ps,
type=double,
units=1,
description="11 RMS Normalized Momenta in s"
&end
&column
name=emit_x,
type=double,
units=m,
description="12 Normalized Emittance x"
&end
&column
name=emit_y,
type=double,
units=m,
description="13 Normalized Emittance y"
&end
&column
name=emit_s,
type=double,
units=m,
description="14 Normalized Emittance s"
&end
&column
name=mean_x,
type=double,
units=m,
description="15 Mean Beam Position in x"
&end
&column
name=mean_y,
type=double,
units=m,
description="16 Mean Beam Position in y"
&end
&column
name=mean_s,
type=double,
units=m,
description="17 Mean Beam Position in s"
&end
&column
name=ref_x,
type=double,
units=m,
description="18 x coordinate of reference particle in lab cs"
&end
&column
name=ref_y,
type=double,
units=m,
description="19 y coordinate of reference particle in lab cs"
&end
&column
name=ref_z,
type=double,
units=m,
description="20 z coordinate of reference particle in lab cs"
&end
&column
name=ref_px,
type=double,
units=1,
description="21 x momentum of reference particle in lab cs"
&end
&column
name=ref_py,
type=double,
units=1,
description="22 y momentum of reference particle in lab cs"
&end
&column
name=ref_pz,
type=double,
units=1,
description="23 z momentum of reference particle in lab cs"
&end
&column
name=max_x,
type=double,
units=m,
description="24 Max Beamsize in x"
&end
&column
name=max_y,
type=double,
units=m,
description="25 Max Beamsize in y"
&end
&column
name=max_s,
type=double,
units=m,
description="26 Max Beamsize in s"
&end
&column
name=xpx,
type=double,
units=1,
description="27 Correlation xpx"
&end
&column
name=ypy,
type=double,
units=1,
description="28 Correlation ypy"
&end
&column
name=zpz,
type=double,
units=1,
description="29 Correlation zpz"
&end
&column
name=Dx,
type=double,
units=m,
description="30 Dispersion in x"
&end
&column
name=DDx,
type=double,
units=1,
description="31 Derivative of dispersion in x"
&end
&column
name=Dy,
type=double,
units=m,
description="32 Dispersion in y"
&end
&column
name=DDy,
type=double,
units=1,
description="33 Derivative of dispersion in y"
&end
&column
name=Bx_ref,
type=double,
units=T,
description="34 Bx-Field component of ref particle"
&end
&column
name=By_ref,
type=double,
units=T,
description="35 By-Field component of ref particle"
&end
&column
name=Bz_ref,
type=double,
units=T,
description="36 Bz-Field component of ref particle"
&end
&column
name=Ex_ref,
type=double,
units=MV/m,
description="37 Ex-Field component of ref particle"
&end
&column
name=Ey_ref,
type=double,
units=MV/m,
description="38 Ey-Field component of ref particle"
&end
&column
name=Ez_ref,
type=double,
units=MV/m,
description="39 Ez-Field component of ref particle"
&end
&column
name=dE,
type=double,
units=MeV,
description="40 energy spread of the beam"
&end
&column
name=dt,
type=double,
units=ns,
description="41 time step size"
&end
&column
name=partsOutside,
type=double,
units=1,
description="42 outside n*sigma of the beam"
&end
&column
name=DebyeLength,
type=double,
units=m,
description="43 Debye length in the boosted frame"
&end
&column
name=plasmaParameter,
type=double,
units=1,
description="44 Plasma parameter that gives no. of particles in a Debye sphere"
&end
&column
name=temperature,
type=double,
units=K,
description="45 Temperature of the beam"
&end
&column
name=rmsDensity,
type=double,
units=1,
description="46 RMS number density of the beam"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPALX 2024.1.00 git rev. #7a7c467c786b8b02d7cc45c1f08f459a1db9c2d1
opal-t
1.000000000000000e-02 2.994379716010773e-03 32768 -1.000000000000000e-09 1.000000000089569e+01 9.850909921698026e-04 9.941105040276307e-04 9.875942942314251e-04 1.001463450377793e-06 1.001969298718450e-06 1.000800270171979e-06 9.865063222009436e-10 9.960527419886473e-10 9.883794174412050e-10 1.804912109457495e-08 4.640621800226601e-08 3.327836743648462e-08 2.131559568228630e-13 -4.436009715470354e-13 2.994379716010773e-03 1.462516810683337e-09 -3.043657488174748e-09 2.054518963715540e+01 2.994966793650151e-03 2.988637296530245e-03 3.008953929290218e-03 -7.302116021070817e-03 -5.571982726974560e-03 -3.249727833522908e-03 -5.799444175482560e-12 -1.406789349202538e-15 9.092210331660492e-12 1.793897936938479e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 9.246525216143807e-05 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
/* Drinft-3.in
OPALX
10 timesteps with 1nC
*/
OPTION, PSDUMPFREQ = 1; // 6d data written every 10th time step (h5).
OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat).
OPTION, BOUNDPDESTROYFQ = 10; // Delete lost particles, if any out of 10 \sigma
OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
Title, string="Test simple Gaussian distribution with space charge";
Value,{OPALVERSION};
// ----------------------------------------------------------------------------
// Global Parameters
REAL N = 64;
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = N*N*N; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
// ----------------------------------------------------------------------------
// Initial Momentum Calculation
REAL Edes = 0.01; //initial energy in GeV
REAL gamma = (Edes+EMASS)/EMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value, {Edes, P0};
D1: DRIFT, L = 0.25, ELEMEDGE = 0.0;
myLine: Line = (D1);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1e6, CHARGE = -1;
FS1: Fieldsolver, NX=N, NY=N, NZ=N, TYPE=FFT, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 5, GREENSF = STANDARD;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1e-3, SIGMAY=1e-3, SIGMAZ=1e-3, SIGMAPX=1e-6, SIGMAPY=1e-6, SIGMAPZ=1e-6;
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 10, DT = {1e-11}, ZSTOP=0.25;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;
ENDTRACK;
QUIT;
SDDS1
&description
text="Statistics data 'Drift-3.in' 28/01/2025 19:33:53",
contents="stat parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name=s,
type=double,
units=m,
description="2 Path length"
&end
&column
name=numParticles,
type=long,
units=1,
description="3 Number of Macro Particles"
&end
&column
name=charge,
type=double,
units=1,
description="4 Bunch Charge"
&end
&column
name=energy,
type=double,
units=MeV,
description="5 Mean Bunch Energy"
&end
&column
name=rms_x,
type=double,
units=m,
description="6 RMS Beamsize in x"
&end
&column
name=rms_y,
type=double,
units=m,
description="7 RMS Beamsize in y"
&end
&column
name=rms_s,
type=double,
units=m,
description="8 RMS Beamsize in s"
&end
&column
name=rms_px,
type=double,
units=1,
description="9 RMS Normalized Momenta in x"
&end
&column
name=rms_py,
type=double,
units=1,
description="10 RMS Normalized Momenta in y"
&end
&column
name=rms_ps,
type=double,
units=1,
description="11 RMS Normalized Momenta in s"
&end
&column
name=emit_x,
type=double,
units=m,
description="12 Normalized Emittance x"
&end
&column
name=emit_y,
type=double,
units=m,
description="13 Normalized Emittance y"
&end
&column
name=emit_s,
type=double,
units=m,
description="14 Normalized Emittance s"
&end
&column
name=mean_x,
type=double,
units=m,
description="15 Mean Beam Position in x"
&end
&column
name=mean_y,
type=double,
units=m,
description="16 Mean Beam Position in y"
&end
&column
name=mean_s,
type=double,
units=m,
description="17 Mean Beam Position in s"
&end
&column
name=ref_x,
type=double,
units=m,
description="18 x coordinate of reference particle in lab cs"
&end
&column
name=ref_y,
type=double,
units=m,
description="19 y coordinate of reference particle in lab cs"
&end
&column
name=ref_z,
type=double,
units=m,
description="20 z coordinate of reference particle in lab cs"
&end
&column
name=ref_px,
type=double,
units=1,
description="21 x momentum of reference particle in lab cs"
&end
&column
name=ref_py,
type=double,
units=1,
description="22 y momentum of reference particle in lab cs"
&end
&column
name=ref_pz,
type=double,
units=1,
description="23 z momentum of reference particle in lab cs"
&end
&column
name=max_x,
type=double,
units=m,
description="24 Max Beamsize in x"
&end
&column
name=max_y,
type=double,
units=m,
description="25 Max Beamsize in y"
&end
&column
name=max_s,
type=double,
units=m,
description="26 Max Beamsize in s"
&end
&column
name=xpx,
type=double,
units=1,
description="27 Correlation xpx"
&end
&column
name=ypy,
type=double,
units=1,
description="28 Correlation ypy"
&end
&column
name=zpz,
type=double,
units=1,
description="29 Correlation zpz"
&end
&column
name=Dx,
type=double,
units=m,
description="30 Dispersion in x"
&end
&column
name=DDx,
type=double,
units=1,
description="31 Derivative of dispersion in x"
&end
&column
name=Dy,
type=double,
units=m,
description="32 Dispersion in y"
&end
&column
name=DDy,
type=double,
units=1,
description="33 Derivative of dispersion in y"
&end
&column
name=Bx_ref,
type=double,
units=T,
description="34 Bx-Field component of ref particle"
&end
&column
name=By_ref,
type=double,
units=T,
description="35 By-Field component of ref particle"
&end
&column
name=Bz_ref,
type=double,
units=T,
description="36 Bz-Field component of ref particle"
&end
&column
name=Ex_ref,
type=double,
units=MV/m,
description="37 Ex-Field component of ref particle"
&end
&column
name=Ey_ref,
type=double,
units=MV/m,
description="38 Ey-Field component of ref particle"
&end
&column
name=Ez_ref,
type=double,
units=MV/m,
description="39 Ez-Field component of ref particle"
&end
&column
name=dE,
type=double,
units=MeV,
description="40 energy spread of the beam"
&end
&column
name=dt,
type=double,
units=ns,
description="41 time step size"
&end
&column
name=partsOutside,
type=double,
units=1,
description="42 outside n*sigma of the beam"
&end
&column
name=DebyeLength,
type=double,
units=m,
description="43 Debye length in the boosted frame"
&end
&column
name=plasmaParameter,
type=double,
units=1,
description="44 Plasma parameter that gives no. of particles in a Debye sphere"
&end
&column
name=temperature,
type=double,
units=K,
description="45 Temperature of the beam"
&end
&column
name=rmsDensity,
type=double,
units=1,
description="46 RMS number density of the beam"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPALX 2024.1.00 git rev. #7a7c467c786b8b02d7cc45c1f08f459a1db9c2d1
opal-t
1.000000000000000e-02 2.994379716011227e-03 262144 -1.000000000000000e-09 1.000000000156929e+01 9.887207446667924e-04 9.864068637173986e-04 9.857418596282603e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.925715107640997e-10 9.859600641253328e-10 9.877945934336763e-10 -4.165208715996652e-09 8.604446409514306e-09 -4.827396237677286e-09 1.914399580446055e-13 7.205581316720818e-14 2.994379716011227e-03 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 3.000546903186672e-03 2.997590258549673e-03 3.000458492101615e-03 3.604967495723224e-03 2.271836986394149e-03 2.082856774054259e-03 -2.755001279771544e-13 -1.815602416354160e-15 -2.669340152788431e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
2.000000000000000e-02 5.988759432022455e-03 262144 -1.000000000000000e-09 1.000000000156929e+01 9.887326355687630e-04 9.864187823644488e-04 9.857537864713726e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.925834984119085e-10 9.859719885802936e-10 9.878065547329631e-10 7.257443437006781e-09 2.002709856253215e-08 6.605243976647087e-09 3.828798734356426e-13 1.441116592074011e-13 5.988759432022455e-03 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 3.000546903186672e-03 2.997590258549673e-03 3.000458502089790e-03 3.590845231977458e-03 2.266828498581439e-03 2.078176150707083e-03 -2.800991324387460e-13 -1.815602416354160e-15 -2.673939157249990e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
3.000000000000001e-02 8.983139148033680e-03 262144 -1.000000000000000e-09 1.000000000156929e+01 9.887791187106279e-04 9.864653743893244e-04 9.858004100813304e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.926302132756685e-10 9.860185708608964e-10 9.878532851819294e-10 1.868009559000887e-08 3.144975071553950e-08 1.803788419095810e-08 5.743197888266798e-13 2.161675052475939e-13 8.983139148033680e-03 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 5.520828789242037e-03 5.520828789242037e-03 5.520828789242037e-03 3.576598176957573e-03 2.261740630840121e-03 2.073422226540324e-03 -2.846981369003139e-13 -1.815602416354160e-15 -2.678538161711619e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
4.000000000000001e-02 1.197751886404490e-02 262144 -1.000000000000000e-09 1.000000000156929e+01 9.888601892141739e-04 9.865466348793815e-04 9.858817255355976e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.927116504528141e-10 9.860998060555025e-10 9.879347798452264e-10 3.010274774302145e-08 4.287240286855094e-08 2.947052440528972e-08 7.657597042177168e-13 2.882233512877868e-13 1.197751886404490e-02 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 8.515208515241438e-03 8.515208515241438e-03 8.515208515241438e-03 3.562227861003282e-03 2.256573942111664e-03 2.068596262392657e-03 -2.892971413618860e-13 -1.815602416354160e-15 -2.683137166173174e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
5.000000000000002e-02 1.497189858005613e-02 262144 -1.000000000000000e-09 1.000000000156929e+01 9.889758385735585e-04 9.866625552688885e-04 9.859977242510252e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.928278013989728e-10 9.862156856010098e-10 9.880510301220701e-10 4.152539989603985e-08 5.429505502155553e-08 4.090316461961943e-08 9.571996196087538e-13 3.602791973279797e-13 1.497189858005613e-02 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 1.150958824124084e-02 1.150958824124084e-02 1.150958824124084e-02 3.547735852655337e-03 2.251329016043313e-03 2.063698161859894e-03 -2.938961458234833e-13 -1.815602416354160e-15 -2.687736170634770e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
6.000000000000001e-02 1.796627829606736e-02 262144 -1.000000000000000e-09 1.000000000156929e+01 9.891260546598590e-04 9.868131233433781e-04 9.861483939884650e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.929786539325370e-10 9.863661972872022e-10 9.882020237454689e-10 5.294805204905430e-08 6.571770717456750e-08 5.233580483393658e-08 1.148639534999791e-12 4.323350433681726e-13 1.796627829606736e-02 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 1.450396796724024e-02 1.450396796724024e-02 1.450396796724024e-02 3.533123757801131e-03 2.246006460660487e-03 2.058729108129315e-03 -2.984951502850526e-13 -1.815602416354160e-15 -2.692335175096465e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
7.000000000000002e-02 2.096065801207858e-02 262144 -1.000000000000000e-09 1.000000000156929e+01 9.893108217273194e-04 9.869983232461642e-04 9.863337188591166e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.931641922409361e-10 9.865513252632650e-10 9.883877447935995e-10 6.437070420206995e-08 7.714035932757553e-08 6.376844504827453e-08 1.340079450390827e-12 5.043908894083655e-13 2.096065801207858e-02 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 1.749834769323964e-02 1.749834769323964e-02 1.749834769323964e-02 3.518393218789433e-03 2.240606908017743e-03 2.053689107416365e-03 -3.030941547466541e-13 -1.815602416354160e-15 -2.696934179557962e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
8.000000000000002e-02 2.395503772808980e-02 262144 -1.000000000000000e-09 1.000000000156929e+01 9.895301204216212e-04 9.872181354867264e-04 9.865536793330304e-04 1.003901218626953e-06 9.995496227685822e-07 1.002084598988240e-06 9.933843968889430e-10 9.867710500461650e-10 9.886081736930592e-10 7.579335635508340e-08 8.856301148059451e-08 7.520108526259816e-08 1.531519365781865e-12 5.764467354485584e-13 2.395503772808980e-02 1.313517235322994e-09 4.943932172465048e-10 2.054518963847423e+01 2.049272741923904e-02 2.049272741923904e-02 2.049272741923904e-02 3.503545913513784e-03 2.235131013828988e-03 2.048579576019114e-03 -3.076931592082104e-13 -1.815602416354160e-15 -2.701533184019591e-12 -2.393674273556776e-15 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 2.618668508724683e-04 1.000000000000000e-02 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
OPAL> Reading startup file '/psi/home/sadr_m/init.opal'
OPAL>
OPAL> value: {TESTVAL} = {1.23457}
OPAL>
OPAL> Finished reading startup file.
OPAL> ____ _____ ___
OPAL> / __ \| __ \ /\ | |
OPAL> | | | | |__) / \ | |
OPAL> | | | | ___/ /\ \ | |
OPAL> | |__| | | / ____ \| |____
OPAL> \____/|_| /_/ \_\______|
OPAL>
OPAL> This is OPAL (Object Oriented Parallel Accelerator Library) Version 2022.2.99
OPAL> git rev. 78879c6d7b30c3212683549fbbe882e6a6d33186
OPAL>
OPAL>
OPAL> (c) PSI, http://amas.web.psi.ch
OPAL>
OPAL>
OPAL> The optimiser (former opt-Pilot) is integrated
OPAL>
OPAL> Please send cookies, goodies or other motivations (wine and beer ... )
OPAL> to the OPAL developers opal@lists.psi.ch
OPAL>
OPAL> Time: 15:25:37 date: 29/08/2024
OPAL>
OPAL> * Reading input stream 'test-0004.in'
OPAL>
OPAL> value: {OPALVERSION} = {20222}
OPAL>
OPAL>
OPAL> value: {EDES,P0} = {1, 1.00051}
OPAL>
OPAL> * Use r to specify correlations
OPAL> * m before gsl_linalg_cholesky_decomp
OPAL> * r(0, : ) = 1 & 0.01 & 0.02 & 0 & 0 & 0 \\
OPAL> * r(1, : ) = 0.01 & 1 & 0 & 0 & 0 & 0 \\
OPAL> * r(2, : ) = 0.02 & 0 & 1 & 0 & 0 & 0 \\
OPAL> * r(3, : ) = 0 & 0 & 0 & 1 & 0 & 0 \\
OPAL> * r(4, : ) = 0 & 0 & 0 & 0 & 1 & 0 \\
OPAL> * r(5, : ) = 0 & 0 & 0 & 0 & 0 & 1 \\
OPAL>
OPAL> * ************* T R A C K R U N ***************************************************
OPAL> * Selected Tracking Method == PARALLEL-T, NEW TRACK
OPAL> * **********************************************************************************
OPAL> * Phase space dump frequency = 10
OPAL> * Statistics dump frequency = 1 w.r.t. the time step.
OPAL> * DT = 1e-12 [s]
OPAL> * MAXSTEPS = 1
OPAL> * Mass of simulation particle = 0.3189 [GeV/c^2]
OPAL> * Charge of simulation particle = -1e-16 [C]
OPAL> * **********************************************************************************
Ippl> * Creating new file for data: 'test-0004.stat'
Ippl> * Creating new file for data: 'test-0004.lbal'
OPAL>
OPAL> * ************* D I S T R I B U T I O N ********************************************
OPAL> *
OPAL> * Number of particles: 10000000
OPAL> *
OPAL> * Distribution input momentum units: [Beta Gamma]
OPAL> *
OPAL> * Distribution type: GAUSS
OPAL> *
OPAL> * SIGMAX = 1.0000e-01 [m]
OPAL> * SIGMAY = 1.0000e-02 [m]
OPAL> * SIGMAZ = 1.0000e-03 [m]
OPAL> * SIGMAPX = 1.0000e-02 [Beta Gamma]
OPAL> * SIGMAPY = 1.0000e-03 [Beta Gamma]
OPAL> * SIGMAPZ = 2.0000e-03 [Beta Gamma]
OPAL> * AVRGPZ = 1.9580e+03 [Beta Gamma]
OPAL> * CORRX = 1.0000e-02
OPAL> * CORRY = 0.0000e+00
OPAL> * CORRZ = 0.0000e+00
OPAL> * R61 = 0.0000e+00
OPAL> * R62 = 0.0000e+00
OPAL> * R51 = 0.0000e+00
OPAL> * R52 = 0.0000e+00
OPAL> * CUTOFFX = 3.0000e+00 [units of SIGMAX]
OPAL> * CUTOFFY = 3.0000e+00 [units of SIGMAY]
OPAL> * CUTOFFLONG = 3.0000e+00 [units of SIGMAZ]
OPAL> * CUTOFFPX = 3.0000e+00 [units of SIGMAPX]
OPAL> * CUTOFFPY = 3.0000e+00 [units of SIGMAPY]
OPAL> * CUTOFFPZ = 3.0000e+00 [units of SIGMAPY]
OPAL> *
OPAL> * Distribution is injected.
OPAL> *
OPAL> * **********************************************************************************
OPAL>
OPAL> * ************* B E A M ************************************************************
OPAL> * BEAM BEAM1
OPAL> * PARTICLE ELECTRON
OPAL> * REST MASS 5.1100e-04 [GeV]
OPAL> * CHARGE -e * 1.0000e+00
OPAL> * MOMENTUM 1.0005e+09 [eV/c]
OPAL> * MOMENTUM TOLERANCE 1.0000e-02
OPAL> * CURRENT 1.3000e+06 [A]
OPAL> * FREQUENCY 1.3000e+09 [MHz]
OPAL> * NPART 1.0000e+07
OPAL> * **********************************************************************************
OPAL>
OPAL> * ************* F I E L D S O L V E R **********************************************
OPAL> * FIELDSOLVER FS1
OPAL> * TYPE FFT
OPAL> * N-PROCESSORS 1
OPAL> * MX 8.0000e+00
OPAL> * MY 8.0000e+00
OPAL> * MT 8.0000e+00
OPAL> * BBOXINCR 1.0000e+00
OPAL> * GREENSF INTEGRATED
OPAL> * XDIM parallel
OPAL> * YDIM parallel
OPAL> * Z(T)DIM serial
OPAL>
OPAL> * **********************************************************************************
OPAL>
OPAL>
OPAL> * Size of map 1 sections
OPAL> * Key: (0.000000 - 1.000108) number of overlapping elements 1
OPAL> * D1
OPAL>
Ippl> * Creating new file for data: 'data/test-0004_ElementPositions.sdds'
OPAL>
OPAL> * ************** B U N C H *********************************************************
OPAL> * NP = 10000000
OPAL> * Qtot = 1.000 [nC] Qi = 0.100 [fC]
OPAL> * Ekin = 1000.000 [MeV] dEkin = 1.009 [keV]
OPAL> * rmax = ( 299.96844 , 29.99362 , 2.99972 ) [mm]
OPAL> * rmin = ( -299.96327 , -29.99320 , -3.00023 ) [mm]
OPAL> * rms beam size = ( 97.39483 , 9.74680 , 0.98677 ) [mm]
OPAL> * rms momenta = ( 9.74145e-03 , 9.74480e-04 , 1.97359e-03 ) [beta gamma]
OPAL> * mean position = ( -0.00000 , -0.00000 , 0.00000 ) [um]
OPAL> * mean momenta = ( -3.63276e-19 , -8.31841e-21 , 1.95795e+03 ) [beta gamma]
OPAL> * rms emittance = ( 4.84549e-07 , 4.85102e-09 , 9.94650e-10 ) (not normalized)
OPAL> * rms correlation = ( 9.56886e-03 , -2.41544e-04 , -2.98838e-04 )
OPAL> * hr = ( 87.41862 , 8.74094 , 0.87428 ) [mm]
OPAL> * dh = 1.00000e+00 [%]
OPAL> * t = 0.000 [fs] dT = 1.000 [ps]
OPAL> * spos = 0.000 [um]
OPAL> * cov(0, : ) = 9.4858e-03 & 9.0786e-06 & 1.6725e-05 & -1.0483e-08 & 2.6060e-08 & 1.2489e-07
OPAL> * cov(1, : ) = 9.0786e-06 & 9.4896e-05 & 7.4832e-08 & 3.2116e-09 & 1.0452e-09 & -1.5502e-09
OPAL> * cov(2, : ) = 1.6725e-05 & 7.4832e-08 & 9.5000e-05 & -2.2942e-09 & -4.1334e-09 & 1.2865e-09
OPAL> * cov(3, : ) = -1.0483e-08 & 3.2116e-09 & -2.2942e-09 & 9.4961e-07 & 1.9588e-10 & 3.1569e-10
OPAL> * cov(4, : ) = 2.6060e-08 & 1.0452e-09 & -4.1334e-09 & 1.9588e-10 & 9.7371e-07 & -5.8198e-10
OPAL> * cov(5, : ) = 1.2489e-07 & -1.5502e-09 & 1.2865e-09 & 3.1569e-10 & -5.8198e-10 & 5.1255e-06
OPAL> * **********************************************************************************
OPAL>
OPAL> * Track start at: 15:25:47, t= 0.000 [fs]; zstart at: 0.000 [um]
OPAL> * Executing ParallelTTracker
OPAL> * Initial dt = 1.000 [ps]
OPAL> * Max integration steps = 1, next step = 0
OPAL>
OPAL >
OPAL > * ************** B U N C H *********************************************************
OPAL > * NP = 10000000
OPAL > * Qtot = 1.000 [nC] Qi = 0.100 [fC]
OPAL > * Ekin = 1000.000 [MeV] dEkin = 1.009 [keV]
OPAL > * rmax = ( 299.96844 , 29.99362 , 2.99972 ) [mm]
OPAL > * rmin = ( -299.96327 , -29.99320 , -3.00023 ) [mm]
OPAL > * rms beam size = ( 97.39483 , 9.74680 , 0.98677 ) [mm]
OPAL > * rms momenta = ( 9.74145e-03 , 9.74480e-04 , 1.97359e-03 ) [beta gamma]
OPAL > * mean position = ( -0.00000 , -0.00000 , -0.00000 ) [um]
OPAL > * mean momenta = ( -2.11293e-18 , 4.15847e-17 , 1.95795e+03 ) [beta gamma]
OPAL > * rms emittance = ( 4.84549e-07 , 4.85102e-09 , 9.94650e-10 ) (not normalized)
OPAL > * rms correlation = ( 9.56888e-03 , -2.41532e-04 , -2.98405e-04 )
OPAL > * hr = ( 87.41862 , 8.74094 , 0.87428 ) [mm]
OPAL > * dh = 1.00000e+00 [%]
OPAL > * t = 1.000 [ps] dT = 1.000 [ps]
OPAL > * spos = 299.792 [um]
OPAL > * cov(0, : ) = 9.4858e-03 & 9.0786e-06 & 1.6725e-05 & -1.0483e-08 & 2.6060e-08 & 1.2489e-07
OPAL > * cov(1, : ) = 9.0786e-06 & 9.4896e-05 & 7.4832e-08 & 3.2116e-09 & 1.0452e-09 & -1.5502e-09
OPAL > * cov(2, : ) = 1.6725e-05 & 7.4832e-08 & 9.5000e-05 & -2.2941e-09 & -4.1334e-09 & 1.2865e-09
OPAL > * cov(3, : ) = -1.0483e-08 & 3.2116e-09 & -2.2941e-09 & 9.4961e-07 & 1.9588e-10 & 3.1569e-10
OPAL > * cov(4, : ) = 2.6060e-08 & 1.0452e-09 & -4.1334e-09 & 1.9588e-10 & 9.7371e-07 & -5.8114e-10
OPAL > * cov(5, : ) = 1.2489e-07 & -1.5502e-09 & 1.2865e-09 & 3.1569e-10 & -5.8114e-10 & 5.2215e-06
OPAL > * **********************************************************************************
OPAL >
OPAL>
OPAL> * Done executing ParallelTTracker at 15:25:58
OPAL>
OPAL> * End of input stream 'test-0004.in'
Timings> -----------------------------------------------------------------
Timings> Timing results for 1 nodes:
Timings> -----------------------------------------------------------------
Timings> mainTimer........... Wall tot = 20.5162, CPU tot = 20.43
Timings>
Timings> Binaryrepart........ Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Boundingbox......... Wall max = 0.287541, CPU max = 0.29
Timings> Wall avg = 0.287541, CPU avg = 0.29
Timings> Wall min = 0.287541, CPU min = 0.29
Timings>
Timings> Boundingbox-bounds.. Wall max = 0.0861922, CPU max = 0.09
Timings> Wall avg = 0.0861922, CPU avg = 0.09
Timings> Wall min = 0.0861922, CPU min = 0.09
Timings>
Timings> Boundingbox-update.. Wall max = 0.201227, CPU max = 0.2
Timings> Wall avg = 0.201227, CPU avg = 0.2
Timings> Wall min = 0.201227, CPU min = 0.2
Timings>
Timings> Compute Statistics.. Wall max = 3.7657, CPU max = 3.75
Timings> Wall avg = 3.7657, CPU avg = 3.75
Timings> Wall min = 3.7657, CPU min = 3.75
Timings>
Timings> ComputePotential.... Wall max = 0.00065271, CPU max = 0
Timings> Wall avg = 0.00065271, CPU avg = 0
Timings> Wall min = 0.00065271, CPU min = 0
Timings>
Timings> Create Distr........ Wall max = 8.75119, CPU max = 8.74
Timings> Wall avg = 8.75119, CPU avg = 8.74
Timings> Wall min = 8.75119, CPU min = 8.74
Timings>
Timings> External field eval. Wall max = 2.03363, CPU max = 2.03
Timings> Wall avg = 2.03363, CPU avg = 2.03
Timings> Wall min = 2.03363, CPU min = 2.03
Timings>
Timings> Fast inside test.... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Histogram........... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Initialize geometry. Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Inside test......... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Load Distr.......... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Particle Inside..... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Ray tracing......... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> SelfField total..... Wall max = 1.81278, CPU max = 1.81
Timings> Wall avg = 1.81278, CPU avg = 1.81
Timings> Wall min = 1.81278, CPU min = 1.81
Timings>
Timings> SF: GreensFTotal.... Wall max = 0.000372736, CPU max = 0
Timings> Wall avg = 0.000372736, CPU avg = 0
Timings> Wall min = 0.000372736, CPU min = 0
Timings>
Timings> TIntegration1....... Wall max = 0.168628, CPU max = 0.17
Timings> Wall avg = 0.168628, CPU avg = 0.17
Timings> Wall min = 0.168628, CPU min = 0.17
Timings>
Timings> TIntegration2....... Wall max = 0.529548, CPU max = 0.52
Timings> Wall avg = 0.529548, CPU avg = 0.52
Timings> Wall min = 0.529548, CPU min = 0.52
Timings>
Timings> WakeField........... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Write H5-File....... Wall max = 1.30996, CPU max = 1.28
Timings> Wall avg = 1.30996, CPU avg = 1.28
Timings> Wall min = 1.30996, CPU min = 1.28
Timings>
Timings> Write Stat.......... Wall max = 0.0183946, CPU max = 0.01
Timings> Wall avg = 0.0183946, CPU avg = 0.01
Timings> Wall min = 0.0183946, CPU min = 0.01
Timings>
Timings> -----------------------------------------------------------------
......@@ -17,7 +17,7 @@ Value,{OPALVERSION};
// Global Parameters
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = 1E6; // Number of particles in simulation.
REAL n_particles = 1E5; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
// ----------------------------------------------------------------------------
......@@ -32,6 +32,7 @@ REAL P0 = gamma*beta*EMASS; //inital z momentum
value, {Edes, P0};
D1: DRIFT, L = 1.0, ELEMEDGE = 0.0;
myLine: Line = (D1);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1E6, CHARGE = -1;
......@@ -41,9 +42,9 @@ FS1: Fieldsolver, NX=32, NY=32, NZ=32, TYPE=FFT, PARFFTX = true, PARFFTY = true,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 1, GREENSF = INTEGRATED;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1, SIGMAY=1, SIGMAZ=1, SIGMAPX=1, SIGMAPY=1, SIGMAPZ=1;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1e-3, SIGMAY=1e-3, SIGMAZ=1e-3, SIGMAPX=1e-6, SIGMAPY=1e-6, SIGMAPZ=1e-6;
myLine: Line = (D1);
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 1, DT = {1e-12}, ZSTOP=1.0;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;
......
SDDS1
&description
text="Statistics data '../input-files/test-0002.in' 20/06/2024 23:23:03",
contents="stat parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name=s,
type=double,
units=m,
description="2 Path length"
&end
&column
name=numParticles,
type=long,
units=1,
description="3 Number of Macro Particles"
&end
&column
name=charge,
type=double,
units=1,
description="4 Bunch Charge"
&end
&column
name=energy,
type=double,
units=MeV,
description="5 Mean Bunch Energy"
&end
&column
name=rms_x,
type=double,
units=m,
description="6 RMS Beamsize in x"
&end
&column
name=rms_y,
type=double,
units=m,
description="7 RMS Beamsize in y"
&end
&column
name=rms_s,
type=double,
units=m,
description="8 RMS Beamsize in s"
&end
&column
name=rms_px,
type=double,
units=1,
description="9 RMS Normalized Momenta in x"
&end
&column
name=rms_py,
type=double,
units=1,
description="10 RMS Normalized Momenta in y"
&end
&column
name=rms_ps,
type=double,
units=1,
description="11 RMS Normalized Momenta in s"
&end
&column
name=emit_x,
type=double,
units=m,
description="12 Normalized Emittance x"
&end
&column
name=emit_y,
type=double,
units=m,
description="13 Normalized Emittance y"
&end
&column
name=emit_s,
type=double,
units=m,
description="14 Normalized Emittance s"
&end
&column
name=mean_x,
type=double,
units=m,
description="15 Mean Beam Position in x"
&end
&column
name=mean_y,
type=double,
units=m,
description="16 Mean Beam Position in y"
&end
&column
name=mean_s,
type=double,
units=m,
description="17 Mean Beam Position in s"
&end
&column
name=ref_x,
type=double,
units=m,
description="18 x coordinate of reference particle in lab cs"
&end
&column
name=ref_y,
type=double,
units=m,
description="19 y coordinate of reference particle in lab cs"
&end
&column
name=ref_z,
type=double,
units=m,
description="20 z coordinate of reference particle in lab cs"
&end
&column
name=ref_px,
type=double,
units=1,
description="21 x momentum of reference particle in lab cs"
&end
&column
name=ref_py,
type=double,
units=1,
description="22 y momentum of reference particle in lab cs"
&end
&column
name=ref_pz,
type=double,
units=1,
description="23 z momentum of reference particle in lab cs"
&end
&column
name=max_x,
type=double,
units=m,
description="24 Max Beamsize in x"
&end
&column
name=max_y,
type=double,
units=m,
description="25 Max Beamsize in y"
&end
&column
name=max_s,
type=double,
units=m,
description="26 Max Beamsize in s"
&end
&column
name=xpx,
type=double,
units=1,
description="27 Correlation xpx"
&end
&column
name=ypy,
type=double,
units=1,
description="28 Correlation ypy"
&end
&column
name=zpz,
type=double,
units=1,
description="29 Correlation zpz"
&end
&column
name=Dx,
type=double,
units=m,
description="30 Dispersion in x"
&end
&column
name=DDx,
type=double,
units=1,
description="31 Derivative of dispersion in x"
&end
&column
name=Dy,
type=double,
units=m,
description="32 Dispersion in y"
&end
&column
name=DDy,
type=double,
units=1,
description="33 Derivative of dispersion in y"
&end
&column
name=Bx_ref,
type=double,
units=T,
description="34 Bx-Field component of ref particle"
&end
&column
name=By_ref,
type=double,
units=T,
description="35 By-Field component of ref particle"
&end
&column
name=Bz_ref,
type=double,
units=T,
description="36 Bz-Field component of ref particle"
&end
&column
name=Ex_ref,
type=double,
units=MV/m,
description="37 Ex-Field component of ref particle"
&end
&column
name=Ey_ref,
type=double,
units=MV/m,
description="38 Ey-Field component of ref particle"
&end
&column
name=Ez_ref,
type=double,
units=MV/m,
description="39 Ez-Field component of ref particle"
&end
&column
name=dE,
type=double,
units=MeV,
description="40 energy spread of the beam"
&end
&column
name=dt,
type=double,
units=ns,
description="41 time step size"
&end
&column
name=partsOutside,
type=double,
units=1,
description="42 outside n*sigma of the beam"
&end
&column
name=DebyeLength,
type=double,
units=m,
description="43 Debye length in the boosted frame"
&end
&column
name=plasmaParameter,
type=double,
units=1,
description="44 Plasma parameter that gives no. of particles in a Debye sphere"
&end
&column
name=temperature,
type=double,
units=K,
description="45 Temperature of the beam"
&end
&column
name=rmsDensity,
type=double,
units=1,
description="46 RMS number density of the beam"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPALX 2024.1.00 git rev. #640dbb1f34e2dc23314bad26c94148a0e578fe17
opal-t
1.000000000000000e-03 2.997924188990765e-04 100000 -1.000000000000000e-09 9.999999999999980e+02 9.886771617229491e-04 9.900456978581636e-04 9.861933284523727e-04 9.970719439431197e-07 9.971772595976683e-07 1.003251673042217e-06 9.857814897437524e-10 9.872476063403890e-10 9.893927462964761e-10 1.695475357332832e-20 1.706100538623190e-20 4.746420270707041e-20 1.695475356915250e-20 1.706100538100345e-20 2.997924188990765e-04 -2.727234331922033e-23 -3.414707447737305e-23 1.957950928190183e+03 3.000478311466378e-03 2.999914659247034e-03 2.996972298154323e-03 -1.249744196182289e-03 2.643507480662082e-03 3.857264382145191e-03 -7.000706356679798e-13 4.605817787904672e-15 3.761377802323194e-12 -1.333863982837420e-16 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 1.621166691380730e-04 1.000000000000000e-03 0 3.883428884728593e-10 7.942613332657146e-15 1.025293560371121e-09 3.237641375683589e+13
/*
Test simple Gaussian distribution in a drift with space charge
/* test-0003.in
OPAL-X
Test simple Gaussian distribution with space charge
*/
OPTION, PSDUMPFREQ = 10; // 6d data written every 10th time step (h5).
......@@ -9,7 +10,7 @@ OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
Title, string="Test simple Gaussian distribution ";
Title, string="Test simple Gaussian distribution with space charge";
Value,{OPALVERSION};
......@@ -32,6 +33,7 @@ REAL P0 = gamma*beta*EMASS; //inital z momentum
value, {Edes, P0};
D1: DRIFT, L = 1.0, ELEMEDGE = 0.0;
myLine: Line = (D1);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1E6, CHARGE = -1;
......@@ -39,13 +41,12 @@ BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
FS1: Fieldsolver, NX=32, NY=32, NZ=32, TYPE=FFT, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 1, GREENSF = INTEGRATED;
BBOXINCR = 1, GREENSF = STANDARD;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1, SIGMAY=1, SIGMAZ=1, SIGMAPX=1, SIGMAPY=1, SIGMAPZ=1;
Dist1: DISTRIBUTION, TYPE= GAUSS, SIGMAX=1e-3, SIGMAY=1e-3, SIGMAZ=1e-3, SIGMAPX=1e-6, SIGMAPY=1e-6, SIGMAPZ=1e-6;
myLine: Line = (D1);
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 10, DT = {1e-12}, ZSTOP=1.0;
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 1, DT = {1e-12}, ZSTOP=1.0;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;
ENDTRACK;
QUIT;
SDDS1
&description
text="Statistics data '../input-files/test-0003.in' 30/06/2024 17:01:16",
contents="stat parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name=s,
type=double,
units=m,
description="2 Path length"
&end
&column
name=numParticles,
type=long,
units=1,
description="3 Number of Macro Particles"
&end
&column
name=charge,
type=double,
units=1,
description="4 Bunch Charge"
&end
&column
name=energy,
type=double,
units=MeV,
description="5 Mean Bunch Energy"
&end
&column
name=rms_x,
type=double,
units=m,
description="6 RMS Beamsize in x"
&end
&column
name=rms_y,
type=double,
units=m,
description="7 RMS Beamsize in y"
&end
&column
name=rms_s,
type=double,
units=m,
description="8 RMS Beamsize in s"
&end
&column
name=rms_px,
type=double,
units=1,
description="9 RMS Normalized Momenta in x"
&end
&column
name=rms_py,
type=double,
units=1,
description="10 RMS Normalized Momenta in y"
&end
&column
name=rms_ps,
type=double,
units=1,
description="11 RMS Normalized Momenta in s"
&end
&column
name=emit_x,
type=double,
units=m,
description="12 Normalized Emittance x"
&end
&column
name=emit_y,
type=double,
units=m,
description="13 Normalized Emittance y"
&end
&column
name=emit_s,
type=double,
units=m,
description="14 Normalized Emittance s"
&end
&column
name=mean_x,
type=double,
units=m,
description="15 Mean Beam Position in x"
&end
&column
name=mean_y,
type=double,
units=m,
description="16 Mean Beam Position in y"
&end
&column
name=mean_s,
type=double,
units=m,
description="17 Mean Beam Position in s"
&end
&column
name=ref_x,
type=double,
units=m,
description="18 x coordinate of reference particle in lab cs"
&end
&column
name=ref_y,
type=double,
units=m,
description="19 y coordinate of reference particle in lab cs"
&end
&column
name=ref_z,
type=double,
units=m,
description="20 z coordinate of reference particle in lab cs"
&end
&column
name=ref_px,
type=double,
units=1,
description="21 x momentum of reference particle in lab cs"
&end
&column
name=ref_py,
type=double,
units=1,
description="22 y momentum of reference particle in lab cs"
&end
&column
name=ref_pz,
type=double,
units=1,
description="23 z momentum of reference particle in lab cs"
&end
&column
name=max_x,
type=double,
units=m,
description="24 Max Beamsize in x"
&end
&column
name=max_y,
type=double,
units=m,
description="25 Max Beamsize in y"
&end
&column
name=max_s,
type=double,
units=m,
description="26 Max Beamsize in s"
&end
&column
name=xpx,
type=double,
units=1,
description="27 Correlation xpx"
&end
&column
name=ypy,
type=double,
units=1,
description="28 Correlation ypy"
&end
&column
name=zpz,
type=double,
units=1,
description="29 Correlation zpz"
&end
&column
name=Dx,
type=double,
units=m,
description="30 Dispersion in x"
&end
&column
name=DDx,
type=double,
units=1,
description="31 Derivative of dispersion in x"
&end
&column
name=Dy,
type=double,
units=m,
description="32 Dispersion in y"
&end
&column
name=DDy,
type=double,
units=1,
description="33 Derivative of dispersion in y"
&end
&column
name=Bx_ref,
type=double,
units=T,
description="34 Bx-Field component of ref particle"
&end
&column
name=By_ref,
type=double,
units=T,
description="35 By-Field component of ref particle"
&end
&column
name=Bz_ref,
type=double,
units=T,
description="36 Bz-Field component of ref particle"
&end
&column
name=Ex_ref,
type=double,
units=MV/m,
description="37 Ex-Field component of ref particle"
&end
&column
name=Ey_ref,
type=double,
units=MV/m,
description="38 Ey-Field component of ref particle"
&end
&column
name=Ez_ref,
type=double,
units=MV/m,
description="39 Ez-Field component of ref particle"
&end
&column
name=dE,
type=double,
units=MeV,
description="40 energy spread of the beam"
&end
&column
name=dt,
type=double,
units=ns,
description="41 time step size"
&end
&column
name=partsOutside,
type=double,
units=1,
description="42 outside n*sigma of the beam"
&end
&column
name=DebyeLength,
type=double,
units=m,
description="43 Debye length in the boosted frame"
&end
&column
name=plasmaParameter,
type=double,
units=1,
description="44 Plasma parameter that gives no. of particles in a Debye sphere"
&end
&column
name=temperature,
type=double,
units=K,
description="45 Temperature of the beam"
&end
&column
name=rmsDensity,
type=double,
units=1,
description="46 RMS number density of the beam"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPALX 2024.1.00 git rev. #a4918deed622a93a2afe0676025570791259d7d2
opal-t
1.000000000000000e-03 2.997924188990765e-04 100000 -1.000000000000000e-09 9.999999999999980e+02 9.886782452391697e-04 9.900157921851145e-04 9.861920689188306e-04 9.970719439431197e-07 9.971772595976683e-07 1.003251673042217e-06 9.857825756062974e-10 9.872176935752761e-10 9.893914288009165e-10 -1.323054324413289e-08 2.500259435619177e-08 -1.480289634341467e-08 1.695475356915250e-20 1.706100538100345e-20 2.997924188990765e-04 -2.727234331922033e-23 -3.414707447737305e-23 1.957950928190183e+03 3.000478311466378e-03 2.999914659247034e-03 2.996972298154323e-03 -1.245255727536568e-03 2.678381462443617e-03 3.871355561738481e-03 -6.900100533252611e-13 4.605817787904672e-15 3.743024395361834e-12 -1.333863982837420e-16 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 1.621166691380730e-04 1.000000000000000e-03 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
/*
AWA Gun, configured in this input file for fast execution
(low particle number & low fieldsolver resolution, large
timestep and only one energy bin).
*/
OPTION, PSDUMPFREQ = 10; // 6d data written every 10th time step (h5).
OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat).
OPTION, BOUNDPDESTROYFQ = 10; // Delete lost particles, if any out of 10 \sigma
OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
Title, string="AWA Photoinjector";
Value,{OPALVERSION};
// ----------------------------------------------------------------------------
// Global Parameters
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = 1E7; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
//----------------------------------------------------------------------------
//Initial Momentum Calculation
REAL Edes = 1; //initial energy in GeV
REAL gamma = (Edes+EMASS)/EMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value, {Edes, P0};
D1: DRIFT, L = 1.0, ELEMEDGE = 0.0;
D2: DRIFT, L = 1.0, ELEMEDGE = 1.0;
D3: DRIFT, L = 1.0, ELEMEDGE = 2.0;
D4: DRIFT, L = 1.0, ELEMEDGE = 13.0;
L1: Line = (D1,D2);
L2: Line = (D3,D4);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1E6, CHARGE = -1;
FS1: Fieldsolver, NX=8, NY=8, NZ=8, TYPE=FFT, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 1, GREENSF = INTEGRATED;
Dist1: DISTRIBUTION, TYPE= MULTIVARIATEGAUSS, SIGMAX=1e-1, SIGMAY=1e-2, SIGMAZ=1e-3, SIGMAPX=1e-2, SIGMAPY=1e-3, SIGMAPZ=2e-3, CORR = {1e-2,2e-2,0,0,0,0,0,0,0,0,0,0,0,0,0};
myLine: Line = (D1,D2,D3,D4);
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 1, DT = {1e-12}, ZSTOP=1.0;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;
ENDTRACK;
QUIT;
/*
AWA Gun, configured in this input file for fast execution
(low particle number & low fieldsolver resolution, large
timestep and only one energy bin).
*/
OPTION, PSDUMPFREQ = 10; // 6d data written every 10th time step (h5).
OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat).
OPTION, BOUNDPDESTROYFQ = 10; // Delete lost particles, if any out of 10 \sigma
OPTION, AUTOPHASE = 4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10900;
OPTION, SEED = -1;
Title, string="AWA Photoinjector";
Value,{OPALVERSION};
// ----------------------------------------------------------------------------
// Global Parameters
REAL rf_freq = 1.3e9; // RF frequency. (Hz)
REAL n_particles = 2E4; // Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; // Charge of bunch. (C)
//----------------------------------------------------------------------------
//Initial Momentum Calculation
REAL Edes = 1; //initial energy in GeV
REAL gamma = (Edes+EMASS)/EMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value, {Edes, P0};
D1: DRIFT, L = 1.0, ELEMEDGE = 0.0;
D2: DRIFT, L = 1.0, ELEMEDGE = 1.0;
D3: DRIFT, L = 1.0, ELEMEDGE = 2.0;
D4: DRIFT, L = 1.0, ELEMEDGE = 13.0;
L1: Line = (D1,D2);
L2: Line = (D3,D4);
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1E6, CHARGE = -1;
FS1: Fieldsolver, NX=8, NY=8, NZ=8, TYPE=FFT, PARFFTX = true, PARFFTY = true, PARFFTZ = false,
BCFFTX=OPEN, BCFFTY=OPEN, BCFFTZ=OPEN,
BBOXINCR = 1, GREENSF = INTEGRATED;
Dist1: DISTRIBUTION, TYPE= FLATTOP,
SIGMAX = 0.00075,
SIGMAY = 0.00075,
TRISE = 6.0e-12,
TFALL = 6.0e-12,
TPULSEFWHM = 20.0e-12,
CUTOFFLONG = 4.0,
EMITTED = True;
myLine: Line = (D1,D2,D3,D4);
TRACK, LINE = myLine, BEAM = BEAM1, MAXSTEPS = 1, DT = {1e-12}, ZSTOP=1.0;
RUN, METHOD = "PARALLEL", BEAM = BEAM1, FIELDSOLVER = FS1, DISTRIBUTION = Dist1;
ENDTRACK;
QUIT;