MatrixPotential1S

About the MatrixPotential1S class

The WaveBlocks Project

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

Inheritance diagram

Inheritance diagram of MatrixPotential1S

Class documentation

class WaveBlocks.MatrixPotential1S(expression, variables)

This class represents a scalar potential V\left(x\right). The potential is given as an analytical 1 \times 1 matrix expression. Some symbolic 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 eigenvalue \lambda_0\left(x\right) of the potential V\left(x\right). In the scalar case this is just the matrix entry V_{0,0}.

Note

This function is idempotent and the eigenvalues are memoized for later reuse.

calculate_eigenvectors()

Calculate the eigenvector nu_0\left(x\right) of the potential V\left(x\right). In the scalar case this is just the value 1.

Note

This function is idempotent and the eigenvectors are memoized for later reuse.

calculate_exponential(factor=1)

Calculate the matrix exponential E = \exp\left(\alpha M\right). In this case the matrix is of size 1 \times 1 thus the exponential simplifies to the scalar exponential function.

Parameters:factor – A prefactor \alpha in the exponential.

Note

This function is idempotent.

calculate_hessian()

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

calculate_jacobian()

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

calculate_local_quadratic(diagonal_component=None)

Calculate the local quadratic approximation U of the potential’s eigenvalue \lambda.

Parameters:diagonal_component – Dummy parameter that has no effect here.

Note

This function is idempotent.

calculate_local_remainder(diagonal_component=None)

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

Parameters:diagonal_component – Dummy parameter that has no effect here.

Note

This function is idempotent.

evaluate_at(nodes, component=0, as_matrix=False)

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.
  • as_matrix – Dummy parameter which has no effect here.
Returns:

A list with the single entry evaluated at the nodes.

evaluate_eigenvalues_at(nodes, component=None, as_matrix=False)

Evaluate the eigenvalue \lambda_0\left(x\right) at some grid nodes \gamma.

Parameters:
  • nodes – The grid nodes \gamma we want to evaluate the eigenvalue at.
  • diagonal_component – Dummy parameter that has no effect here.
  • as_matrix – Dummy parameter which has no effect here.
Returns:

A list with the single eigenvalue evaluated at the nodes.

evaluate_eigenvectors_at(nodes)

Evaluate the eigenvector nu_0\left(x\right) at some grid nodes \gamma.

Parameters:nodes – The grid nodes \gamma we want to evaluate the eigenvector at.
Returns:A list with the eigenvector evaluated at the given nodes.
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.
Returns:The numerical approximation of the matrix exponential at the given grid nodes.
evaluate_hessian_at(nodes, component=None)

Evaluate the potential’s hessian at some grid nodes \gamma.

Parameters:
  • nodes – The grid nodes \gamma the hessian gets evaluated at.
  • component – Dummy parameter that has no effect here.
Returns:

The value of the potential’s hessian at the given nodes.

evaluate_jacobian_at(nodes, component=None)

Evaluate the potential’s jacobian at some grid nodes \gamma.

Parameters:
  • nodes – The grid nodes \gamma the jacobian gets evaluated at.
  • component – Dummy parameter that has no effect here.
Returns:

The value of the potential’s jacobian at the given nodes.

evaluate_local_quadratic_at(nodes, diagonal_component=None)

Numerically evaluate the local quadratic approximation U of the potential’s eigenvalue \lambda at the given grid nodes \gamma. This function is used for the homogeneous case.

Parameters:nodes – The grid nodes \gamma we want to evaluate the quadratic approximation at.
Returns:An array containing the values of U at the nodes \gamma.
evaluate_local_remainder_at(position, nodes, diagonal_component=None, component=None)

Numerically evaluate the non-quadratic remainder W of the quadratic approximation U of the potential’s eigenvalue \lambda at the given nodes \gamma. This function is used for the homogeneous and the inhomogeneous case and just evaluates the remainder 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 – Dummy parameter that has no effect here.
Returns:

A list with a single entry consisting of an array containing the values of W at the nodes \gamma.

get_number_components()
Returns:The number N of components the potential supports. In the one dimensional case, it’s just 1.
potential = None

The matrix of the potential V\left(x\right).

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.
Returns:

This method does nothing and returns the values.

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.
Returns:

This method does nothing and returns the values.

x = None

The variable x that represents position space.

Table Of Contents

Previous topic

MatrixPotential

Next topic

MatrixPotential2S

This Page