OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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
21
23
24EVector ConstEzField::Efield(const Point3D&) const { return EVector(0.0, 0.0, Ez); }
25
26EVector ConstEzField::Efield(const Point3D& /*P*/, double) const { return EVector(0.0, 0.0, Ez); }
27
28double ConstEzField::getEz() const { return Ez; }
29
30void ConstEzField::setEz(double value) { Ez = value; }
31
32void ConstEzField::scale(double scalar) { Ez *= scalar; }
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