OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
ParticleAmrLayout.h
Go to the documentation of this file.
1//
2// Class ParticleAmrLayout
3// Particle layout for AMR particles.
4//
5// Copyright (c) 2016 - 2020, Matthias Frey, Uldis Locans, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved
7//
8// Implemented as part of the PhD thesis
9// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10//
11// This file is part of OPAL.
12//
13// OPAL is free software: you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation, either version 3 of the License, or
16// (at your option) any later version.
17//
18// You should have received a copy of the GNU General Public License
19// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20//
21#ifndef PARTICLE_AMR_LAYOUT_H
22#define PARTICLE_AMR_LAYOUT_H
23
25
26template<class T, unsigned Dim>
27class ParticleAmrLayout : public ParticleLayout<T, Dim> {
28
29public:
30 // pair iterator definition ... this layout does not allow for pairlists
31 typedef int pair_t;
36
37 // type of attributes this layout should use for position and ID
40
41public:
42
44
48 void setFinestLevel(int finestLevel);
49
53 void setMaxLevel(int maxLevel);
54
60 virtual void setBoundingBox(double dh) = 0;
61
62protected:
65};
66
67
68// ============================================================================
69
70
71template <class T, unsigned Dim>
73 : finestLevel_m(0),
74 maxLevel_m(0)
75{ }
76
77
78template <class T, unsigned Dim>
80 finestLevel_m = finestLevel;
81}
82
83
84template <class T, unsigned Dim>
86 maxLevel_m = maxLevel;
87}
88
89#endif
ParticleLayout< T, Dim >::SingleParticlePos_t SingleParticlePos_t
virtual void setBoundingBox(double dh)=0
ParticleAttrib< SingleParticlePos_t > ParticlePos_t
int finestLevel_m
Current finest level of simluation.
int maxLevel_m
Maximum level allowed.
void setMaxLevel(int maxLevel)
ParticleLayout< T, Dim >::Index_t Index_t
void setFinestLevel(int finestLevel)
ParticleAttrib< Index_t > ParticleIndex_t
unsigned Index_t