Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/DavidJourdan/shrink-morph
16 March 2024, 10:32:01 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/v0.1-alpha
    No releases to show
  • 929e0ee
  • /
  • CMakeLists.txt
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:2afef6cadab63b68267c6bb80bc94ceb1ac32a38
origin badgedirectory badge Iframe embedding
swh:1:dir:929e0ee313556bd963a2bbd40c96773ddbd2e0f1
origin badgerevision badge
swh:1:rev:ff449f8805685122cd6192fd6e21eadae8d97a70
origin badgesnapshot badge
swh:1:snp:1f9dd2f26729a5f24dde6590a096445c9bed730a
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: ff449f8805685122cd6192fd6e21eadae8d97a70 authored by David Jourdan on 26 February 2024, 19:02:51 UTC
remove unused
Tip revision: ff449f8
CMakeLists.txt
cmake_minimum_required(VERSION 3.16)

project(shrink_morph)

# c++ flags
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

### Required dependencies ###

include(FetchContent)

# libigl
FetchContent_Declare(
    libigl
    GIT_REPOSITORY https://github.com/libigl/libigl.git
    GIT_TAG fd16e24391f3a85628999fe67b84a9b2201f2bc2
)

# TinyAD
FetchContent_Declare(
    TinyAD
    GIT_REPOSITORY https://github.com/patr-schm/TinyAD.git
    GIT_TAG 81fab13c3884b787c0f03bbbbb95b0f794e54434
)

# polyscope
FetchContent_Declare(
    polyscope
    GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
    GIT_TAG c772fd9bf05f4d914fbc74fd5f1a69af58687a87
)

# geometry-central
FetchContent_Declare(
    geometry-central
    GIT_REPOSITORY https://github.com/nmwsharp/geometry-central.git
    GIT_TAG b467ce80c4be13b94160f0f579cc71500eae5663
)
FetchContent_MakeAvailable(libigl TinyAD polyscope geometry-central)

### Optional dependencies ###

# OR-Tools
set(ORTOOLS_PATH "/opt/or-tools/") # change this variable to whatever path the binaries have been extracted to
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${ORTOOLS_PATH}") 
find_package(ortools CONFIG)
if(ortools_FOUND)
  message(STATUS "Found OR-Tools")
  add_definitions(-DUSE_ORTOOLS)
  set(EXTRA_LIBS ${EXTRA_LIBS} ortools::ortools)
endif(ortools_FOUND)

# OpenMP
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
  message(STATUS "Found OpenMP")
  set(EXTRA_LIBS ${EXTRA_LIBS}  ${OpenMP_CXX_LIBRARIES})
endif(OpenMP_CXX_FOUND)

# MKL PARDISO 
set(MKL_LINK dynamic)
set(MKL_INTERFACE_FULL intel_lp64)
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
	set(MKL_THREADING intel_thread)
else()
	set(MKL_THREADING gnu_thread)
endif()	
find_package(MKL CONFIG)

if(MKL_FOUND)
  set(EXTRA_LIBS ${EXTRA_LIBS} MKL::MKL)
endif(MKL_FOUND)

# cpp files minus the mains
file(GLOB SRCFILES 
  src/functions.cpp
  src/LocalGlobalSolver.cpp
  src/newton.cpp
  src/parameterization.cpp
  src/path_extraction.cpp
  src/stripe_patterns.cpp
  src/stretch_angles.cpp
  src/simulation_utils.cpp)
  
# Create executables
add_executable(shrink_morph  src/main.cpp ${SRCFILES})
add_executable(shrink_morph_cli  src/cli.cpp ${SRCFILES})
set(EXECUTABLES 
  shrink_morph 
  shrink_morph_cli
)
  
foreach(exec ${EXECUTABLES})
  target_link_libraries(${exec} Eigen3::Eigen geometry-central polyscope TinyAD igl::core ${EXTRA_LIBS})
    
  # Compiler definitions and options
  if(MKL_FOUND)
    target_compile_definitions(${exec} PUBLIC EIGEN_USE_MKL_ALL)
    target_compile_definitions(${exec} PUBLIC USE_PARDISO)
    target_compile_options(${exec} PUBLIC $<TARGET_PROPERTY:MKL::MKL,INTERFACE_COMPILE_OPTIONS>)
    target_include_directories(${exec} PUBLIC $<TARGET_PROPERTY:MKL::MKL,INTERFACE_INCLUDE_DIRECTORIES>)
  endif(MKL_FOUND)

  target_compile_definitions(${exec} PUBLIC DATA_PATH_STR="${CMAKE_CURRENT_SOURCE_DIR}/data/")
  target_compile_options(${exec} PRIVATE $<$<CONFIG:RELEASE>:
    $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:-Ofast>
    $<$<CXX_COMPILER_ID:MSVC>:/Ox>>)

  # reomove annoying Polyscope-related compiler warning
  target_compile_options(${exec} PRIVATE 
    $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:-Wno-nonnull>)
endforeach(exec ${EXECUTABLES})

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top