ImpactX
Loading...
Searching...
No Matches
CovarianceMatrix.H
Go to the documentation of this file.
1/* Copyright 2022-2024 The Regents of the University of California, through Lawrence
2 * Berkeley National Laboratory (subject to receipt of any required
3 * approvals from the U.S. Dept. of Energy). All rights reserved.
4 *
5 * This file is part of ImpactX.
6 *
7 * Authors: Chad Mitchell, Axel Huebl
8 * License: BSD-3-Clause-LBNL
9 */
10#ifndef IMPACTX_DISTRIBUTION_COVARIANCE_MATRIX_H
11#define IMPACTX_DISTRIBUTION_COVARIANCE_MATRIX_H
12
13#include <AMReX_REAL.H>
14#include <AMReX_SmallMatrix.H>
15
16
17namespace impactx
18{
21
24
25
29 struct Envelope
30 {
32 amrex::ParticleReal m_beam_intensity = 0.0;
33
38 Envelope &
39 set_beam_intensity (amrex::ParticleReal const intensity)
40 {
41 m_beam_intensity = intensity;
42
43 return *this;
44 }
45
50 amrex::ParticleReal
52 {
53 return m_beam_intensity;
54 }
55
60 Envelope &
67
72 {
73 return m_env;
74 }
75
76 };
77
78
79} // namespace impactx::distribution
80
81#endif // IMPACTX_DISTRIBUTION_COVARIANCE_MATRIX_H
Definition CovarianceMatrixMath.H:25
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > Map6x6
Definition CovarianceMatrix.H:20
Map6x6 CovarianceMatrix
Definition CovarianceMatrix.H:23
Definition CovarianceMatrix.H:30
amrex::ParticleReal m_beam_intensity
optional: charge in A (for 3D space charge) or current in A (for 2D space charge)
Definition CovarianceMatrix.H:32
amrex::ParticleReal beam_intensity() const
Definition CovarianceMatrix.H:51
CovarianceMatrix m_env
the 6x6 beam covariance matrix
Definition CovarianceMatrix.H:31
Envelope & set_beam_intensity(amrex::ParticleReal const intensity)
Definition CovarianceMatrix.H:39
Envelope & set_covariance_matrix(CovarianceMatrix const &covariance_matrix)
Definition CovarianceMatrix.H:61
CovarianceMatrix covariance_matrix() const
Definition CovarianceMatrix.H:71