OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ConstEzField.h
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#ifndef OPALX_ConstEzField_HH
19#define OPALX_ConstEzField_HH
20
22
24public:
26 // Constructs a null field.
28
29 virtual ~ConstEzField();
30
32 // Return the time-independent part of the electric field in point [b]P[/b].
33 virtual EVector Efield(const Point3D& P) const;
34
36 // Return the electric field at time [b]t[/b] in point [b]P[/b].
37 virtual EVector Efield(const Point3D& P, double t) const;
38
40 // Return the x-component of the electric field in A/m.
41 virtual double getEz() const;
42
44 // Assign the z-component of the electric field in A/m.
45 virtual void setEz(double);
46
48 // Multiply the field by [b]scalar[/b].
49 virtual void scale(double scalar);
50
51private:
52 // The field components.
53 double Ez;
54};
55
56#endif // OPALX_ConstEzField_HH
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.
An electric field vector.
Definition EMField.h:58
A point in 3 dimensions.
Definition EMField.h:32
Abstract base class for static electric fields.