Skip to content

lymphlib/lymph

Repository files navigation

lymph

discontinuous poLYtopal methods for Multi-PHysics   Open in MATLAB Online

This repository contains a common interface for MATLAB packages using PolyDG methods with several application.

The full documentation of lymph is at https://lymph.bitbucket.io/.

lymph is developed at MOX (The Laboratory for Modeling and Scientific Computing, Department of Mathematics) at Politecnico di Milano. The development of lymph is part of the activities of the project NEMESIS (https://erc-nemesis.eu, P.I.@PoliMI Paola F. Antonietti) and involves the following research group:

Maintainers

How to include lymph in your code

If your MATLAB code (OUTER_REPO from now on) is tracked by a git repository, the easiest way to include lymph in it (and to keep track of its updates) is by creating a git submodule:

  1. If you have not already done it, set up a personal SSH key on your Bitbucket account (instructions here; in most cases, you may start directly from point 3 of such instructions). NB. If you have a Windows system, when generating the keys by ssh-keygen you may need to use .ssh/id_rsa as {ssh-key-name}, that is

    $ ssh-keygen -C "{username@emaildomain.com}" -f 'HOMEPATH/.ssh/id_rsa'

    where HOMEPATH is the full path to your home directory (e.g. c/Users/yourusername). See here for further info.

  2. From the root directory OUTER_REPO of your code (in a clean state, i.e. with no pending modifications to be committed), add lymph as a submodule, by

    $ git submodule add git@bitbucket.org:lymph/lymph.git

    This will create a sub-directory lymph and a file .gitmodules.

  3. Commit the creation of the abovementioned sub-directory and file:

    $ git add .gitmodules lymph/
    $ git commit -m 'Add lymph to my repo'
    $ git push
  4. In the main of your code, the following command adds all lymph code to your path:

    addpath(genpath('lymph'));

    If you want to include only one module (e.g., Core/MeshGeneration):

    addpath(genpath('lymph/Core/MeshGeneration'));
  5. If you want to keep up-to-date with the last version of lymph, from time to time you need to update the submodule. From the root directory OUTER_REPO:

    $ cd lymph
    $ git checkout main
    $ git pull
    $ cd ..
    $ git add lymph
    $ git commit -m 'Update lymph submodule'
  6. If your code is installed in more than one location and you want to retrieve the same version of the submodule that you have elsewhere (e.g., after the update according to point 4), you can simply execute:

    $ git submodule update

    NB: If you are updating the submodule for the first time in a local repository (e.g. you are installing your code on a new machine), the first time you need the --init option:

    $ git submodule update --init

The submodule is itself a git repository: in OUTER_REPO/lymph you can code, commit, create branches, and contribute to lymph!

License

lymph is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License (see LICENSE.md), or (at your option) any later version. lymph is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details, see the GNU Lesser General Public License included in this repository as LICENSE.md or visit the website http://www.gnu.org/licenses/.

Contribution guidelines

  • functions should be named using the CamelCase convention.
  • The blocks corresponding to different physics are ordered as: poroelasticity ('PE'), acoustics ('AC'), elasticity ('EL'), fluid ('FL'), prion spreading ('PS'), thermo-poroelasticity ('TPE'), multi-compartment poroelasticity ('MPE').
  • The code documentation employs Doxygen, thanks to a MATLAB-C++ converter m2cpp.pl written in Perl (see here).
  • To contribute with the addition of a new physics/problem, add a new subdirectory inside Physics.

Useful links and tutorials

Acknowledgments

The developers of lymph acknowledge Prof. Paul Houston and Dr. Giorgio Pennesi for the original implementation of the quadrature-free approach adopted in the library [Antonietti, Houston, Pennesi. Journal of Scientific Computing 77 (2018)].

They acknowledge the support of

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages