Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

London Equation bugfix #311

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The format of this changelog is based on
- Added adaptive time-stepping capability for transient simulations. The new ODE integrators
rely on the SUNDIALS library and can be specified by setting the
`config["Solver"]["Transient"]["Type"]` option to `"CVODE"` or `"ARKODE"`.
- Fix bug in London equation implementation where a curl-curl term was added to the
stiffness operator instead of a mass term.

## [0.13.0] - 2024-05-20

Expand Down
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
2 changes: 1 addition & 1 deletion palace/models/spaceoperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ void SpaceOperator::AddStiffnessCoefficients(double coeff, MaterialPropertyCoeff
// Contribution for London superconductors.
if (mat_op.HasLondonDepth())
{
df.AddCoefficient(mat_op.GetAttributeToMaterial(), mat_op.GetInvLondonDepth(), coeff);
f.AddCoefficient(mat_op.GetAttributeToMaterial(), mat_op.GetInvLondonDepth(), coeff);
}
}

Expand Down
Loading