Revision 55eb7c0f3a9d58a50c1a09c2231177b81e0da84e authored by Tao Du on 11 December 2020, 03:55:44 UTC, committed by GitHub on 11 December 2020, 03:55:44 UTC
1 parent 88877ba
Raw File
install.sh
cd external/
mkdir -p pbrt_build
cd pbrt_build
cmake ../pbrt-v3
make -j4
cd ../../

# Generate python binding.
cd cpp/core/src
swig -c++ -python py_diff_stokes_flow_core.i

# Compile c++ code.
cd ../../
mkdir -p build
cd build
if [ $# -eq 0 ]
then
    cmake -DPARDISO_AVAILABLE=OFF ..
else
    cmake -DPARDISO_AVAILABLE=ON ..
fi
make -j4
./diff_stokes_flow_demo

# Python binding.
cd ../core/src/
mv py_diff_stokes_flow_core.py ../../../python/py_diff_stokes_flow/core
mv ../../build/libpy_diff_stokes_flow_core.so ../../../python/py_diff_stokes_flow/core/_py_diff_stokes_flow_core.so

# Log absolute path.
cd ../../../
root_path=$(pwd)
printf "root_path = '%s'\n" "$root_path" > python/py_diff_stokes_flow/common/project_path.py
back to top