Giter Site home page Giter Site logo

harviu / mfa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tpeterka/mfa

0.0 0.0 0.0 6.4 MB

Multivariate Functional Approximation

License: Other

CMake 2.98% Starlark 0.01% C++ 83.18% Python 3.59% Shell 0.16% Dockerfile 0.01% MATLAB 0.02% Makefile 0.04% C 2.21% CSS 0.03% HTML 0.10% Cuda 0.79% Fortran 6.83% XSLT 0.03% JavaScript 0.04%

mfa's Introduction

MFA

Multivariate Functional Approximation (MFA) is a data model based on NURBS high-dimensional tensor products to model scientific data sets.

The key features are:

  • Fitting multivariate spatiotemporal geometry together with multivariate attribute data.
  • Progressively improving the quality of the approximation by locally adding more detail in spatial regions of rapid change (edges, turbulence, discontinuities).
  • Guaranteeing quantified error bounds.
  • A data model based on the MFA can be parallelized and scaled to emerging and future HPC architectures.
  • Applicable in analysis of scientific datasets.

Licensing

MFA is licensed here.

Installation

You can either install MFA using Spack (recommended), or manually.

Installing with Spack

First, install Spack as explained here and add Spack to your path. Next, clone the MFA repository:

git clone https://github.com/tpeterka/mfa

Add MFA to your local Spack installation:

cd /path/to/mfa
spack repo add .

You can confirm that Spack can find MFA:

spack info mfa

Then install MFA. This could take some time depending on whether you already have a Spack system with MPI installed. The first time you use Spack, many dependencies need to be satisfied, which by default are installed from scratch. If you are an experienced Spack user, you can tell Spack to use existing dependencies from elsewhere in your system.

spack install mfa

The default installation is single-threaded (serial), but you can specify different threading models like this:

spack install mfa thread=tbb

TBB is the only threading model currently implemented, but other threading models such as SYCL and Kokkos are being developed.

Installing manually

Build dependencies

Build mfa

git clone https://github.com/tpeterka/mfa
cd mfa
mkdir build
cd build

cmake .. \
-DCMAKE_INSTALL_PREFIX=/path/to/mfa/install \
-DCMAKE_CXX_COMPILER=mpicxx \                                   # optional, set to CC on Cray, default or g++ also works if MPI is correctly found
-Dmfa_thread=tbb \                                              # optional TBB threading, serial (no threading) is the default
-DTBB_INCLUDE_DIR=/path/to/tbb/include \                        # optional, will try to find TBB automatically if mfa_thread=tbb
-DTBB_LIBRARY=/path/to/tbb/library \                            # optional, will try to find TBB automatically if mfa_thread=tbb
-Deigen_thread=true \                                           # optional, OpenMP threading used for some Eigen kernels (requires OpenMP to be available)
-Dpython=true                                                   # optional, build Python bindings

make
make install

Run examples

Many command-line options are available for the examples. Invoke any example with the -h flag to see the available choices. Minimal defaults are included below.

cd /path/to/mfa/install/examples/fixed

# single block, fixed number of control points
./fixed -w 0

# multiple blocks, fixed number of control points
./fixed_multiblock -b 4 -w 0

# adaptive number of control points (single block only so far)
cd path/to/mfa/install/examples/adaptive
./adaptive -e <error_limit, e.g., 1.0e-3> -w 0

# derivatives of a previously computed MFA (single block only so far)
cd /path/to/mfa/install/examples/differentiate
./differentiate -i </path/to/approx.out>

The output file, approx.out, contains the output MFA data model. The output file deriv.out contains the derivatives from the last example. Either output can be converted to VTK format (for visualization) as follows:

/path/to/mfa/install/examples/write_vtk -f </path/to/approx.out/or/deriv.out>

mfa's People

Contributors

dclenz avatar iulian787 avatar tpeterka 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.