Skip to content

Commit

Permalink
Merge pull request #5 from TeroFrondelius/gurson
Browse files Browse the repository at this point in the history
Gurson porous UMAT building added, implements #4
  • Loading branch information
TeroFrondelius authored Oct 14, 2019
2 parents 9704b37 + 63d6407 commit f9511eb
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using BinaryBuilder

name = "umat_binaries"
version = v"0.1.0"
version = v"0.2.0"

# Collection of sources required to build umat_binaries
sources = [
Expand All @@ -21,7 +21,11 @@ sources = [

# The above is the original but for some reason sourceforge blogged the trafic
"https://github.com/TeroFrondelius/umat_binaries_builder/releases/download/v0.3.1/parafem-code-r2281-trunk-parafem-src-umats-dp.zip" =>
"114d5773e806de0070eee7379131ceae25c3516fb49b8e3fb8f0f9e1926717bf"
"114d5773e806de0070eee7379131ceae25c3516fb49b8e3fb8f0f9e1926717bf",

# Gurson model from UMAT.jl/umat_models
"https://github.com/JuliaFEM/UMAT.jl.git" =>
"0225216125884a4a9439d5444221be450e9d9212"

]

Expand Down Expand Up @@ -58,15 +62,41 @@ cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=/opt/$target/$target
make
make install
# From this forward is Gurson model building
cd UMAT.jl/umat_models
sed -i 's/CALL ROTSIG(/!CALL ROTSIG(/g' gurson_porous_plasticity.f90
if [[ ${nbits} == 64 ]]; then
export OB=openblas64_
sed -i 's/call dgesv(/call dgesv_64(/g' gurson_porous_plasticity.f90
else
export OB=openblas
fi
cat >CMakeLists.txt <<EOL
cmake_minimum_required(VERSION 3.5)
project(Umat)
set(VERSION 0.1.0)
enable_language(Fortran)
set(CMAKE_Fortran_FLAGS "-fdefault-real-8")
add_library(gurson_porous_plasticity SHARED gurson_porous_plasticity.f90)
target_link_libraries(gurson_porous_plasticity $OB)
install(TARGETS gurson_porous_plasticity DESTINATION lib)
EOL
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=/opt/$target/$target.toolchain
make
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, libc=:glibc),
Windows(:x86_64),
MacOS(:x86_64),
Windows(:i686),
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Expand All @@ -85,12 +115,13 @@ products(prefix) = [
LibraryProduct(prefix, "libmises_umat", :mises_umat),
LibraryProduct(prefix, "libelastic", :elastic),
LibraryProduct(prefix, "libisotropic_plast_exp", :isotropic_plast_exp),
LibraryProduct(prefix, "libisotropic_plast_imp", :isotropic_plast_imp)
LibraryProduct(prefix, "libisotropic_plast_imp", :isotropic_plast_imp),
LibraryProduct(prefix, "libgurson_porous_plasticity", :gurson_porous_plasticity)
]

# Dependencies that must be installed before this package can be built
dependencies = [

"https://github.com/JuliaLinearAlgebra/OpenBLASBuilder/releases/download/v0.3.0-3/build_OpenBLAS.v0.3.0.jl"
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down

0 comments on commit f9511eb

Please sign in to comment.