OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
RectangularDomain.cpp
Go to the documentation of this file.
1 //
2 // Class RectangularDomain
3 // This class provides a rectangular beam pipe. The mesh adapts to the bunch
4 // in longitudinal direction.
5 //
6 // Copyright (c) 2008, Yves Ineichen, ETH Zürich,
7 // 2013 - 2015, Tülin Kaman, Paul Scherrer Institut, Villigen PSI, Switzerland
8 // 2017 - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
9 // All rights reserved
10 //
11 // Implemented as part of the master thesis
12 // "A Parallel Multigrid Solver for Beam Dynamics"
13 // and the paper
14 // "A fast parallel Poisson solver on irregular domains applied to beam dynamics simulations"
15 // (https://doi.org/10.1016/j.jcp.2010.02.022)
16 //
17 // This file is part of OPAL.
18 //
19 // OPAL is free software: you can redistribute it and/or modify
20 // it under the terms of the GNU General Public License as published by
21 // the Free Software Foundation, either version 3 of the License, or
22 // (at your option) any later version.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
26 //
27 #ifdef HAVE_SAAMG_SOLVER
28 
31 
32 RectangularDomain::RectangularDomain(double a, double b, IntVector_t nr, Vector_t hr)
33  : RegularDomain(nr, hr, "CONSTANT")
34 {
35  setRangeMin(Vector_t(-a, -b, getMinZ()));
36  setRangeMax(Vector_t( a, b, getMaxZ()));
37 }
38 
39 void RectangularDomain::compute(Vector_t hr, NDIndex<3> /*localId*/){
40  setHr(hr);
41 }
42 
43 #endif //#ifdef HAVE_SAAMG_SOLVER
const int nr
Definition: ClassicRandom.h:24
std::complex< double > a
void setHr(Vector_t hr)
RectangularDomain(double a, double b, IntVector_t nr, Vector_t hr)
void compute(Vector_t hr, NDIndex< 3 >)
calculates intersection with the beam pipe
Vektor< double, 3 > Vector_t
Definition: Vektor.h:6