MatrixPotential

About the MatrixPotential class

The WaveBlocks Project

@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License

Inheritance diagram

Inheritance diagram of MatrixPotential

Class documentation

class WaveBlocks.MatrixPotential

This class represents a potential V\left(x\right). The potential is given as an analytic expression. Some calculations with the potential are supported. For example calculation of eigenvalues and exponentials and numerical evaluation. Further, there are methods for splitting the potential into a Taylor expansion and for basis transformations between canonical and eigenbasis.

calculate_eigenvalues()

Calculate the eigenvalues \lambda_i\left(x\right) of the potential V\left(x\right).

Raises NotImplementedError:
 This is an abstract base class.
calculate_eigenvectors()

Calculate the eigenvectors \nu_i\left(x\right) of the potential V\left(x\right).

Raises NotImplementedError:
 This is an abstract base class.
calculate_exponential(factor=1)

Calculate the matrix exponential E = \exp\left(\alpha M\right).

Parameters:factor – A prefactor \alpha in the exponential.
Raises NotImplementedError:
 This is an abstract base class.
calculate_hessian()

Calculate the hessian matrix for each component V_{i,j} of the potential. For potentials which depend only one variable x, this equals the second derivative.

Raises NotImplementedError:
 This is an abstract base class.
calculate_jacobian()

Calculate the jacobian matrix for each component V_{i,j} of the potential. For potentials which depend only one variable x, this equals the first derivative.

Raises NotImplementedError:
 This is an abstract base class.
calculate_local_quadratic(diagonal_component=None)

Calculate the local quadratic approximation matrix U of the potential’s eigenvalues in \Lambda. This function is used for the homogeneous case and takes into account the leading component \chi.

Parameters:diagonal_component – Specifies the index i of the eigenvalue \lambda_i that gets expanded into a Taylor series u_i.
Raises NotImplementedError:
 This is an abstract base class.
calculate_local_remainder(diagonal_component=0)

Calculate the non-quadratic remainder matrix W of the quadratic approximation matrix U of the potential’s eigenvalue matrix \Lambda. This function is used for the homogeneous case and takes into account the leading component \chi.

Parameters:diagonal_component – Specifies the index \chi of the leading component \lambda_\chi.
Raises NotImplementedError:
 This is an abstract base class.
evaluate_at(nodes, component=None)

Evaluate the potential matrix elementwise at some given grid nodes \gamma.

Parameters:
  • nodes – The grid nodes \gamma we want to evaluate the potential at.
  • component – The component V_{i,j} that gets evaluated or ‘None’ to evaluate all.
Raises NotImplementedError:
 

This is an abstract base class.

evaluate_eigenvalues_at(nodes, diagonal_component=None)

Evaluate the eigenvalues \lambda_i\left(x\right) at some grid nodes \gamma.

Parameters:
  • nodes – The grid nodes \gamma we want to evaluate the eigenvalues at.
  • diagonal_component – The index i of the eigenvalue \lambda_i that gets evaluated or ‘None’ to evaluate all.
Raises NotImplementedError:
 

This is an abstract base class.

evaluate_eigenvectors_at(nodes)

Evaluate the eigenvectors \nu_i\left(x\right) at some grid nodes \gamma.

Parameters:nodes – The grid nodes \gamma we want to evaluate the eigenvectors at.
Raises NotImplementedError:
 This is an abstract base class.
evaluate_exponential_at(nodes)

Evaluate the exponential of the potential matrix V at some grid nodes \gamma.

Parameters:nodes – The grid nodes \gamma we want to evaluate the exponential at.
Raises NotImplementedError:
 This is an abstract base class.
evaluate_hessian_at(nodes, component=None)

Evaluate the hessian at some grid nodes \gamma for each component V_{i,j} of the potential.

Parameters:
  • nodes – The grid nodes \gamma the hessian gets evaluated at.
  • component – The index tuple \left(i,j\right) that specifies the potential’s entry of which the hessian is evaluated. (Or ‘None’ to evaluate all)
Raises NotImplementedError:
 

This is an abstract base class.

evaluate_jacobian_at(nodes, component=None)

Evaluate the jacobian at some grid nodes \gamma for each component V_{i,j} of the potential.

Parameters:
  • nodes – The grid nodes \gamma the jacobian gets evaluated at.
  • component – The index tuple \left(i,j\right) that specifies the potential’s entry of which the jacobian is evaluated. (Defaults to ‘None’ to evaluate all)
Raises NotImplementedError:
 

This is an abstract base class.

evaluate_local_quadratic_at(nodes)

Numerically evaluate the local quadratic approximation matrix U of the potential’s eigenvalues in \Lambda at the given grid nodes \gamma. This function is used for the homogeneous case and takes into account the leading component \chi.

Parameters:nodes – The grid nodes \gamma we want to evaluate the quadratic approximation at.
Raises NotImplementedError:
 This is an abstract base class.
evaluate_local_remainder_at(position, nodes, component=None)

Numerically evaluate the non-quadratic remainder matrix W of the quadratic approximation matrix U of the potential’s eigenvalues in \Lambda at the given nodes \gamma. This function is used for the homogeneous and the inhomogeneous case and just evaluates the remainder matrix W.

Parameters:
  • position – The point q where the Taylor series is computed.
  • nodes – The grid nodes \gamma we want to evaluate the potential at.
  • component – The component \left(i,j\right) of the remainder matrix W that is evaluated.
Raises NotImplementedError:
 

This is an abstract base class.

get_number_components()
Returns:The number N of components the potential supports.
Raises NotImplementedError:
 This is an abstract base class.
project_to_canonical(nodes, values, basis=None)

Project a given vector from the potential’s eigenbasis to the canonical basis.

Parameters:
  • nodes – The grid nodes \gamma for the pointwise transformation.
  • values – The list of vectors \varphi_i containing the values we want to transform.
  • basis – A list of basis vectors nu_i. Allows to use this function for external data, similar to a static function.
Raises NotImplementedError:
 

This is an abstract base class.

project_to_eigen(nodes, values, basis=None)

Project a given vector from the canonical basis to the eigenbasis of the potential.

Parameters:
  • nodes – The grid nodes \gamma for the pointwise transformation.
  • values – The list of vectors \varphi_i containing the values we want to transform.
  • basis – A list of basisvectors nu_i. Allows to use this function for external data, similar to a static function.
Raises NotImplementedError:
 

This is an abstract base class.

Table Of Contents

Previous topic

WaveFunction

Next topic

MatrixPotential1S

This Page