-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A commit with a series of linked changes. It was found that imposing …
…the boundary conditions that the distribution function must satisfy in the mass matrix led to numerical instability at long times. This was confirmed by removing the boundary condition imposition from the mass matrix. The addition of numerical conserving terms to the weak-form operator then provided a numerical operator that appears to have an approximate H-theorem and a stable long-time solution. Imposing numerical conserving terms alone on the old form of the mass matrix was not adequate. Here, we remove all code associated with the option impose_zero_gradient_BC, including unused functions in fokker_planck_calculus.jl. In addition to this, we also make changes in the calculus.jl and gauss_legendre.jl modules so that the comments regarding imposing boundary conditions via the 1D mass matrix are removed. We also make sure that weak-form matrices that are used only in numerical differentiation (i.e., K in M.f" = K.f, with M the mass matrix) include explicit integration-by-parts boundary condition terms so that the weak-form differentiation gives comparable or better results to the interpolation derivative method for a first and second order derivative, even when the function f has not gone to 0 by the end of the domain. This functionality can be switched by changing "K_with_BC_terms" -> "K", "L_with_BC_terms" -> "L" and toggling explicit_BC_terms = true -> explicit_BC_terms = false in the appropriate places.
- Loading branch information
Showing
6 changed files
with
30 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.