Project
Loading...
Searching...
No Matches
PoissonSolverHelpers.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
18#ifndef ALICEO2_TPC_POISSONSOLVERHELPERS_H_
19#define ALICEO2_TPC_POISSONSOLVERHELPERS_H_
20
22
23namespace o2
24{
25namespace tpc
26{
27
29enum class CycleType {
30 VCycle = 0,
31 WCycle = 1,
32 FCycle = 2
33};
34
36enum class GridTransferType {
37 Half = 0,
38 Full = 1,
39};
40
42enum class RelaxType {
43 Jacobi = 0,
44 WeightedJacobi = 1,
45 GaussSeidel = 2
46};
47
48struct MGParameters {
49 inline static bool isFull3D = true;
53 inline static int nPre = 2;
54 inline static int nPost = 2;
55 inline static int nMGCycle = 200;
56 inline static int maxLoop = 7;
57 inline static int gamma = 1;
58 inline static bool normalizeGridToOneSector = false;
59};
60
61template <typename DataT = double>
63 static constexpr DataT TPCZ0{249.525};
64 static constexpr DataT IFCRADIUS{83.5};
65 static constexpr DataT OFCRADIUS{254.5};
66 static constexpr DataT ZOFFSET{0.2};
67 static constexpr DataT DVDE{0.0024};
68 static constexpr DataT EM{-1.602176487e-19 / 9.10938215e-31};
69 static constexpr DataT E0{8.854187817e-12};
70 inline static DataT cathodev{-103070.0};
71 inline static DataT vg1t{-3260};
72};
73
74template <typename DataT = double>
76 static constexpr DataT WIDTHFRAME{1};
77 static constexpr DataT LENGTHFRAMEIROCBOTTOM{29.195};
78 static constexpr DataT LENGTHFRAMEOROC3TOP{87.048};
79 static constexpr DataT POSBOTTOM[]{83.65, 133.5, 169.75, 207.85};
80 static constexpr DataT POSTOP[]{133.3, 169.75, 207.85, 247.7};
81};
82
83template <typename DataT = double>
86 static constexpr DataT ZMIN{0};
87 static constexpr DataT PHIMIN{0};
90 static constexpr DataT PHIMAX{static_cast<DataT>(o2::constants::math::TwoPI)};
91
92 static constexpr DataT getRMin() { return RMIN; }
93 static constexpr DataT getZMin() { return ZMIN; }
94 static constexpr DataT getPhiMin() { return PHIMIN; }
95
97 static constexpr DataT getGridSpacingR(const unsigned int nR) { return (RMAX - RMIN) / (nR - 1); }
98
100 static constexpr DataT getGridSpacingZ(const unsigned int nZ) { return (ZMAX - ZMIN) / (nZ - 1); }
101
103 static constexpr DataT getGridSpacingPhi(const unsigned int nPhi) { return PHIMAX / nPhi; }
104};
105
106} // namespace tpc
107} // namespace o2
108
109#endif
useful math constants
constexpr float TwoPI
@ Full
Full weighting.
@ Half
Half weighting.
CycleType
< Enumeration of Cycles Type
@ FCycle
Full Cycle.
@ WCycle
W Cycle (TODO)
@ Jacobi
Jacobi (5 Stencil 2D, 7 Stencil 3D_.
@ GaussSeidel
Gauss Seidel 2D (2 Color, 5 Stencil), 3D (7 Stencil)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr DataT POSTOP[]
local x position of the GEM frame on the top side per stack
static constexpr DataT WIDTHFRAME
width of the frame 1 cm
static constexpr DataT LENGTHFRAMEOROC3TOP
length of the GEM frame on the top side of the OROC3
static constexpr DataT POSBOTTOM[]
local x position of the GEM frame on the bottom side per stack
static constexpr DataT LENGTHFRAMEIROCBOTTOM
length of the GEM frame on the bottom side of the IROC
static constexpr DataT PHIMIN
min phi coordinate
static constexpr DataT ZMIN
min z coordinate
static constexpr DataT PHIMAX
max phi coordinate
static constexpr DataT ZMAX
max z coordinate
static constexpr DataT getRMin()
static constexpr DataT RMAX
max radius
static constexpr DataT getZMin()
static constexpr DataT getGridSpacingR(const unsigned int nR)
static constexpr DataT getPhiMin()
static constexpr DataT getGridSpacingZ(const unsigned int nZ)
static constexpr DataT getGridSpacingPhi(const unsigned int nPhi)
static constexpr DataT RMIN
min radius
static int gamma
number of iteration at coarsest level !TODO SET TO REASONABLE VALUE!
static int nMGCycle
number of multi grid cycle (V type)
static CycleType cycleType
cycleType follow CycleType
static int maxLoop
the number of tree-deep of multi grid
static bool normalizeGridToOneSector
the grid in phi direction is squashed from 2 Pi to (2 Pi / SECTORSPERSIDE). This can used to get the ...
static bool isFull3D
< Parameters choice for MultiGrid algorithm
static GridTransferType gtType
gtType grid transfer type follow GridTransferType
static RelaxType relaxType
relaxType follow RelaxType
static int nPre
number of iteration for pre smoothing
static int nPost
number of iteration for post smoothing
static constexpr DataT DVDE
[cm/V] drift velocity dependency on the E field (from Magboltz for NeCO2N2 at standard environment)
static constexpr DataT ZOFFSET
Offset from CE: calculate all distortions closer to CE as if at this point.
static constexpr DataT IFCRADIUS
Mean Radius of the Inner Field Cage ( 82.43 min, 83.70 max) (cm)
static DataT cathodev
Cathode Voltage [V] (for 400 V/cm)
static constexpr DataT TPCZ0
nominal G1T position
static constexpr DataT E0
vacuum permittivity [A·s/(V·m)]
static constexpr DataT EM
charge/mass in [C/kg]
static constexpr DataT OFCRADIUS
Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm)
static DataT vg1t
GEM 1 Top voltage. (setting with reduced ET1,2,4 = 3.5kV/cm)