OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
ConstEzField.cpp
Go to the documentation of this file.
1//
2// Class ConstEzField
3// A homogeneous electrostatic field in z-direction.
4//
5// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved
7//
8// This file is part of OPAL.
9//
10// OPAL is free software: you can redistribute it and/or modify
11// it under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// You should have received a copy of the GNU General Public License
16// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17//
18#include "Fields/ConstEzField.h"
19
20
22{}
23
24
26{}
27
28
30 return EVector(0.0, 0.0, Ez);
31}
32
33
34EVector ConstEzField::Efield(const Point3D &/*P*/, double) const {
35 return EVector(0.0, 0.0, Ez);
36}
37
38
39double ConstEzField::getEz() const {
40 return Ez;
41}
42
43
44void ConstEzField::setEz(double value) {
45 Ez = value;
46}
47
48
49void ConstEzField::scale(double scalar) {
50 Ez *= scalar;
51}
virtual double getEz() const
Get component.
virtual void setEz(double)
Set component.
ConstEzField()
Default constructor.
virtual EVector Efield(const Point3D &P) const
Get field.
virtual ~ConstEzField()
virtual void scale(double scalar)
Scale the field.
A point in 3 dimensions.
Definition: EMField.h:33
An electric field vector.
Definition: EMField.h:63