Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#
#******************************************************************************

cmake_minimum_required(VERSION 3.5)
project (MantaFlow)
cmake_minimum_required(VERSION 2.8)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/")
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
Expand Down Expand Up @@ -117,15 +117,11 @@ endif()

# translate option into python version string
if(NOT PYTHON_VERSION)
set(PYTHON_VER_ID) # use any...
set(PYTHON_VER_ID 3) # use version 3
else()
set(PYTHON_VER_ID ${PYTHON_VERSION})
endif()

if(OPENVDB AND NOT TBB)
message(FATAL_ERROR "Cannot activate OPENVDB without TBB")
endif()

MESSAGE(STATUS "")
MESSAGE(STATUS "Options - "
" -DDEBUG='${DEBUG}' "
Expand Down Expand Up @@ -387,7 +383,7 @@ if(OPENVDB)
else()
message("Warning - OpenVDB not found, trying default paths")
# might be in path...
list(APPEND F_LIBS Half openvdb tbb)
list(APPEND F_LIBS Imath openvdb tbb)
endif()
endif()

Expand All @@ -399,7 +395,7 @@ if(OPENVDB)
list(APPEND INCLUDE_PATHS ${HOUDINI_INCLUDE_DIRS})
list(APPEND INCLUDE_PATHS ${HOUDINI_INCLUDE_DIRS}/OpenEXR)
list(APPEND F_LIB_PATHS ${HOUDINI_LIBRARY_DIRS})
list(APPEND F_LIBS "Half.lib")
list(APPEND F_LIBS "Imath.lib")
endif()
else()
# for open exr - should be in the default path, add includes if necessary
Expand Down
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Mantaflow #

Mantaflow is an open-source framework targeted at fluid simulation research in Computer Graphics.
Its parallelized C++ solver core, python scene definition interface and plugin system allow for quickly prototyping and testing new algorithms.
Its parallelized C++ solver core, python scene definition interface and plugin system allow for quickly prototyping and testing new algorithms.

In addition, it provides a toolbox of examples for deep learning experiments with fluids. E.g., it contains examples
how to build convolutional neural network setups in conjunction with the [tensorflow framework](https://www.tensorflow.org).
Expand All @@ -11,3 +11,42 @@ For more information on how to install, run and code with Mantaflow, please head

![mantaflow logo](resources/mantaflow-logo1.png)

## Building from source ##

This installation guide focusses on Ubuntu 24.04 as a distribution. The process will however look very similar with other distributions, the main differences being the package manager and library package names.

First, install a few pre-requisites:

sudo apt install pt-get install cmake g++ git python3-dev qt5-qmake libqt5opengl5-dev libtbb-dev libopenvdb-dev

If you want to enable CUDA support, additionally get the latest toolkit from nVidia, and install the appropriate developer driver (be careful though, these driver tend to wreck X11 - get some installation instructions from the web if this is the first time you install CUDA on Linux)

Then, change to the directory to install the source code in, and obtain the current sources from the repository (or alternatively download and extract a source code package)

git clone https://github.com/thunil/mantaflow.git

To build the project using CMake, set up a build directory and choose the build options (explanation):

mkdir mantaflow/build
cd mantaflow/build
cmake .. -DGUI=ON -DOPENVDB=ON
make -j8

To build Mantaflow with OpenVDB and Threading Building Blocks (TBB) support, you need to disable GUI. There is an issue with duplicated symbols between Qt and Threading Building Blocks (TBB):

cmake .. -DTBB=ON -DOPENVDB=ON

That's it! You can now test mantaflow using an example scene

./manta ../scenes/simpleplume.py

## Run tests ##

Generate reference date and run tests:

cd tools/tests
MANTA_GEN_TEST_DATA=1 ./runTests.py ../../build/manta

Run tests:

./runTests.py ../../build/manta
2 changes: 1 addition & 1 deletion tensorflow/example2_liquid/tf_train.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/python3

# ----------------------------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion tools/getGitVersion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import os
import shutil
import sys
Expand Down
2 changes: 1 addition & 1 deletion tools/tests/quickRunTfTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# assume it's called from tools/tests
os.chdir("../../tensorflow")

pyExe = "python"
pyExe = "python3"
mantaExe = "/Users/sinithue/devel/manta/buildMaster/manta"
dataPath = "./data"

Expand Down
2 changes: 1 addition & 1 deletion tools/tests/runTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Simple script to run all base tests
# The test scripts are named test_XXXX_description.py
Expand Down