Skip to content
Snippets Groups Projects
Select Git revision
  • a36eef78824ebfcf6c100f877cdf0f7b7d5ba6de
  • master default protected
  • hierarchical-basis
  • revert-ef4a3a4f
  • patch_releases_4_14
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

gmm_precond_ilutp.h

Blame
  • CMakeLists.txt 4.20 KiB
    # Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
    #
    # See the LICENSE.txt file for license information. Please report all
    # bugs and problems to the public mailing list <gmsh@onelab.info>.
    
    cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
    if(DEFINED CMAKE_BUILD_TYPE)
      set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type")
    else(DEFINED CMAKE_BUILD_TYPE)
      set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type")
    endif(DEFINED CMAKE_BUILD_TYPE)
    cmake_policy(SET CMP0012 NEW)
    
    if(CMAKE_BUILD_TYPE MATCHES "debug")
      set(_DEBUG TRUE)
    elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
      set(_DEBUG TRUE)
    else()
      set(_DEBUG FALSE)  
    endif(CMAKE_BUILD_TYPE MATCHES "debug")
    
    set(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} -DNONLOCALGMSH")
    set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -DNONLOCALGMSH")
    #not compatible with ABI option of torch
    #if(ENABLE_CXX11)
    #  # in recent cmake versions we could do e.g. set(CMAKE_CXX_STANDARD 11)
    #  set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -std=c++11")
    #else()
    #  set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -std=c++0x")
    #endif(ENABLE_CXX11)
    #set(GLIBCXX_USE_CXX11_ABI 0)
    #set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
    
    if(_DEBUG)
      set(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} -D_DEBUG")
      set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -D_DEBUG")
      #set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -D_DEBUG -Df2cFortran") 
      set(CMAKE_Fortran_FLAGS " ${CMAKE_Fortran_FLAGS} -D_DEBUG")
    endif(_DEBUG)
    if(_DEBUG AND NOT CM3APPS)
      set(LIBNLSNAME "nlsolverDebug")
    else()
      set(LIBNLSNAME "nlsolver")
    endif(_DEBUG AND NOT CM3APPS)
    
    
    
    #project(matFortran Fortran)
    #enable_language(Fortran)
    
    #macro(append_matFortran_src DIRNAME FILES)
    #  foreach(FILE ${FILES})
    #    list(APPEND LIST ${DIRNAME}/${FILE})
    #  endforeach(FILE)
    #  set(MATFOR_SRC ${MATFOR_SRC};${LIST} PARENT_SCOPE)
    #  set(MATFOR_DIRS ${MATFOR_DIRS};${DIRNAME} PARENT_SCOPE)
    #endmacro(append_matFortran_src)
    
    #set(MATFOR_SRC materialLaw/vumat.f)
    #add_library("matfor" STATIC EXCLUDE_FROM_ALL ${MATFOR_SRC})
    project(nlSolver CXX Fortran)
    
    macro(append_nlsolver_src DIRNAME FILES)
      foreach(FILE ${FILES})
        list(APPEND LIST ${DIRNAME}/${FILE})
      endforeach(FILE)
      set(NLSOLVER_SRC ${NLSOLVER_SRC};${LIST} PARENT_SCOPE)
      set(NLSOLVER_DIRS ${NLSOLVER_DIRS};${DIRNAME} PARENT_SCOPE)
    endmacro(append_nlsolver_src)
    
    
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/NonLinearSolverConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/NonLinearSolverConfig.h) 
    
    add_subdirectory(restart)
    add_subdirectory(BoundaryConditions)
    add_subdirectory(contact)
    add_subdirectory(Domain)
    add_subdirectory(field)
    add_subdirectory(Interface)
    add_subdirectory(internalPoints)
    add_subdirectory(materialLaw)
    add_subdirectory(nlTerms)
    add_subdirectory(nlsolver)
    add_subdirectory(space)
    add_subdirectory(periodicBC)
    add_subdirectory(nlmpi)
    add_subdirectory(postPro)
    add_subdirectory(pathFollowing)
    add_subdirectory(modelReduction)
    add_subdirectory(../../gmsh "${CMAKE_CURRENT_BINARY_DIR}/gmsh")
    
    # build a gmsh-dynamic library
    set(ENABLE_BUILD_DYNAMIC ON CACHE BOOL "overided" FORCE)
    set(ENABLE_BAMG OFF CACHE BOOL "overided" FORCE) #BAMG does not compile with c++11...
    # if mpi.h is not found you must define NLSMPIINC in your .bashrc which give your mpi include directory
    include_directories(. ../../gmsh/Solver ../../gmsh/Common ../../gmsh/Geo ../../gmsh/Numeric ../../gmsh/Mesh ../../gmsh/Post ../../gmsh/api  internalPoints nlsolver Interface contact
    materialLaw Domain BoundaryConditions nlTerms field space periodicBC restart nlmpi postPro pathFollowing modelReduction ${GMSH_EXTERNAL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/gmsh/Common ../../gmsh/contrib/gmm
    ${CMAKE_CURRENT_BINARY_DIR} $ENV{NLSMPIINC})
    
    # To have the possibility to use python function in the code
    if(ENABLE_WRAP_PYTHON)
      include_directories(${PYTHON_INCLUDE_DIR})
      add_definitions(-DNLS_WITH_PYTHON)
    endif(ENABLE_WRAP_PYTHON)
    
    file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
    
    if(HAVE_MPI)
      cmake_force_cxx_compiler(${MPI_COMPILER} "MPI C++ Compiler")
    endif(HAVE_MPI)
    
    # build library
    add_library(${LIBNLSNAME} SHARED EXCLUDE_FROM_ALL ${NLSOLVER_SRC})
    target_link_libraries(${LIBNLSNAME} ${EXTERNAL_LIBRARIES} shared)
    #set_target_properties(matfor g2c) 
    #set_target_properties(matfor PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES lg2c)