{"title":"SWtools:一个Python包,实现非线性Schrödinger-type方程孤子解的迭代求解器","authors":"O. Melchert , A. Demircan","doi":"10.1016/j.cpc.2025.109851","DOIUrl":null,"url":null,"abstract":"<div><div>Solitons are ubiquitous in nature and play a pivotal role in the structure and dynamics of solutions of nonlinear propagation equations. In many instances where solitons are expected to exist, analytical expressions of these special objects are not available. The presented software fills this gap, allowing users to numerically calculate soliton solutions for a generic nonlinear Schrödinger-type equation by iteratively solving an associated nonlinear eigenvalue problem. The package implements a range of methods, including the spectral renormalization method, and a relaxation method for the problem with additional normalization constraint. We verify the implemented methods in terms of a problem for which an analytical soliton expression is available, and demonstrate the implemented functionality by numerical experiments for example problems in nonlinear optics and matter-wave solitons in quantum mechanics. For common variants of the considered equation, <span>SWtools</span> also implements functions retrieving linear stability eigenvalues and modes for its solitons. The presented Python package is open-source and released under the MIT License in a publicly available software repository.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> Solitary wave tools (<span>SWtools</span>)</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/y55t9chcz6.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/omelchert/SWtools</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> Python</div><div><em>Supplementary material:</em> Online documentation and usage examples are hosted on GitHub under <span><span>https://github.com/omelchert/SWtools</span><svg><path></path></svg></span>. A Code Ocean compute capsule demonstrating the calculation of a soliton solution for a higher-order nonlinear Schrödinger equation is available under <span><span>https://doi.org/10.24433/CO.5557616.v1</span><svg><path></path></svg></span>.</div><div><em>Nature of problem:</em> Numerical computation of solitary wave solutions for nonlinear Schrödinger-type equations. Two variants of the corresponding nonlinear eigenvalue problem (NEVP) are considered: a “bare” NEVP, where a solution with prescribed eigenvalue is computed, and a “constrained” NEVP with <em>a priori</em> unknown eigenvalue, where a solution with prescribed norm is computed.</div><div><em>Solution method:</em> <span>SWtools</span> implements iterative solvers for both problem variants. While the bare NEVP is solved using the spectral renormalization method (SRM) [1], the constrained NEVP is solved using a custom nonlinear successive overrelaxation method (NSOM).</div><div><em>Additional comments including restrictions and unusual features:</em> This document serves as a reference for <span>SWtools</span>. For a concise presentation, the discussion in the article considers nonlinear Schrödinger-type equations with one-dimensional transverse coordinate. Extension of the functionality of <span>SWtools</span> is, however, demonstrated by an implementation of a two-dimensional SRM [2].</div></div><div><h3>References</h3><div><ul><li><span>[1]</span><span><div>M. J. Ablowitz, Z. H. Musslimani, Spectral renormalization method for computing self-localized solutions to nonlinear systems, Opt. Lett. 30 (2005) 2140.</div></span></li><li><span>[2]</span><span><div>Z. Musslimani, J. Yang, Self-trapping of light in a two-dimensional photonic lattice, J. Opt. Soc. Am. B 21 (2004) 973.</div></span></li></ul></div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109851"},"PeriodicalIF":3.4000,"publicationDate":"2025-09-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"SWtools: A Python package implementing iterative solvers for soliton solutions of nonlinear Schrödinger-type equations\",\"authors\":\"O. Melchert , A. Demircan\",\"doi\":\"10.1016/j.cpc.2025.109851\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Solitons are ubiquitous in nature and play a pivotal role in the structure and dynamics of solutions of nonlinear propagation equations. In many instances where solitons are expected to exist, analytical expressions of these special objects are not available. The presented software fills this gap, allowing users to numerically calculate soliton solutions for a generic nonlinear Schrödinger-type equation by iteratively solving an associated nonlinear eigenvalue problem. The package implements a range of methods, including the spectral renormalization method, and a relaxation method for the problem with additional normalization constraint. We verify the implemented methods in terms of a problem for which an analytical soliton expression is available, and demonstrate the implemented functionality by numerical experiments for example problems in nonlinear optics and matter-wave solitons in quantum mechanics. For common variants of the considered equation, <span>SWtools</span> also implements functions retrieving linear stability eigenvalues and modes for its solitons. The presented Python package is open-source and released under the MIT License in a publicly available software repository.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> Solitary wave tools (<span>SWtools</span>)</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/y55t9chcz6.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/omelchert/SWtools</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT</div><div><em>Programming language:</em> Python</div><div><em>Supplementary material:</em> Online documentation and usage examples are hosted on GitHub under <span><span>https://github.com/omelchert/SWtools</span><svg><path></path></svg></span>. A Code Ocean compute capsule demonstrating the calculation of a soliton solution for a higher-order nonlinear Schrödinger equation is available under <span><span>https://doi.org/10.24433/CO.5557616.v1</span><svg><path></path></svg></span>.</div><div><em>Nature of problem:</em> Numerical computation of solitary wave solutions for nonlinear Schrödinger-type equations. Two variants of the corresponding nonlinear eigenvalue problem (NEVP) are considered: a “bare” NEVP, where a solution with prescribed eigenvalue is computed, and a “constrained” NEVP with <em>a priori</em> unknown eigenvalue, where a solution with prescribed norm is computed.</div><div><em>Solution method:</em> <span>SWtools</span> implements iterative solvers for both problem variants. While the bare NEVP is solved using the spectral renormalization method (SRM) [1], the constrained NEVP is solved using a custom nonlinear successive overrelaxation method (NSOM).</div><div><em>Additional comments including restrictions and unusual features:</em> This document serves as a reference for <span>SWtools</span>. For a concise presentation, the discussion in the article considers nonlinear Schrödinger-type equations with one-dimensional transverse coordinate. Extension of the functionality of <span>SWtools</span> is, however, demonstrated by an implementation of a two-dimensional SRM [2].</div></div><div><h3>References</h3><div><ul><li><span>[1]</span><span><div>M. J. Ablowitz, Z. H. Musslimani, Spectral renormalization method for computing self-localized solutions to nonlinear systems, Opt. Lett. 30 (2005) 2140.</div></span></li><li><span>[2]</span><span><div>Z. Musslimani, J. Yang, Self-trapping of light in a two-dimensional photonic lattice, J. Opt. Soc. Am. B 21 (2004) 973.</div></span></li></ul></div></div>\",\"PeriodicalId\":285,\"journal\":{\"name\":\"Computer Physics Communications\",\"volume\":\"317 \",\"pages\":\"Article 109851\"},\"PeriodicalIF\":3.4000,\"publicationDate\":\"2025-09-11\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Computer Physics Communications\",\"FirstCategoryId\":\"101\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0010465525003534\",\"RegionNum\":2,\"RegionCategory\":\"物理与天体物理\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465525003534","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
SWtools: A Python package implementing iterative solvers for soliton solutions of nonlinear Schrödinger-type equations
Solitons are ubiquitous in nature and play a pivotal role in the structure and dynamics of solutions of nonlinear propagation equations. In many instances where solitons are expected to exist, analytical expressions of these special objects are not available. The presented software fills this gap, allowing users to numerically calculate soliton solutions for a generic nonlinear Schrödinger-type equation by iteratively solving an associated nonlinear eigenvalue problem. The package implements a range of methods, including the spectral renormalization method, and a relaxation method for the problem with additional normalization constraint. We verify the implemented methods in terms of a problem for which an analytical soliton expression is available, and demonstrate the implemented functionality by numerical experiments for example problems in nonlinear optics and matter-wave solitons in quantum mechanics. For common variants of the considered equation, SWtools also implements functions retrieving linear stability eigenvalues and modes for its solitons. The presented Python package is open-source and released under the MIT License in a publicly available software repository.
Program summary
Program Title: Solitary wave tools (SWtools)
CPC Library link to program files:https://doi.org/10.17632/y55t9chcz6.1
Supplementary material: Online documentation and usage examples are hosted on GitHub under https://github.com/omelchert/SWtools. A Code Ocean compute capsule demonstrating the calculation of a soliton solution for a higher-order nonlinear Schrödinger equation is available under https://doi.org/10.24433/CO.5557616.v1.
Nature of problem: Numerical computation of solitary wave solutions for nonlinear Schrödinger-type equations. Two variants of the corresponding nonlinear eigenvalue problem (NEVP) are considered: a “bare” NEVP, where a solution with prescribed eigenvalue is computed, and a “constrained” NEVP with a priori unknown eigenvalue, where a solution with prescribed norm is computed.
Solution method:SWtools implements iterative solvers for both problem variants. While the bare NEVP is solved using the spectral renormalization method (SRM) [1], the constrained NEVP is solved using a custom nonlinear successive overrelaxation method (NSOM).
Additional comments including restrictions and unusual features: This document serves as a reference for SWtools. For a concise presentation, the discussion in the article considers nonlinear Schrödinger-type equations with one-dimensional transverse coordinate. Extension of the functionality of SWtools is, however, demonstrated by an implementation of a two-dimensional SRM [2].
References
[1]
M. J. Ablowitz, Z. H. Musslimani, Spectral renormalization method for computing self-localized solutions to nonlinear systems, Opt. Lett. 30 (2005) 2140.
[2]
Z. Musslimani, J. Yang, Self-trapping of light in a two-dimensional photonic lattice, J. Opt. Soc. Am. B 21 (2004) 973.
期刊介绍:
The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper.
Computer Programs in Physics (CPiP)
These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged.
Computational Physics Papers (CP)
These are research papers in, but are not limited to, the following themes across computational physics and related disciplines.
mathematical and numerical methods and algorithms;
computational models including those associated with the design, control and analysis of experiments; and
algebraic computation.
Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.