Giter VIP home page Giter VIP logo

glls's Introduction

Introduction

This is a least squares solver for general linear systems. Inspired by the solution of magnetic fields in rotationally symmetric gyrotrons.

Input

The input is written in ascii text, e.g.:

# the name of the unknown vector (only consist of letters)
I
# arbitrary number of name for the Y components of the linear system
# only consist of letters
Bz Br Psi
# the numerical coefficient matrix M 
# Bz0  = M00*I0 + M01*I1 + ...
# Br0  = M10*I0 + M11*I1 + ...
# Psi0 = M20*I0 + M21*I1 + ...
# Bz1  = M30*I0 + M31*I1 + ...
# ....
1   2   3
2   3.3 4
5   6   7
4   4   3e8
# each line contains an equation, can include several ='s
Br0 = 0 = Br1
Bz1 + 5 = Bz0 * 2 + (2 + 4)*Bz3 = (Psi3 + Bz1*2) * 6 = (Bz0 + Bz2)
2*I1 + 1 = (1+2) * 3

Output

After solving the equation of [M][I] = [B], the unknown vector will be given, in the above case the vector I.

glls's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.