Giter Site home page Giter Site logo

ruizbaier / dolfinx_mpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jorgensd/dolfinx_mpc

0.0 0.0 0.0 4.19 MB

Extension for dolfinx to handle multi-point constraints.

License: MIT License

CMake 1.52% C++ 43.74% Python 54.17% Dockerfile 0.20% Makefile 0.34% C 0.03%

dolfinx_mpc's Introduction

Multi-point constraints with FEniCS-X

CI status

SonarCloud

Author: Jørgen S. Dokken

This library contains an add-on to FEniCS_X enabling the possibilities of enforce multi-point constraints, such as $u_i =\sum_{j=0,i{\not=}j}^n \alpha_j u_j, i\in I_N$

This can be used to for instance enforce slip conditions strongly.

Consider a linear system of the form $Au=b$, with the additional constraints written on the form $K\hat u=u$, where $K$ is a prolongation matrix, $\hat u$ is the vector of unknowns excluding the $I_N$ entries.

We then solve the system $K^T A K \hat u = K^T b$, where $K^T A K$ is symmetric if $A$ was symmetric.

If we include boundary conditions on the form $u=g$, we assemble the system $K^TAK\hat u = K^T(b-A\hat g)$ where $A\hat g$ is an extension of the boundary condition $g$ to all degrees of freedom.

The library performs custom matrix and vector assembly adding the extra constraints to the set of linear equations. All assemblies are local to the process, and no MPI communication except when setting up the multi point constraints.

These assemblers are written in C++, but have equivalent Python assemblers in the optional dolfinx_mpc.numba module.

Installation

Version 0.3.0 is available as an docker image at DockerHub and can be ran using

docker run -ti -v $(pwd):/root/shared -w /root/shared dokken92/dolfinx_mpc:0.3.0

To install the latest version (master branch), you need to install the latest release of dolfinx. Easiest way to install dolfinx is to use docker. The dolfinx docker images goes under the name dolfinx/dolfinx

To install the dolfinx_mpc-library run the following code from this directory:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build-dir cpp/
ninja -j3 install -C build-dir
pip3 install python/. --upgrade

dolfinx_mpc's People

Contributors

jorgensd avatar garth-wells avatar nate-sime avatar

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.