quadgrid 0.1
simple cartesian quad grid with particles for c++/octave
Loading...
Searching...
No Matches
quadgrid - a simple c++ library for particles in a cartesian quad grid

This library provides simple (template) classes that for a useful starting point for the implementation of MPM/PIC methods

License

Most of the code is ditributed under a permissive BSD-2-Clause license. As an exception the GNU Octave interface, which links to GNU Octave libraries is under a GPL (v3 or later) copyleft license.

Contents

The repository consists of the following folders :

  • include contains headers (.h) and template method definition files (`_imp.h) the main files included are
    quadgrid_cpp.h including the declaration of the (template) class quadgrid_t representing the quad grid
    quadgrid_cpp_imp.h contains *out-of-line* definitions for template methods of the quadgrid_t class
    particles.h declares the particles_t clares representing particles embedded in a quadgrid_t grid
  • src contains implementation of methods in the above classes that do not depend on template parameters
  • test provides a few tests and examples
  • tutorial` provides a set of tutorials

Main methods in the particles_t class

  • particles_t::p2g implements transfer of quantities from the particles to the grid according to the formula

    \[ u_i = \sum_p N_i(x_p) U_p \]

  • particles_t::g2p implements transfer of quantities from the particles to the grid according to the formula

    \[ U_p = \sum_i N_i(x_p) u_i \]