Closed conpierce8 closed 1 year ago
Related to #21. It seems like the fix introduced in #22 did not fully fix the issue raised in #21.
Related to #21. It seems like the fix introduced in #22 did not fully fix the issue raised in #21.
Im fine with the fixes here, just make sure that the CI passes
Im fine with the fixes here, just make sure that the CI passes
Looks like it was failing on Flake8. Should pass now (I hope!)
Motivation
In
demo_periodic_gep.py
, the call signature ofassemble_and_solve
suggests that any combination of boundary conditions can be applied, i.e.:However,
assemble_and_solve
provides incorrect eigenvectors for the following boundary condition combinations:Fixing the Dirichlet-Dirichlet case is unimportant since this case does not demonstrate any features of
dolfinx_mpc
. Fixing the Dirichlet-periodic case is not very important, since the periodic-Dirichlet case is equivalent and is already implemented correctly. However, the periodic-periodic case should be fixed since it demonstrates the special steps that must be taken in the case when multiple periodic conditions apply to the same dof. In the existing implementation of the periodic-periodic case, incorrect modes are obtained in which the eigenvector is not periodic between points $(0, 0)$ and $(1, 1)$. See example below where the solution has been periodically extended, showing gaps in the solution between adjoining unit cells.Changes
Update
assemble_and_solve
to correctly apply any combination of Dirichlet and periodic boundary conditions.Export all eigenvectors to a single XDMF file for visualization using timestamps.
Update
print_exact_eigenvalues
to provide the correct eigenvalues for all combinations of bcs