amdis_parallel.cmake 3.15 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
if (ENABLE_PARALLEL_DOMAIN)
    set(PARALLEL_DOMAIN_AMDIS_SRC
        ${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
        ${SOURCE_DIR}/parallel/ParallelDebug.cc
        ${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
    )

    list(APPEND COMPILEFLAGS "-DHAVE_PARALLEL_DOMAIN_AMDIS=1")

    enable_mpi(COMPILEFLAGS AMDIS_INCLUDE_DIRS _)
    enable_petsc(COMPILEFLAGS AMDIS_INCLUDE_DIRS _)

    # add support for the zoltan library
    if (ENABLE_ZOLTAN)
      enable_zoltan(COMPILEFLAGS AMDIS_INCLUDE_DIRS _)
      list(APPEND PARALLEL_DOMAIN_AMDIS_SRC
          ${SOURCE_DIR}/parallel/ZoltanPartitioner.cc)
    endif (ENABLE_ZOLTAN)

    if (ENABLE_BDDCML)
34
      enable_bddcml(COMPILEFLAGS AMDIS_INCLUDE_DIRS _)
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
      list(APPEND PARALLEL_DOMAIN_AMDIS_SRC
          ${SOURCE_DIR}/parallel/BddcMlSolver.cc)
    endif (ENABLE_BDDCML)

    # add some more source-files that need petsc
    list(APPEND PARALLEL_DOMAIN_AMDIS_SRC
        ${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
    )

    if (ENABLE_PARALLEL_SOLVERS)
        list(APPEND PARALLEL_DOMAIN_AMDIS_SRC
            ${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
        )
        list(APPEND COMPILEFLAGS "-DHAVE_PARALLEL_SOLVERS=1")
    endif (ENABLE_PARALLEL_SOLVERS)

    # specify how to install this target:
    # -----------------------------------

    file(GLOB AMDIS_PARALLEL_HEADERS "${SOURCE_DIR}/parallel/*.h")
    install(FILES ${AMDIS_PARALLEL_HEADERS} DESTINATION include/amdis/parallel/)

    install(FILES
73
74
75
76
77
      ${BASE_DIR}/cmake/ResolveCompilerPaths.cmake
      ${BASE_DIR}/cmake/FindPackageMultipass.cmake
      ${BASE_DIR}/cmake/CorrectWindowsPaths.cmake
      ${BASE_DIR}/cmake/FindPETSc.cmake
      DESTINATION share/amdis/)
78
endif (ENABLE_PARALLEL_DOMAIN)