| 1 | package Physics::UEMColumn::Accelerator; | ||
| 2 | |||
| 3 | use Moose; | ||
| 4 | use namespace::autoclean; | ||
| 5 | |||
| 6 | BEGIN { extends 'Physics::UEMColumn::Element'; } | ||
| 7 | |||
| 8 | use Method::Signatures; | ||
| 9 | |||
| 10 | has '+location' => ( required => 0, default => 0 ); | ||
| 11 | |||
| 12 | method field () { | ||
| 13 | return 0; | ||
| 14 | } | ||
| 15 | |||
| 16 | method est_exit_vel () { | ||
| 17 | return 0; | ||
| 18 | } | ||
| 19 | |||
| 20 | method est_exit_time () { | ||
| 21 | return 0; | ||
| 22 | } | ||
| 23 | |||
| 24 | __PACKAGE__->meta->make_immutable; | ||
| 25 | |||
| 26 | 1; | ||
| 27 | |||
| 28 | =head1 NAME | ||
| 29 | |||
| 30 | Physics::UEMColumn::Accelerator - Base class for acceleration regions in a UEM system | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | package Physics::UEMColumn::MyAccelerator; | ||
| 35 | use Moose; | ||
| 36 | extends 'Physics::UEMColumn::Accelerator'; | ||
| 37 | |||
| 38 | =head1 DESCRIPTION | ||
| 39 | |||
| 40 | L<Physics::UEMColumn::Accelerator> is a base class for acceleration regions in a UEM system. It is itself a subclass of L<Physics::UEMColumn::Element> and inherits its attributes and methods. Additionally it provides: | ||
| 41 | |||
| 42 | =head1 ATTRIBUTES | ||
| 43 | |||
| 44 | =over | ||
| 45 | |||
| 46 | =item C<location> | ||
| 47 | |||
| 48 | Unlike L<Physics::UEMColumn::Element>, accelerators' location defines the start of the region and defaults to a C<0>. | ||
| 49 | |||
| 50 | =back | ||
| 51 | |||
| 52 | =head1 METHODS | ||
| 53 | |||
| 54 | =over | ||
| 55 | |||
| 56 | =item C<field> | ||
| 57 | |||
| 58 | Returns a field strength possibly derived from other attributes. In this base class it simply returns zero. This method is intended to be redefined on subclassing. | ||
| 59 | |||
| 60 | =item C<est_exit_vel> | ||
| 61 | |||
| 62 | Returns an estimate of the velocity of the pulse on exiting the region. This in not likely to be exact. It is used in estimating the end time of the simulation. The base class' implementation returns zero and is intended to be subclassed. | ||
| 63 | |||
| 64 | =item C<est_exit_time> | ||
| 65 | |||
| 66 | Returns an estimate of the time that the pulse on exits the region. This in not likely to be exact. It is used in estimating the end time of the simulation. The base class' implementation returns zero and is intended to be subclassed. | ||
| 67 | |||
| 68 | =back | ||
| 69 | |||
| 70 | =head1 SOURCE REPOSITORY | ||
| 71 | |||
| 72 | L<http://github.com/jberger/Physics-UEMColumn> | ||
| 73 | |||
| 74 | =head1 AUTHOR | ||
| 75 | |||
| 76 | Joel Berger, E<lt>joel.a.berger@gmail.comE<gt> | ||
| 77 | |||
| 78 | =head1 COPYRIGHT AND LICENSE | ||
| 79 | |||
| 80 | Copyright (C) 2012-2013 by Joel Berger | ||
| 81 | |||
| 82 | This library is free software; you can redistribute it and/or modify | ||
| 83 | it under the same terms as Perl itself. | ||
| 84 |