This library provides simple (template) classes that for a useful starting point for the implementation of MPM/PIC methods
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.
The repository consists of the following folders :
includecontains headers (*.h) and template method definition files (*_imp.h) the main files included arequadgrid_cpp.hincluding the declaration of the (template) classquadgrid_trepresenting the quad gridquadgrid_cpp_imp.hcontains out-of-line definitions for template methods of thequadgrid_tclassparticles.hdeclares theparticles_tclares representing particles embedded in aquadgrid_tgrid
srccontains implementation of methods in the above classes that do not depend on template parameterstestprovides a few tests and examplesoctaveprovides a draft of an interface for accessing quadgrid objects from within the GNU Octave interpreter, which consists ofquadgrid.hdefining thequadgridclass inheriting fromoctave_base_valuequadgrid.ccdefines two Octave functionsquadgridandquadgrid_loopaccessible from the interpreter
To build the examples move to the test directory and run
mpicxx -std=c++17 -I../include -o particle_sort_example particle_sort_example.cpp ../src/particles.cpp
particles_t::p2gimplements transfer of quantities from the particles to the grid according to the formula
particles_t::g2pimplements transfer of quantities from the particles to the grid according to the formula