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

Raw File Download
Permalink

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
content badge Iframe embedding
swh:1:cnt:5a9e08a09ec983ea95fd605b79c58474eedeaf85
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
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
cmake_minimum_required(VERSION 3.10)

project(diff_stokes_flow)

set(CMAKE_BUILD_TYPE Release)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions("-Wall")
set(GCC_COVERAGE_COMPILE_FLAGS "-Wl,--no-as-needed")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")

# OpenMP.
find_package(OpenMP REQUIRED)
if(OpenMP_CXX_FOUND)
    add_definitions(-DEIGEN_DONT_PARALLELIZE)
endif()

# Pardiso.
option(PARDISO_AVAILABLE "Pardiso" OFF)
if(PARDISO_AVAILABLE)
    add_definitions(-DPARDISO_AVAILABLE)
    add_library(pardiso SHARED IMPORTED)
    set_target_properties(pardiso PROPERTIES
        IMPORTED_LOCATION "$ENV{PARDISO_LIC_PATH}/libpardiso600-GNU720-X86-64.so"
    )
else()
    message("Pardiso not detected.")
endif()

# Include directories.
include_directories("../external/eigen")
include_directories("./core/include")
execute_process(COMMAND bash -c "python3-config --includes|sed 's/-I//g'|awk '{print $1;}'" OUTPUT_VARIABLE PYTHON_INCLUDES)
include_directories(${PYTHON_INCLUDES})

# The core library.
file(GLOB_RECURSE CORE_CPP "./core/src/**/*.cpp")
add_library(diff_stokes_flow_core SHARED ${CORE_CPP})
if(PARDISO_AVAILABLE)
    target_link_libraries(diff_stokes_flow_core pardiso lapack blas OpenMP::OpenMP_CXX pthread m)
else()
    target_link_libraries(diff_stokes_flow_core OpenMP::OpenMP_CXX)
endif()

# Python wrapper library.
file(GLOB_RECURSE PYTHON_BINDING "./core/src/**/*.cpp" "./core/src/py_diff_stokes_flow_core_wrap.cxx")
add_library(py_diff_stokes_flow_core SHARED ${CORE_HEADER} ${PYTHON_BINDING})
if(PARDISO_AVAILABLE)
    target_link_libraries(py_diff_stokes_flow_core pardiso lapack blas OpenMP::OpenMP_CXX pthread m)
else()
    target_link_libraries(py_diff_stokes_flow_core OpenMP::OpenMP_CXX)
endif()

# Demo.
file(GLOB DEMO_CPP "./main.cpp")
add_executable(diff_stokes_flow_demo ${DEMO_CPP})
target_link_libraries(diff_stokes_flow_demo diff_stokes_flow_core)

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