Skip to content

Commit

Permalink
Disable div free if using London equations, there is no nullspace. Up…
Browse files Browse the repository at this point in the history
…date documentation.
  • Loading branch information
hughcars committed Dec 10, 2024
1 parent 95195df commit 11590bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docs/src/config/solver.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,14 @@ iterative solver choices, and the default choice depends on the iterative solver
- `"Default"`

`"DivFreeTol" [1.0e-12]` : Relative tolerance for divergence-free cleaning used in the
eigenmode simulation type.
eigenmode simulation type. Ignored if non-zero
[`config["Domains"]["Materials"]["LondonDepth"]`](domains.md##domains%5B%22Materials%22%5D%5B%22LondonDepth%22%5D)
is detected.

`"DivFreeMaxIts" [1000]` : Maximum number of iterations for divergence-free cleaning use in
the eigenmode simulation type.
the eigenmode simulation type. Ignored if non-zero
[`config["Domains"]["Materials"]["LondonDepth"]`](domains.md##domains%5B%22Materials%22%5D%5B%22LondonDepth%22%5D)
is detected.

`"EstimatorTol" [1.0e-6]` : Relative tolerance for flux projection used in the
error estimate calculation.
Expand Down
2 changes: 1 addition & 1 deletion palace/drivers/eigensolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ EigenSolver::Solve(const std::vector<std::unique_ptr<Mesh>> &mesh) const
// Construct a divergence-free projector so the eigenvalue solve is performed in the space
// orthogonal to the zero eigenvalues of the stiffness matrix.
std::unique_ptr<DivFreeSolver<ComplexVector>> divfree;
if (iodata.solver.linear.divfree_max_it > 0)
if (iodata.solver.linear.divfree_max_it > 0 && !space_op.GetMaterialOp().HasLondonDepth())
{
Mpi::Print(" Configuring divergence-free projection\n");
constexpr int divfree_verbose = 0;
Expand Down

0 comments on commit 11590bd

Please sign in to comment.