The WaveBlocks Project
@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License
This class represents a matrix potential . The potential is given as an analytical 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 the two eigenvalues of the potential . We can do this by symbolical calculations. The multiplicities are taken into account.
Note
Note: the eigenvalues are memoized for later reuse.
Calculate the two eigenvectors of the potential . We can do this by symbolical calculations.
Note
The eigenvectors are memoized for later reuse.
Calculate the matrix exponential . In this case the matrix is of size thus the general exponential can be calculated analytically.
Parameters: | factor – A prefactor in the exponential. |
---|
Calculate the hessian matrix for each component of the potential. For potentials which depend only one variable , this equals the second derivative.
Calculate the jacobian matrix for each component of the potential. For potentials which depend only one variable , this equals the first derivative.
Calculate the local quadratic approximation matrix of the potential’s eigenvalues in . This function can be used for the homogeneous case and takes into account the leading component . If the parameter is not given, calculate the local quadratic approximation matrix of all the potential’s eigenvalues in . This function is used for the inhomogeneous case.
Parameters: | diagonal_component – Specifies the index of the eigenvalue that gets expanded into a Taylor series . |
---|
Evaluate the potential matrix elementwise at some given grid nodes .
Parameters: |
|
---|---|
Returns: | A list with the entries evaluated at the nodes. |
Evaluate the eigenvalues at some grid nodes .
Parameters: |
|
---|---|
Returns: | A sorted list with entries for the two eigenvalues evaluated at the nodes. Or a single value if a component was specified. |
Evaluate the eigenvectors at some grid nodes .
Parameters: | nodes – The grid nodes we want to evaluate the eigenvectors at. |
---|---|
Returns: | A list with the two eigenvectors evaluated at the given nodes. |
Evaluate the exponential of the potential matrix at some grid nodes .
Parameters: | nodes – The grid nodes we want to evaluate the exponential at. |
---|---|
Returns: | The numerical approximation of the matrix exponential at the given grid nodes. |
Evaluate the hessian at some grid nodes for each component of the potential.
Parameters: |
|
---|---|
Returns: | Either a list or a single value depending on the optional parameters. |
Evaluate the jacobian at some grid nodes for each component of the potential.
Parameters: |
|
---|---|
Returns: | Either a list or a single value depending on the optional parameters. |
Numerically evaluate the local quadratic approximation matrix of the potential’s eigenvalues in at the given grid nodes .
Parameters: |
|
---|---|
Returns: | A list of arrays or a single array containing the values of at the nodes . |
Numerically evaluate the non-quadratic remainder matrix of the quadratic approximation matrix of the potential’s eigenvalues in at the given nodes . This function is used for the homogeneous and the inhomogeneous case and just evaluates the remainder matrix .
Parameters: |
|
---|---|
Returns: | A list with a single entry consisting of an array containing the values of at the nodes . |
Returns: | The number of components the potential supports. This is also the size of the matrix. In the current case it’s 2. |
---|
The matrix of the potential .
Project a given vector from the potential’s eigenbasis to the canonical basis.
Parameters: |
|
---|---|
Returns: | Returned is another list containing the projection of the values into the eigenbasis. |
Project a given vector from the canonical basis to the eigenbasis of the potential.
Parameters: |
|
---|---|
Returns: | Returned is another list containing the projection of the values into the eigenbasis. |
The variable that represents position space.