PotentialFactory

About the PotentialFactory class

The WaveBlocks Project

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

Inheritance diagram

Inheritance diagram of PotentialFactory

Class documentation

class WaveBlocks.PotentialFactory

A factory for MatrixPotential instances. We decide which subclass of the abstract base class MatrixPotential to instantiate according to the size of the potential’s matrix. For a 1 \times 1 matrix we can use the class MatrixPotential1S which implements simplified scalar symbolic calculations. In the case of a 2 \times 2 matrix we use the class MatrixPotential2S that implements the full symbolic calculations for matrices. And for matrices of size bigger than 2 \times 2 symbolic calculations are unfeasible and we have to fall back to pure numerical methods implemented in MatrixPotentialMS.

create_potential(parameters)

The method that creates a MatrixPotential instance and decides which subclass to instantiate depending on the given potential expression.

Parameters:parameters – A ParameterProvider instance with all necessary parameters (at least a potential entry).
Returns:An adequate MatrixPotential instance.
Raises:ValueError In case of various input error, f.e. if the potential can not be found or if the potential matrix is not square etc.

Table Of Contents

Previous topic

PotentialLibrary

Next topic

Wavepacket

This Page