GithubHelp home page GithubHelp logo

davidjourdan / fabsim Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 3.0 380 KB

Tools for fabrication & simulation

License: Mozilla Public License 2.0

CMake 0.52% C++ 99.44% C 0.05%
simulation fabrication cpp

fabsim's Introduction

fabsim - Tools for fabrication & simulation

codecov

Fabsim is a small c++14 library comprising different material models for simulating rods, membranes and shells Implemented models include:

  • Discrete Elastic Rods (both for individual rods and rod networks)
  • Discrete Shells
  • Saint-Venant Kirchhoff, neo-hookean and incompressible neo-hookean membrane energies
  • Mass-spring system

These implementations include computation of the energy, gradients and hessian and are all performed using Eigen, the only dependency of this library. If available, fabsim will also make use of OpenMP to assemble the hessian in parallel.

The goal of this library is to provide a simple interface to manipulate material models that might be difficult to implement from scratch without introducing bugs in the derivatives (e.g. the DER model). All models have an energy, gradient and hessian method that take as input a 1D vector stacking all degrees of freedom. These methods can then be used in any optimization library of your choice, see this project for an example.

Due to the stencil-based approach, it is also simple to implement your own material models by deriving from the ElementBase class. Debugging the derivatives is made easy thanks to the finite difference-based tools available in the test suite

How to build

If your project uses CMake, simply add

add_subdirectory("path/to/fabsim")
// ...
target_link_libraries(YOUR_TARGET fabsim)

to your CMakeLists.txt, just make sure you have Eigen installed somewhere.

To get started, you can try the example project

fabsim's People

Contributors

davidjourdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.