Coder Social home page Coder Social logo

sanm's Introduction

SANM: A Symbolic Asymptotic Numerical Solver

This repository is the official implementation of the SANM solver described in our paper published at SIGGRAPH 2021.

SANM is a framework that automates and generalizes the Asymptotic Numerical Method (ANM) to solve symbolically represented nonlinear systems via numerical continuation and higher-order approximations (unlike Newtonian methods that essentially use first or second order approximations). In a nutshell, SANM automatically extends a parameterized curve in a high-dimensional space from a given starting point, where the curve is implicitly defined by a symbolically represented function. We are typically interested in solving the endpoint of the curve at a specific parameter value. SANM can be thousands of times faster than Levenberg-Marquardt in solving the endpoint.

Please read our paper for more technical details.

This repository contains the SANM library and its application to mesh deformation problems.

Building

SANM needs a recent compiler that supports C++20. We have only tested SANM on 64-bit Linux systems. We use CMake to build SANM.

The only external dependency is Intel MKL (recently renamed to Intel oneAPI Math Kernel Library (oneMKL)). Other dependencies are included as submodules.

Commands for a fresh build:

git submodule update --init --recursive
mkdir build
cd build
cmake .. -DMKLROOT=/path/to/intel/mkl # or -DONEAPIROOT=/path/to/intel/oneapi
make

Execute ./tests/sanm_tests to run the test cases.

Usage

Use ./fea/fea to run the mesh deformation applications. This program needs some JSON configurations to specify the functionality, the model file, and other parameters.

For example, to computes the deformed Bob model under gravity with SANM:

./fea/fea ../config/sys.json ../config/bob.json`

which generates an output bob-i0-neohookean_i.obj that can be visualized by MeshLab.

To solve the same problem with Newton's energy minimization, run:

./fea/fea ../config/sys.json ../config/bob.json ../config/override_baseline_noproj.json

Reproducing the paper results

The render directory contains the tools for reproducing the results reported in the paper.

cd render

# Step 1: Run comparison for parallel solving
# Run these commands on a machine with at least 32 CPU cores.
mkdir output_parallel
cd output_parallel
../run_armadillo_exprs.sh
../run_cmp_chen2014.sh

# Step 2: Run comparison with Newton's methods
# Change the parallelism (-j4 and -j6) according to hardware configuration
make -f Makefile.cmp_with_baseline -j4
# run the LevMar method, which is too slow so we use more parallel jobs
RUN_LEVMAR=1 make -f Makefile.cmp_with_baseline  -j6

# Step 3: Render the images
# The speed of this step can be improved by running on machines with GPUs.
# Blender is required
pip3 install pymeshlab  # install our python dependency
make -f Makefile.render

# Step 4: Generate tables and plots
# Dependencies: matplotlib pandas seaborn scipy
./gen_table_figs.py

# The outputs are placed in the output directory
ls output

Citation

If SANM is helpful to your research, please cite us as

@article{jia2021sanm,
    title={{SANM}: A Symbolic Asymptotic Numerical Solver with Applications in
        Mesh Deformation},
    author={Jia, Kai},
    journal={{ACM} Transactions on Graphics (Proc. {SIGGRAPH})},
    publisher={ACM},
    year={2021},
    volume={40},
    number={4}
}

sanm's People

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.