FastFourier2DSolver¶
- class FastFourier2DSolver(boundary_conditions=None, order=None)¶
The Hybrid FFT2D + Finite-Difference-1D Poisson solver.
- Parameters:
boundary_conditions (list of
DirichletBoundaryCondition
|NeumannBoundaryCondition
|PeriodicBoundaryCondition
|MultipoleBoundaryCondition
) –A list of shape (3,2) specifying the boundary conditions on the 6 surfaces of the unit cell for the configuration. Default:
MoleculeConfiguration
:[[PeriodicBoundaryCondition()] * 2] * 3
BulkConfiguration
:[[PeriodicBoundaryCondition()] * 2] * 3
-
[[PeriodicBoundaryCondition()] * 2, [PeriodicBoundaryCondition()] * 2, [DirichletBoundaryCondition(), NeumannBoundaryCondition()]]
-
[[PeriodicBoundaryCondition()] * 2, [PeriodicBoundaryCondition()] * 2, [DirichletBoundaryCondition()] * 2]
order (int) – The order of the finite difference kernel used for solving in the C-direction. Must be either 1 or 2. Default: 2
- boundaryConditions()¶
- Returns:
The boundary conditions for the solver.
- Return type:
list of
DirichletBoundaryCondition
|NeumannBoundaryCondition
|PeriodicBoundaryCondition
|MultipoleBoundaryCondition
- nlinfo()¶
- Returns:
The nlinfo.
- Return type:
dict
- order()¶
- Returns:
The order.
- Return type:
int
- uniqueString()¶
Return a unique string representing the state of the object.
Usage Examples¶
Define a FastFourier2DSolver
with periodic boundary conditions:
poisson_solver = FastFourier2DSolver(
boundary_conditions=[
[PeriodicBoundaryCondition(), PeriodicBoundaryCondition()],
[PeriodicBoundaryCondition(), PeriodicBoundaryCondition()],
[PeriodicBoundaryCondition(), PeriodicBoundaryCondition()]
]
)
calculator = LCAOCalculator(
poisson_solver=poisson_solver
)
Define a FastFourier2DSolver with Dirichlet boundary conditions in the C-direction:
poisson_solver = FastFourier2DSolver(
boundary_conditions=[
[PeriodicBoundaryCondition(), PeriodicBoundaryCondition()],
[PeriodicBoundaryCondition(), PeriodicBoundaryCondition()],
[DirichletBoundaryCondition(), DirichletBoundaryCondition()]
]
)
calculator = LCAOCalculator(
poisson_solver=poisson_solver
)
Notes¶
The FastFourier2DSolver
uses a FFT in the A, B directions and a finite difference operator in the C direction to solve Poisson’s equation [1].
The FastFourier2DSolver
is the default solver for a DeviceConfiguration
that has no metallic and dielectric regions.