{"id":22820848,"url":"https://github.com/gha3mi/forsolver","last_synced_at":"2026-02-12T10:32:30.456Z","repository":{"id":176659756,"uuid":"656872867","full_name":"gha3mi/forsolver","owner":"gha3mi","description":"ForSolver - linear and nonlinear solvers","archived":false,"fork":false,"pushed_at":"2025-09-11T21:52:29.000Z","size":1762,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-12T00:26:19.086Z","etag":null,"topics":["complex-step-differentiation","finite-difference-method","fortran","fortran-package-manager","linear-system-solver","newton-method","newton-raphson","nonlinear-systems","quasi-newton-method","solver"],"latest_commit_sha":null,"homepage":"https://gha3mi.github.io/forsolver/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gha3mi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-21T20:26:21.000Z","updated_at":"2025-09-11T21:51:33.000Z","dependencies_parsed_at":"2023-12-11T22:57:19.445Z","dependency_job_id":"0ec456a2-e11b-40cc-b55c-fb3eefa22a1b","html_url":"https://github.com/gha3mi/forsolver","commit_stats":null,"previous_names":["gha3mi/forsolver"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gha3mi/forsolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gha3mi","download_url":"https://codeload.github.com/gha3mi/forsolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["complex-step-differentiation","finite-difference-method","fortran","fortran-package-manager","linear-system-solver","newton-method","newton-raphson","nonlinear-systems","quasi-newton-method","solver"],"created_at":"2024-12-12T15:42:38.745Z","updated_at":"2026-02-12T10:32:30.445Z","avatar_url":"https://github.com/gha3mi.png","language":"Fortran","readme":"[![GitHub](https://img.shields.io/badge/GitHub-forsolver-blue.svg?style=social\u0026logo=github)](https://github.com/gha3mi/forsolver)\n[![Version](https://img.shields.io/github/v/tag/gha3mi/forsolver?label=version\u0026sort=semver)](https://github.com/gha3mi/forsolver/releases)\n[![Documentation](https://img.shields.io/badge/ford-Documentation%20-blueviolet.svg)](https://gha3mi.github.io/forsolver/)\n[![Setup Fortran Conda CI/CD](https://github.com/gha3mi/forsolver/actions/workflows/CI-CD.yml/badge.svg?branch=main)](https://github.com/gha3mi/forsolver/actions/workflows/CI-CD.yml)\n[![License](https://img.shields.io/github/license/gha3mi/forsolver?color=green)](https://github.com/gha3mi/forsolver/blob/main/LICENSE)\n\n\n**ForSolver**: A Fortran library of linear and nonlinear solvers.\n\n## Usage\n\n### Linear system solver\n\n```fortran\nuse forsolver, only: solve\n\nx = solve(A,b,method)\n```\n\navailable methods (optional):\n\n- ```gesv```\n- ```gels```\n\n### Nonlinear system solver\n\n```fortran\nuse forsolver, only: nlsolver\n\ncall nls%set_options(\u0026\n      lin_method,\u0026\n      nl_method,\u0026\n      fdm_method,\u0026\n      fdm_tol,\u0026\n      cs_tol,\u0026\n      TolFun,\u0026\n      maxit,\u0026\n      nmp,\u0026\n      verbosity )\n\ncall nls%solve(F, dFdx, x0, x_sol)\n```\n\navailable nl_methods:\n\n- ```newton```\n- ```newton-modified```\n- ```newton-quasi-fd```\n- ```newton-quasi-fd-modified```\n- ```newton-quasi-cs```\n- ```newton-quasi-cs-modified```\n\nfd: finite difference method\n\ncs: complex step method\n\n## Requirements\n\n- A Fortran Compiler\n- LAPACK, BLAS or MKL\n- Fortran Package Manager (fpm)\n\n## fpm Dependency\n\nIf you want to use `ForSolver` as a dependency in your own fpm project,\nyou can easily include it by adding the following line to your `fpm.toml` file:\n\n```toml\n[dependencies]\nforsolver = {git=\"https://github.com/gha3mi/forsolver.git\"}\n```\n\n## Examples\n\n### Example 1: Linear System Solver\n\n```fortran\nprogram example1\n\n   use kinds\n   use forsolver\n\n   implicit none\n\n   real(rk), dimension(:,:), allocatable :: A\n   real(rk), dimension(:)  , allocatable :: x, b\n   integer                               :: m,n, i, j\n\n   m = 3\n   n = 2\n\n   allocate(A(m,n),b(m),x(n))\n\n   A(1,:) = [ 1.0_rk, 5.0_rk]\n   A(2,:) = [ 3.0_rk, 1.0_rk]\n   A(3,:) = [-2.0_rk, 4.0_rk]\n\n   b = [4.0_rk, -2.0_rk, 3.0_rk]\n\n   x = solve(A, b)\n\nend program example1\n```\n\n### Example 2: Newton's Method for Root Finding\n\n```fortran\nmodule my_function3\n   use kinds\n   implicit none\ncontains\n   function F1(x) result(F_val)\n      real(rk), intent(in) :: x\n      real(rk) :: F_val\n      F_val = 5.0_rk * x**3 + 8.0_rk * x - 5.0_rk\n   end function F1\n   function dF1dx(x) result(dFdx_val)\n      real(rk), intent(in) :: x\n      real(rk) :: dFdx_val\n      dFdx_val = 15.0_rk * x**2 + 8.0_rk\n   end function dF1dx\nend module my_function3\n\nprogram example2\n\n   use forsolver\n   use my_function3\n\n   implicit none\n\n   type(nlsolver) :: nls\n   real(rk)       :: x, expected_x\n\n   call nls%set_options(\u0026\n      nl_method   = 'newton',\u0026\n      maxit       = 100,\u0026\n      TolFun      = 1e-4_rk,\u0026\n      verbosity   = 1)\n\n   call nls%solve(F=F1, dFdx=dF1dx, x0=10.0_rk, x_sol=x)\n\nend program example2\n```\n\n## CI Status\n\n\u003c!-- STATUS:setup-fortran-conda:START --\u003e\n\u003c!-- STATUS:setup-fortran-conda:END --\u003e\n\n## API Documentation\n\nThe most up-to-date API documentation for the master branch is available\n[here](https://gha3mi.github.io/forsolver/).\nTo generate the API documentation for `ForSolver` using\n[ford](https://github.com/Fortran-FOSS-Programmers/ford) run the following\ncommand:\n\n```shell\nford README.md\n```\n\n## Contributing\n\nContributions to `ForSolver` are welcome!\nIf you find any issues or would like to suggest improvements, please open an issue.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgha3mi%2Fforsolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgha3mi%2Fforsolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgha3mi%2Fforsolver/lists"}