version 0.012


Photonic - A perl package for calculations on photonics and metamaterials.

Copyright (C) 1916 by W. Luis Mochán

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA

    Instituto de Ciencias Físicas, UNAM
    Apartado Postal 48-3
    62251 Cuernavaca, Morelos


   use Photonic::LE::NR2::AllH;
   my $iter=Photonic::LE;;NR2::AllH->new(geometry=>$geometry,nh=>$Nh,
   my $haydock_as=$iter->as;
   my $haydock_bs=$iter->bs;
   my $haydock_b2s=$iter->b2s;
   my $haydock_states=$iter->states;
(for developers)
    package Photonic::LE::NR2::AllH;
    $Photonic::LE::NR2::AllH::VERSION= '0.012';
    use namespace::autoclean;
    use Moose;
    with 'Photonic::Roles::OneH';


Roles consumed by AllH objects to be used in a Photonic calculation. See also specific implementations. Iterates the calculation of Haydock coefficients and states and saves them for later retrieval.


  • new(nh=>$nh, geometry=>$g, keepStates=>$k)

    Initializes an Ph::...::AllH object. $nh is the maximum number of desired coefficients, $k is a flag, non zero to save the Haydock states. All other arguments are as in Photonic::...::OneH.

  • run

    Runs the iteration to completion.

  • loadall

    Load previously saved state from file, if provided.

  • storeall

    Store final state to file, if provided.

  • All the Photonic::...::OneH methods

ACCESORS (read only)

  • nh

    Maximum number of desired Haydock 'a' coefficients and states. The number of b coefficients is one less (but it starts with a dummy zero).

  • keepStates

    Flag to keep (1) or discard (0) Haydock states

  • state_iterator

    Iterator to provide the previously calculated and saved states. It may take the states from memory or from a file if provided.

  • states

    Array of Haydock states

  • as

    Array of Haydock a coefficients

  • bs

    Array of Haydock b coefficients.

  • b2s

    Array of Haydock b coefficients squared

  • All the Photonic::...::OneH methods