← Back to team overview

dolfin team mailing list archive

Re: [Question #118710]: Periodic eigenproblems

 

Question #118710 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/118710

    Status: Open => Answered

Garth Wells proposed the following answer:
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
> 
>

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.