OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
MultipoleTCurvedConstRadius.cpp
Go to the documentation of this file.
1//
2// Cubic Spline Interpolation to replace GSL spline
3//
4// Copyright (c) 2023, Paul Scherrer Institute, Villigen PSI, Switzerland
5// All rights reserved
6//
7// This file is part of OPAL.
8//
9// OPAL is free software: you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation, either version 3 of the License, or
12// (at your option) any later version.
13//
14// You should have received a copy of the GNU General License
15// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
16//
17
19#include "MultipoleT.h"
20
22 : MultipoleTBase(element), planarArcGeometry_m(1.0, 1.0) {}
23
29
31 const Kokkos::View<Vector_t<double, 3>*> R, Kokkos::View<Vector_t<double, 3>*> /*E*/,
32 const Kokkos::View<Vector_t<double, 3>*> B, const double scaling, const size_t count) {
33 // Local variables that are copied into the kernel
34 const auto config = element_m->getConfig();
35 const auto tanhCoefficients = tanhCoefficientsGpu_m;
36 // Kernel launch over all particles
37 Kokkos::parallel_for(
38 "MultipoleTCurvedConstRadius::getField()", count, KOKKOS_LAMBDA(const size_t i) {
39 computeBField(R(i), B(i), scaling, config, tanhCoefficients);
40 });
41}
42
45 const double scaling) {
47}
ippl::Vector< T, Dim > Vector_t
MultipoleT * element_m
Kokkos::View< double ** > tanhCoefficientsGpu_m
Kokkos::View< double ** >::host_mirror_type tanhCoefficientsHost_m
void generateTanhCoefficients(unsigned int numDerivatives)
void getField(Kokkos::View< Vector_t< double, 3 > * > R, Kokkos::View< Vector_t< double, 3 > * > E, Kokkos::View< Vector_t< double, 3 > * > B, double scaling, size_t count) override
static KOKKOS_INLINE_FUNCTION bool computeBField(const Vector_t< double, 3 > &R, Vector_t< double, 3 > &B, double scaling, const MultipoleTConfig &config, const ViewType &tanhCoefficients)
size_t getMaxFOrder() const
Definition MultipoleT.h:132
MultipoleTConfig & getConfig()
Definition MultipoleT.h:229
double getLength() const
Definition MultipoleT.h:187
double getBendAngle() const
Definition MultipoleT.h:178
void setCurvature(double)
Set curvature.
virtual void setElementLength(double)
Set length.