Skip to content

DavidJourdan/fabsim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Tools for fabrication & simulation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages