Periodic eigenproblems

Asked by Christian Engstrom

Hi!
How can I apply periodic boundary conditions to eigenvalue problems? I try to merge the scripts under la/eigensolver/python and under pde/periodic/python

My application is photonic crystals (elliptic problem in 2D Maxwell in 3D)

Cheers, Christian

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Garth Wells
Solved:
Last query:
Last reply:
Revision history for this message
Best Garth Wells (garth-wells) said :
#1

On Fri, 2010-07-23 at 11:54 +0000, Christian Engstrom wrote:
> New question #118710 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/118710
>
> Hi!
> How can I apply periodic boundary conditions to eigenvalue problems? I try to merge the scripts under la/eigensolver/python and under pde/periodic/python
>

# Create periodic boundary condition
pbc = PeriodicBoundary()
bc1 = PeriodicBC(V, pbc)

# Collect boundary conditions
bcs = [bc0, bc1]

# Assemble matrix
A = assemble(a)

# Apply bcs
for bc in bcs: bc.apply(A)

# Compute 3 largest eigenvalues
esolver = SLEPcEigenSolver()
esolver.solve(A, 3)

Garth

> My application is photonic crystals (elliptic problem in 2D Maxwell in 3D)
>
> Cheers, Christian
>
>

Revision history for this message
Christian Engstrom (cengstro) said :
#2

Thank you for the fast and helpful response!