Coder Social home page Coder Social logo

charleyschaefer / ziltoidlib Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 2.09 MB

My collection of functions commonly encountered in C/C++ programs for physical modelling and simulation.

License: Other

C 73.71% C++ 0.23% Shell 12.78% CMake 0.25% Gnuplot 5.97% MATLAB 4.27% Makefile 0.09% Python 2.27% TeX 0.42%
structure-factor correlation-function read-data read-column-data header-recognition import-data moments-of-inertia interpolation bisection lattice-structures

ziltoidlib's Introduction

img

ABOUT

Collection of functions commonly encountered in C/C++ programs for physical modelling and simulation. This library does not require external libraries, except for solving some eigenvalue problems (BLAS/LAPACK).

This software is freely distributed under the Apache 2.0 (Version 2.0, January 2004) license WITHOUT WARRANTY, see LICENSE.txt.

FEATURES

Modules

  • Kinetic Monte Carlo
    • Variable step size method
  • LatticeLIB (both C/C++)
    • Periodic and non-periodic simple cubic (sc) and hexagonal close packed (hcp) lattices
    • Transformations (reflect, rotate), finding neighbours within cutoff radius.
    • (in development) Structure to build custom lattices.
  • Mathematics (both C/C++)
    • Fourier (adapted from RosettaCode; for an efficient alternative see e.g. fftw)
    • LUdecomposition (adapted from lawliet89)
    • Polynomial (adapted from uni-koeln)
    • QR decomposition (adapted from jcchurch)
    • Array statistics: min, max, abs, mean, variance, standard deviation
    • (BLAS/LAPACK) Solve eigenvalue problem symmetric matrices
  • Numerical Methods (both C/C++)
    • Interpolation
    • Bisection method
  • Read Text Files (uses String Operations module) (both C/C++)
    • Determine number of header lines, number of columns, number of data lines.
    • Read rows and columns
  • String Operations (both C/C++)
    • Read word from string, count words in a string.

Applications

  • Statistics from file with column data
    • Header recognition
    • min/max, mean, variance, se of mean, median, quartiles
  • Structure Factor
    • Fourier transform to Q space
    • Radial averaging in Q space
    • Radial correlation function
  • Principle Moments of Inertia (uses Mathematics and BLAS/LAPACK)

drawing drawing drawing

Utils

  • Gnuplot demo for producing .eps and .pdf format graphs:
    sudo apt-get install gnuplot
  • GNU Octave / Matlab scripts sudo apt-get install octave

Installation / usage

Download:
Download from here, or clone
git clone https://github.com/CharleySchaefer/ZiltoidLIB

Installation:

Option 1 - Standard C/C++ without external dependencies): The static library can be build for C without external dependencies using
./makeZiltoidLIB.sh
or, equivalently, using
./makeZiltoidLIB.sh --gcc
For C++, the library can by build using
./makeZiltoidLIB.sh --g++

Option 2 - Including external BLAS/LAPACK: (linear algebra libraries)
Install BLAS/LAPACK:
sudo apt-get install libblas-dev liblapack-dev Compile library:
./makeZiltoidLIB.sh --include-lapack

Option 3 - Debugging (for development):
./makeZiltoidLIB.sh -g
Debugging can be done e.g. using valgrind: sudo apt-get install valgrind

Usage:
Include the library in main.c or main.h of custom software using
#include "path-to-ziltoidlib/ZiltoidLIB.h"
Compile the software using
gcc main.c -Lpath-to-ziltoidlib -lZiltoidLIB -lm

ziltoidlib's People

Contributors

charleyschaefer avatar pakketeretet2 avatar

Forkers

pakketeretet2

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.