amdis_parallel.cmake 3.39 KB
Newer Older
1
if (ENABLE_PARALLEL_DOMAIN)
2 3 4 5 6 7 8 9 10 11 12
    add_library(amdis_parallel INTERFACE)
    target_sources(amdis PRIVATE
        ${SOURCE_DIR}/parallel/DofComm.cc
        ${SOURCE_DIR}/parallel/CheckerPartitioner.cc
        ${SOURCE_DIR}/parallel/ElementObjectDatabase.cc
        ${SOURCE_DIR}/parallel/InteriorBoundary.cc
        ${SOURCE_DIR}/parallel/MeshDistributor.cc
        ${SOURCE_DIR}/parallel/MeshLevelData.cc
        ${SOURCE_DIR}/parallel/MeshManipulation.cc
        ${SOURCE_DIR}/parallel/MeshPartitioner.cc
        ${SOURCE_DIR}/parallel/MpiHelper.cc
13
        ${SOURCE_DIR}/parallel/ParallelDebug.cc
14 15 16 17 18 19 20
        ${SOURCE_DIR}/parallel/ParallelDofMapping.cc
        ${SOURCE_DIR}/parallel/ParallelProblemStat.cc
        ${SOURCE_DIR}/parallel/ParallelSolver.cc
        ${SOURCE_DIR}/parallel/PeriodicMap.cc
        ${SOURCE_DIR}/parallel/ParMetisPartitioner.cc
        ${SOURCE_DIR}/parallel/StdMpi.cc
    )
21

22 23
    target_compile_definitions(amdis_parallel INTERFACE
	   HAVE_PARALLEL_DOMAIN_AMDIS=1)
24

25 26
    target_enable_mpi(amdis_parallel INTERFACE)
    target_enable_petsc(amdis_parallel INTERFACE)
27 28 29

    # add support for the zoltan library
    if (ENABLE_ZOLTAN)
30 31 32
      target_enable_zoltan(amdis_parallel INTERFACE)
      target_sources(amdis PRIVATE
          ${SOURCE_DIR}/parallel/ZoltanPartitioner.cc)
33 34 35
    endif (ENABLE_ZOLTAN)

    if (ENABLE_BDDCML)
36 37 38
      target_compile_definitions(amdis_parallel INTERFACE HAVE_BDDCML=1)
      target_sources(amdis PRIVATE
          ${SOURCE_DIR}/parallel/BddcMlSolver.cc)
39
    endif (ENABLE_BDDCML)
40

41 42 43 44 45 46 47 48 49 50
    # add some more source-files that need petsc
    target_sources(amdis PRIVATE
        ${SOURCE_DIR}/parallel/MatrixNnzStructure.cc
        ${SOURCE_DIR}/parallel/ParallelCoarseSpaceSolver.cc
        ${SOURCE_DIR}/parallel/PetscHelper.cc
        ${SOURCE_DIR}/parallel/PetscSolver.cc
        ${SOURCE_DIR}/parallel/PetscSolverGlobalMatrix.cc
        ${SOURCE_DIR}/parallel/PetscSolverGlobalBlockMatrix.cc
        ${SOURCE_DIR}/solver/PetscTypes.cc
    )
51

52 53 54 55 56 57 58 59 60 61 62 63 64
    if (ENABLE_PARALLEL_SOLVERS)
        target_sources(amdis PRIVATE
            ${SOURCE_DIR}/parallel/PetscSolverFeti.cc
            ${SOURCE_DIR}/parallel/PetscSolverFetiDebug.cc
            ${SOURCE_DIR}/parallel/PetscSolverFetiMonitor.cc
            ${SOURCE_DIR}/parallel/PetscSolverFetiOperators.cc
            ${SOURCE_DIR}/parallel/PetscSolverFetiTimings.cc
            ${SOURCE_DIR}/parallel/PetscSolverNavierStokes.cc
            ${SOURCE_DIR}/parallel/PetscSolverNSCH.cc
            ${SOURCE_DIR}/parallel/PetscSolverCahnHilliard2.cc
            ${SOURCE_DIR}/parallel/PetscSolverCahnHilliard.cc
            ${SOURCE_DIR}/parallel/PetscSolverSchur.cc
        )
65
        target_compile_definitions(amdis_parallel INTERFACE
66 67
            HAVE_PARALLEL_SOLVERS=1)
    endif (ENABLE_PARALLEL_SOLVERS)
68

69
    target_link_libraries(amdis amdis_parallel)
70

71 72
    # specify how to install this target:
    # -----------------------------------
73

74 75
    file(GLOB AMDIS_PARALLEL_HEADERS "${SOURCE_DIR}/parallel/*.h")
    install(FILES ${AMDIS_PARALLEL_HEADERS} DESTINATION include/amdis/parallel/)
76 77 78 79

    install(FILES
        ${BASE_DIR}/cmake3/ResolveCompilerPaths.cmake
        ${BASE_DIR}/cmake3/FindPackageMultipass.cmake
80 81
        ${BASE_DIR}/cmake3/CorrectWindowsPaths.cmake
        ${BASE_DIR}/cmake3/FindPETSc.cmake
82 83
        ${BASE_DIR}/cmake3/target_enable_petsc.cmake
        ${BASE_DIR}/cmake3/target_enable_zoltan.cmake
84
        DESTINATION share/amdis/)
85
endif (ENABLE_PARALLEL_DOMAIN)