The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Photonic::LE::NP::OneH

COPYRIGHT NOTICE

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

    mochan@fis.unam.mx

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

VERSION

version 0.012

SYNOPSIS

    use Photonic::LE::NP::OneH;
    my $nr=Photonic::LE::NP::OneH->new(epsilon=>$epsilon,
           geometry=>$geometry);
    $nr->iterate;
    say $nr->iteration;
    say $nr->current_a;
    say $nr->next_b2;
    my $state=$nr->nextState;

DESCRIPTION

Implements calculation of Haydock coefficients and Haydock states for the calculation of the non retarded dielectric function of arbitrary periodic many component systems in arbitrary number of dimentions. One Haydock coefficient at a time. The starting state is homogenous.

METHODS

  • new(epsilon=>$e, geometry=>$g[, smallH=>$s])

    Create a new Ph::NR::NP::OneH object with GeometryG0 $g, dielectric function $e and optional smallness parameter $s.

ACCESORS (read only)

  • epsilon

    A PDL::Complex PDL giving the value of the dielectric function epsilon for each pixel of the system

  • geometry Photonic::Types::GeometryG0

    A Photonic::Geometry object defining the geometry of the system, the charateristic function and the direction of the G=0 vector. Should be given in the initializer.

  • B ndims dims r G GNorm L scale f

    Accesors handled by geometry (see Photonic::Geometry)

  • smallH

    A small number used as tolerance to end the iteration. Small negative b^2 coefficients are taken to be zero.

  • previousState currentState nextState

    The n-1-th, n-th and n+1-th Haydock states; a complex number for each pixel

  • current_a

    The n-th Haydock coefficient a

  • current_b2 next_b2 current_b next_b

    The n-th and n+1-th b^2 and b Haydock coefficients

  • iteration

    Number of completed iterations

METHODS

  • iterate

    Performs a single Haydock iteration and updates current_a, next_state, next_b2, next_b, shifting the current values where necessary. Returns 0 when unable to continue iterating.

  • applyOperator($psi_G)

    Apply the 'Hamiltonian' operator to state $psi_G in reciprocal =space. State is ri:nx:ny... The operator is the longitudinal projection of the dielectric function

  • innerProduct($left, $right)

    Returns the inner (Euclidean) product between states $left and $right.

  • magnitude($psi_G)

    Returns the magnitude of state $psi_G in reciprocal space by taking the square root of the inner product of the state with itself.

  • changesign

    Returns zero, as there is no need to change sign.

INTERNAL METHODS

  • _firstState

    Returns the fisrt state.