Package cnuphys.magfield
Class CompositeField
- All Implemented Interfaces:
IMagField,Serializable,Cloneable,Iterable<IMagField>,Collection<IMagField>,List<IMagField>,RandomAccess
- Direct Known Subclasses:
RotatedCompositeField
A composition of multiple magnetic field maps. The resulting magnetic field
at a given point is the sum of the constituent fields at that point.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancontains(double x, double y, double z) Checks whether the field boundary contain the given point.floatgetB1(int index) Get B1 at a given index.floatgetB2(int index) Get B2 at a given index.floatgetB3(int index) Get B3 at a given index.floatObtain the maximum field magnitude of any point in the map.getName()Get the name of the fielddoubleGet the scale factorbooleanCheck whether we have a solenoid fieldbooleanhasTorus()Check whether we have a torus fieldbooleanCheck whether we have a transverse solenoid fieldfinal booleanChecks whether the field has been set to always return zero.voidPrint the current configurationMethods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
CompositeField
public CompositeField()
-
-
Method Details
-
isZeroField
public final boolean isZeroField()Checks whether the field has been set to always return zero.- Specified by:
isZeroFieldin interfaceIMagField- Returns:
trueif the field is set to return zero.
-
add
-
getName
Description copied from interface:IMagFieldGet the name of the field -
hasTorus
public boolean hasTorus()Check whether we have a torus field- Returns:
trueif we have a torus
-
hasSolenoid
public boolean hasSolenoid()Check whether we have a solenoid field- Returns:
trueif we have a solenoid
-
hasTransverseSolenoid
public boolean hasTransverseSolenoid()Check whether we have a transverse solenoid field- Returns:
trueif we have a transverse solenoid
-
getB1
public float getB1(int index) Description copied from interface:IMagFieldGet B1 at a given index. -
getB2
public float getB2(int index) Description copied from interface:IMagFieldGet B2 at a given index. -
getB3
public float getB3(int index) Description copied from interface:IMagFieldGet B3 at a given index. -
getMaxFieldMagnitude
public float getMaxFieldMagnitude()Description copied from interface:IMagFieldObtain the maximum field magnitude of any point in the map.- Specified by:
getMaxFieldMagnitudein interfaceIMagField- Returns:
- the maximum field magnitude in the units of the map.
-
getScaleFactor
public double getScaleFactor()Description copied from interface:IMagFieldGet the scale factor- Specified by:
getScaleFactorin interfaceIMagField- Returns:
- the scale factor
-
printConfiguration
Print the current configuration- Specified by:
printConfigurationin interfaceIMagField- Parameters:
ps- the print stream
-
contains
public boolean contains(double x, double y, double z) Description copied from interface:IMagFieldChecks whether the field boundary contain the given point.
-