ISFvelocity module#
- class ISFvelocity.computeVelocity(domain: dolfinx.mesh.Mesh, degree_psi=1)[source]#
Bases:
object
- assemble(hbar: float, direct: bool = False)[source]#
This function assembles the forms of the weak formulations and creates the linear structures for the solution (matrix, rhs and solver).
The velocity is computed as follows:
\[\mathbf{u} = \hbar\,\Re\{-(\Psi^*)^T\,i\,\nabla\Psi\} = \hbar\,\Re\{-i(\psi_1^*\,\nabla\psi_1+\psi_2^*\,\nabla\psi_2)\}\]- Parameters:
hbar (float) – Value of \(\hbar\).
direct (boolean (Default: False)) – Boolean variable to identify if a direct solver must be used.
- solve(psi_1: dolfinx.fem.Function, psi_2: dolfinx.fem.Function)[source]#
This function computes the velocity given a couple of wave functions.
- Parameters:
psi_1 (dolfinx.fem.Function) – First component of the wave function \(\psi_1\).
psi_2 (dolfinx.fem.Function) – Second component of the wave function \(\psi_2\).