test using cmake building spectral solver

This commit is contained in:
zhangc43 2016-02-29 15:22:17 -05:00
parent 9d3ca6c2e6
commit 93d8c0045e
2 changed files with 17 additions and 40 deletions

View File

@ -28,38 +28,6 @@ if (NOT DEFINED HDF5_DIR)
message (FATAL_ERROR "HDF5_DIR is not found!" )
endif (NOT DEFINED HDF5_DIR)
# Work around to probe PETSc configuration
# set (petsc_conf_rules "${PETSC_DIR}/lib/petsc/conf/rules")
# set (petsc_conf_variables "${PETSC_DIR}/lib/petsc/conf/variables")
# set (petsc_config_makefile "${DAMASK_SOURCE_DIR}/Makefile.petsc")
# file (WRITE "${petsc_config_makefile}"
# "## This file was autogenerated by FindPETSc.cmake
# # PETSC_DIR = ${PETSC_DIR}
# # PETSC_ARCH = ${PETSC_ARCH}
# include ${petsc_conf_rules}
# include ${petsc_conf_variables}
# show :
# \t-@echo -n \${\${VARIABLE}}
# " )
# macro (PETSC_GET_VARIABLE name var)
# set (${var} "NOTFOUND" CACHE INTERNAL "Cleared" FORCE)
# execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} show VARIABLE=${name}
# OUTPUT_VARIABLE ${var}
# RESULT_VARIABLE petsc_return)
# endmacro (PETSC_GET_VARIABLE)
# petsc_get_variable (PETSC_LIB_DIR petsc_lib_dir)
# petsc_get_variable (PETSC_EXTERNAL_LIB_BASIC petsc_libs_external)
# petsc_get_variable (PETSC_CCPPFLAGS petsc_cpp_line)
# petsc_get_variable (PETSC_INCLUDE petsc_include)
# petsc_get_variable (PCC petsc_cc)
# petsc_get_variable (PCC_FLAGS petsc_cc_flags)
# petsc_get_variable (MPIEXEC petsc_mpiexec)
# # We are done with the temporary Makefile, calling PETSC_GET_VARIABLE after this point is invalid!
# file (REMOVE ${petsc_config_makefile})
# OUTPUT TYPE
set (SPECTRAL OFF)
set (FEM OFF)

View File

@ -76,7 +76,9 @@ add_library (DAMASK_SOURCE "source_thermal_dissipation.f90"
target_link_libraries(DAMASK_SOURCE DAMASK_DRIVERS)
add_library(DAMASK_CONSTITUTIVE "constitutive.f90")
target_link_libraries(DAMASK_CONSTITUTIVE DAMASK_PLASTIC DAMASK_KINEMATICS DAMASK_SOURCE)
target_link_libraries(DAMASK_CONSTITUTIVE DAMASK_PLASTIC )
target_link_libraries(DAMASK_CONSTITUTIVE DAMASK_KINEMATICS)
target_link_libraries(DAMASK_CONSTITUTIVE DAMASK_SOURCE )
add_library(DAMASK_CRYSTALLITE "crystallite.f90")
target_link_libraries(DAMASK_CRYSTALLITE DAMASK_CONSTITUTIVE)
@ -111,12 +113,18 @@ add_library(DAMASK_THERMAL "thermal_isothermal.f90"
target_link_libraries(DAMASK_THERMAL DAMASK_CRYSTALLITE)
add_library(DAMASK_ENGINE "homogenization.f90")
target_link_libraries(DAMASK_ENGINE DAMASK_THERMAL
add_dependencies(DAMASK_ENGINE DAMASK_THERMAL
DAMASK_DAMAGE
DAMASK_VACANCYFLUX
DAMASK_POROSITY
DAMASK_HYDROGENFLUX
DAMASK_HOMOGENIZATION)
target_link_libraries(DAMASK_ENGINE DAMASK_THERMAL )
target_link_libraries(DAMASK_ENGINE DAMASK_DAMAGE )
target_link_libraries(DAMASK_ENGINE DAMASK_VACANCYFLUX )
target_link_libraries(DAMASK_ENGINE DAMASK_POROSITY )
target_link_libraries(DAMASK_ENGINE DAMASK_HYDROGENFLUX )
target_link_libraries(DAMASK_ENGINE DAMASK_HOMOGENIZATION)
add_library(DAMASK_CPFE "CPFEM.f90"
"CPFEM2.f90")
@ -140,6 +148,7 @@ if (SPECTRAL)
target_link_libraries(DAMASK_SPECTRAL_MECH DAMASK_SPECTRAL_UTILITY)
add_executable(DAMASKSpectral.exe DAMASK_spectral.f90)
target_link_libraries(DAMASKSpectral.exe DAMASK_SPECTRAL_BASE
target_link_libraries(DAMASKSpectral.exe DAMASK_CPFE
DAMASK_SPECTRAL_BASE
DAMASK_SPECTRAL_MECH)
endif(SPECTRAL)