Giter Site home page Giter Site logo

fiolj / numfor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from numericfor/numfor

0.0 0.0 0.0 2.87 MB

Numeric Modern Fortran

Makefile 0.72% Shell 0.01% Python 0.51% Perl 1.03% Fortran 69.02% C++ 25.85% Pascal 0.13% HTML 0.71% SourcePawn 1.98% C 0.03%

numfor's Introduction

Numeric Modern Fortran

The goal of this project is to create a Fortran library similar to Numpy/Scipy for scientific computing.

This library consists (or rather will eventually consist) of several modules to ease the scientific work. It aims to provide user-friendly utilities and relatively-efficient routines for scientific computing, numerical and related work.

Documentation

Documentation may be found in https://numericfor.github.io/numfor/index.html

Further information on the capabilities of the library may be learned by exploring the different modules.

It provides:

  • A "submodule" Utils with basic, non-specific, functionality used in many (most?) scientific programs.
  • A "submodule" Array_utils with basic functionality to work with arrays, including generation of grids, search of elements and sorting.
  • A "submodule" Interpolate with routines to perform interpolation, fitting of data, and some work on polynomials.
  • A "submodule" Integrate with routines to perform integration of real and complex functions, and of sampled data.

Installation

Firstly, download the library:

  • git clone https://github.com/numericfor/numfor.git

The installation follow the usual steps. The simpler procedure is:

  • cd numfor

  • make Builds the module information file and static library

  • make tests (optional, not yet fully implemented) Run tests on submodules

  • make install Installs the library, modules and documentation into <prefix> path

Use

Simply compile your program with flags indicating where to find libnumfor.mod and link to libnumfor.a There are different ways to accomplish this:

  1. Manually adding the information when compiling. For instance, when using gfortran
$> gfortran -c -o myprog.o -I <prefix>/include/numfor myprog.f90
$> gfortran -o myprog -L <prefix>/lib -lnumfor myprog.o
  1. Using pkg-config
$> gfortran [your FFLAGS] -c -o myprog.o $(pkg-config --cflags numfor) myprog.f90
$> gfortran -o myprog myprog.o $(pkg-config --libs numfor)

or, simply in one step:

$> gfortran [your FFLAGS] -o myprog $(pkg-config --cflags numfor) myprog.f90 $(pkg-config --libs numfor)

In order to work, first the environment variable PKG_CONFIG_PATH must be set. For instance, in linux you have to add to $HOME/.bashrc (or site /etc/bashrc if you install for all users) the folowing line:

export PKG_CONFIG_PATH="<prefix>/lib/pkgconfig:$PKG_CONFIG_PATH"

You will have to open a new terminal or source the bashrc file before compiling your program.

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.