Coder Social home page Coder Social logo

shtawa's Introduction

Shtawa

Numerical analysis dydactical library for modern Fortran. The goal of the library is to contain well-documented and well-tested functions and subroutines, with examples and notes about the theory behind each method and its limitations. The goal is not to produce the most efficient implementation.

Dependencies

Library itself: gfortran compliant with the 2008+ standard. Some examples use Python (matplotlib, numpy) for plotting.

Installation

Clone the repository or download it. Then, go inside the main directory (cd path_to_shtawa_repo) and compile the main library with make. This produces a shared object (.o) and a module file (.mod) in the directory bin/. To clear the compilation, do make clean.

Shtawa is composed of functions and subroutines ("procedures") which try to be dependency-free, so that their source code can be reused in other projects if needed. They are classified in directories by topic:

Directory Topic
roots/ Root-finding algorithms (solutions to equations)
linalg/ Linear algebral (matrices, linear systems of equations)
interp/ Interpolation (1d and Nd linear, cubic spline)
combinatorics/ recursive generation of cominations, permutations, etc.
ode/ Ordinary differential equations

In a Fortran source file, the procedures are accessible by a module use shtawa and including the binary objects during compilation (see the makefiles in the examples/ directories for reference on how to link the library to your source code).

Use and examples

The examples/ directory contains examples of use of every function and subroutine in the library, organized by topic. To compile an example (e.g. examples/roots/bisection_example.f90) go to its directory (e.g. examples/roots/) and do make example_name (in this example, make bisection_example). This produces a binary called example_name.bin (e.g., bisection_example.bin) that can be run with ./example_name.bin. See inside of each example for details on their inputs and outputs. To remove the binaries, do make clean. Some binaries create data, which is stored by default in a data/ folder. To remove the data from all examples, do make clean_data

Name

(Shtáwa) "To count" in Chirripo Cabécar language (http://www.ggc.cr/cabecar/diccionario/esp-cab/)

License

BSD-0 License (essentially public domain)

Copyright (C) 2022 by André Oliva

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

shtawa's People

Contributors

gandreoliva avatar

Watchers

 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.