Git Product home page Git Product logo

grid2grid's Introduction

Grid2Grid

ECN HOS wrapper program. It generates following flow information from result file of HOS.

 - Wave Elevation
 - Flow Velocity
 - Dynamic Pressure

It needs FFTW third party library. You can download FFTW library from

http://www.fftw.org/download.html

It requires HDF5 third party library (version >= 1.8.16). You can:

How to compile FFTW library

 1. Download FFTW library and Extract

 2. ./configure --prefix=/DOWNLOAD_PATH

 3. make CFLAGS="-fPIC"

 4. make install

 5. ln -s /DOWNLOAD_PATH/lib/fftw3.a /usr/local/lib/fftw3.a
    ln -s /DOWNLOAD_PATH/lib/fftw3.la /usr/local/lib/fftw3.la

How to compile HDF5 library

 1. Download HDF5 library with Cmake and extract

    https://support.hdfgroup.org/HDF5/release/cmakebuild.html 

    download with Unix version    

 2. Add following lines in a file "HDF5options.cmake"

    #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
    ### Create install package with external libraries (szip, zlib)

    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")
    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=ON")

 3. Compile with the following command

    ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log

 4. Check the library exists in a followng path 

     ls build/bin/libhdf5.a build/bin/libhdf5_fortran.a build/bin/libszip.a build/bin/libz.a

 5. make soft link 

    ln -s ..../Cmake-hdf5-x /usr/local/lib/hdf5

 6. Set HDF5_Library path in a "CMakeLists.txt" in Grid2Grid 

    set(HDF5_LIB_PATH /usr/local/lib/hdf5/build/bin)

Install Grid2Grid

There are two ways to compile Grid2Grid. 
   
  1. gnu make 
  2. cmake

It is recommended to use cmake instead of gnu make. Makefile will be deleted in a following update. 

Installation using CMake

  - Instllation without HDF5 library

    cmake -H. -Bbuild 
  
    cmake --build build

  - Installation with HDF5 library (Add the flag: -DHDF_LIBRARY:STRIN="ON")

    cmake -H. -Bbuild -DHDF_LIBRARY:STRING="ON"

    cmake --build build

  - Installation libGrid2Grid on the path $FOAM_USER_LIBBIN (Add the flag -DBUILD_OF_LIB=ON)

    cmake -H. -BbuildOF -DBUILD_OF_LIB=ON -DHDF_LIBRARY:STRING="ON"

    cmake --build buildOF


  Have a look at cbuild.org.

Installation using GNU make

  - Path to Grid2Grid and run following command which you want.

  make
    : compile main.f90, it generates post processing program of Grid2Grid.
      And main.f90 contains some subroutine how to connect Grid2Grid to Fortran Program.

  make createlib
    : make shared library(libGrid2Grid.so) in /obj directory.

grid2grid's People

Contributors

dimbert avatar mgouin avatar naaba avatar zhaobinli avatar

Watchers

James Cloos 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.