# Medusa: coordinate free implementation of meshless methods

C++ library for solving PDEs with an intuitive syntax.

## § The Medusa Library

Medusa is an open source C++ library for solving partial differential equations (PDEs) using meshless methods. It enables the user to solve problems in complex domains in an intuitive and effective manner. The library is designed to promote readability while retaining the capability to solve problems effectively. Its aim is to provide the tools necessary to translate mathematical formulations of problems to C++ code in a clear and concise manner. The live demo below showcases some of the features.

### § Live demo

Use the canvas area below to see our library in action. By clicking the points on the canvas, you define a polygon domain $\Omega$. The library then automatically discretizes the domain and solves the problem \begin{align*} -\nabla^2 u &= 1 && \text{in } \Omega, \\ u &= 0 && \text{on } \partial \Omega. \end{align*} The values of the numerical solution at computational nodes are plotted over the drawn polygon.

The live demo of Medusa library is available for desktop browsers only.

A part of the source file for the above demonstration is shown below. The following lines define the problem in C++ code by directly translating the mathematical formulation above.

for (int i : domain.interior()) {
-op.lap(i) = 1.0;
}
for (int i : domain.boundary()) {
op.value(i) = 0.0;
}


To see more examples of problem definitions, see the features page. For explanation how the problem in the live demo is solved, see the tutorial.

### § Installation and documentation

Medusa is available for Linux and Mac operating systems and can easily be included in your C++ cmake project as a subdirectory. You can get the latest version of Medusa from our download page. To help you get started, we have written a short tutorial and extensive documentation is provided in the form of a complete API reference and numerous examples on our wiki page.