Skip to content

Commit

Permalink
Merge pull request #5 from claudioperez/dmglib
Browse files Browse the repository at this point in the history
Dmglib
  • Loading branch information
claudioperez committed Aug 29, 2021
2 parents fa5fd63 + 7d83518 commit 8ad3426
Show file tree
Hide file tree
Showing 103 changed files with 15,118 additions and 1,863 deletions.
75 changes: 33 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@ endif()

if(WIN32) # NOTE: this will execute for both 32-bit and 64-bit builds.
include(OpenSeesDependenciesWin)

# target_sources(OPS_OS_Specific_libs INTERFACE ${OPS_SRC_DIR}/api/win32Functions.cpp)
#target_link_libraries(OPS_OS_Specific_libs INTERFACE ${CBLAS_LIBRARIES} wsock32 ws2_32)
target_link_libraries(OPS_OS_Specific_libs INTERFACE wsock32 ws2_32)
# =======
add_compile_definitions(_WIN32)
# file(GLOB_RECURSE ops_precompiled CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/Win64/lib/debug/*.lib")
# message("OPS >>> Including the following precompiled libs: '${ops_precompiled}'")
# target_sources(OPS_OS_Specific_libs INTERFACE ${OPS_SRC_DIR}/api/win32Functions.cpp)
target_link_libraries(OPS_OS_Specific_libs INTERFACE ${CBLAS_LIBRARIES} ${ops_precompiled} wsock32 ws2_32)
# target_link_libraries(OPS_OS_Specific_libs INTERFACE ${CBLAS_LIBRARIES} ${ops_precompiled} wsock32 ws2_32)

message(STATUS ">>> WIN32")
endif()

Expand Down Expand Up @@ -97,7 +103,7 @@ enable_language(Fortran)
# C++
#--------------------------------------
#set(CMAKE_CXX_STANDARD 11)
add_link_options(-rdynamic)
#add_link_options(-rdynamic)
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cqls <TARGET> <LINK_FLAGS> <OBJECTS>")

# Warnings
Expand Down Expand Up @@ -195,23 +201,23 @@ include_directories(${OPS_INCLUDE_DIRS})
# Define Targets
#
#==============================================================================
add_library(OPS_Matrix OBJECT)
add_library(OPS_Actor OBJECT)
add_library(OPS_Handler OBJECT)
add_library(OPS_Recorder OBJECT)
add_library(OPS_Tagged OBJECT)
add_library(OPS_Utilities OBJECT)
add_library(OPS_ModelBuilder OBJECT)

add_library(OPS_Numerics INTERFACE)
target_link_libraries(OPS_Numerics INTERFACE
${ARPACK_LIBRARIES}
${SUPERLU_LIBRARIES}
${UMFPACK_LIBRARIES}
${AMD_LIBRARIES}
${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
# Core OpenSees
add_library(OPS_Matrix OBJECT)
add_library(OPS_Actor OBJECT)
add_library(OPS_Handler OBJECT)
add_library(OPS_Recorder OBJECT)
add_library(OPS_Tagged OBJECT)
add_library(OPS_Utilities OBJECT)
add_library(OPS_ModelBuilder OBJECT)
add_library(OPS_Domain OBJECT)
add_library(OPS_SysOfEqn OBJECT)
add_library(OPS_Analysis OBJECT)
Expand All @@ -235,20 +241,20 @@ add_library(OPS_Renderer OBJECT EXCLUDE_FROM_ALL)
# Packaged libraries
add_library(G3)
add_library(OpenSees EXCLUDE_FROM_ALL)
target_sources(OpenSees
PRIVATE
"${OPS_SRC_DIR}/interpreter/OpenSeesBeamIntegrationCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesCrdTransfCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesFrictionModelCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesMiscCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesNDMaterialCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesOutputCommands.cpp"
#"${OPS_SRC_DIR}/interpreter/OpenSeesCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesElementCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesSectionCommands.cpp"
"${OPS_SRC_DIR}/interpreter/OpenSeesUniaxialMaterialCommands.cpp"
"${OPS_SRC_DIR}/renderer/PlainMap.cpp"
)
#target_sources(OpenSees
# PRIVATE
# "${OPS_SRC_DIR}/interpreter/OpenSeesBeamIntegrationCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesCrdTransfCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesFrictionModelCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesMiscCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesNDMaterialCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesOutputCommands.cpp"
# #"${OPS_SRC_DIR}/interpreter/OpenSeesCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesElementCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesSectionCommands.cpp"
# "${OPS_SRC_DIR}/interpreter/OpenSeesUniaxialMaterialCommands.cpp"
# "${OPS_SRC_DIR}/renderer/PlainMap.cpp"
#)

# Executables
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -512,12 +518,11 @@ endif()
message("OPS >>> Configuring OpenSees extensions")
foreach(extension IN LISTS OPS_Element_List OPS_Extension_List)
string(TOUPPER "${extension}" ext_flag)
set(ext_flag "_${ext_flag}")
string(REGEX REPLACE "^OPS_" "OPSDEF_" ext_flag "${ext_flag}")
message(" Adding macro definition '${ext_flag}'")
add_compile_definitions(${ext_flag})
endforeach()

#----------------------------
# Renderer
#----------------------------
if (OPS_Use_Graphics)
Expand All @@ -527,28 +532,14 @@ else()
add_compile_definitions(_NOGRAPHICS)
endif()

#----------------------------
# Reliability
#----------------------------
if (OPS_Use_Reliability)
if ("OPS_Reliability" IN_LIST OPS_Extension_List)
add_compile_definitions(_RELIABILITY)
target_link_libraries(${OPS_FINAL_TARGET} OPS_Reliability)
endif()

#----------------------------
# ASDEA
#----------------------------
if (OPS_Use_ASDEA)
target_link_libraries(${OPS_FINAL_TARGET} OPS_ASDEA)
endif()

#----------------------------
# PFEM
#----------------------------
if (OPS_Use_PFEM)
message("OPS >>> Including OPS_PFEM option")
#target_link_libraries(${OPS_FINAL_TARGET} OPS_PFEM)
endif()

#----------------------------
# HDF5
Expand Down
16 changes: 4 additions & 12 deletions Conf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,9 @@ option(FMK

# Optional Extensions
#--------------------------------------
option(OPS_Use_Reliability
"Include reliability" OFF)


option(OPS_Use_Graphics
"Include graphics" OFF)

option(OPS_Use_PFEM
"Include PFEM library" OFF)

option(OPS_Use_ASDEA
"Include ASDEA library" ON)

option(OPS_Use_DRM
"DRM lib" ON)
Expand All @@ -61,8 +52,8 @@ option(OPS_Use_Thermal
# (e.g. using OPS_Element_truss defines the macro _OPS_ELEMENT_TRUSS)
#==============================================================================
set(OPS_Extension_List

OPS_Reliability # TODO: replace existing tests on '_RELIABILITY'
OPS_ASDEA
#OPS_Reliability # TODO: replace existing tests on '_RELIABILITY'

OPS_NumLib_PETSC
OPS_NumLib_METIS
Expand All @@ -77,14 +68,14 @@ set(OPS_Extension_List
)

set(OPS_Element_List
#OPS_Material_StressDensity

OPS_Element_truss
#OPS_Element_beam2d
OPS_Element_beam3d
OPS_Element_dispBeamColumnInt
OPS_Element_forceBeamColumn
OPS_Element_mixedBeamColumn

#OPS_Element_beamWithHinges
OPS_Element_LHMYS
#OPS_Element_Dmglib
Expand All @@ -107,6 +98,7 @@ set(OPS_Element_List
OPS_Element_shell
OPS_Element_surfaceLoad
OPS_Element_updatedLagrangianBeamColumn
OPS_Element_masonry
#OPS_Element_feap
#OPS_Element_PFEMElement
)
Expand Down
38 changes: 0 additions & 38 deletions ETC/cmake/OpenSeesDependenciesConda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,41 +81,3 @@ opensees_load(MySQL #FIND

set(MYSQL_INCLUDE_DIR "${CONDA_ENV}/Library/include/mysql/")



#==============================================================================
# Select Element Libraries
#
# Each element in this list ows and associated macro definition
#==============================================================================
set(OPS_Element_List
#OPS_Element_PFEMElement
#OPS_Element_beamWithHinges
#OPS_Element_feap
OPS_Element_LHMYS
OPS_Element_PML
OPS_Element_RockingBC
OPS_Element_UP_ucsd
OPS_Element_absorbentBoundaries
OPS_Element_adapter
OPS_Element_beam3d
#OPS_Element_beam2d
OPS_Element_catenaryCable
OPS_Element_componentElement
OPS_Element_dispBeamColumnInt
OPS_Element_forceBeamColumn
OPS_Element_elastomericBearing
OPS_Element_frictionBearing
OPS_Element_generic
OPS_Element_gradientInelasticBeamColumn
OPS_Element_joint
OPS_Element_mixedBeamColumn
OPS_Element_mvlem
OPS_Element_pyMacro
OPS_Element_shell
OPS_Element_surfaceLoad
OPS_Element_truss
OPS_Element_updatedLagrangianBeamColumn
)


87 changes: 20 additions & 67 deletions ETC/cmake/OpenSeesDependenciesWin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@
# (Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html)
#
#==============================================================================
# External Libraries
#
# - BLAS_LIBRARIES
# - BLAS_INCLUDE_DIRS
#
# - LAPACK_LIBRARIES
# - LAPACK_INCLUDE_DIRS
#
# - ARPACK_LIBRARIES
#
# - SUPERLU_LIBRARIES
# - SUPERLU_INCLUDE_DIRS
#
#==============================================================================
# Synopsis
# - opensees_load(<PACKAGE> [BUILD|FIND|SEARCH|PATHS] [<PATHS>])
#
Expand All @@ -30,91 +16,58 @@
# - FIND: Use CMake to find library, fail if not found
# - SEARCH: Try finding library with CMake, build OpenSees
# Version if not found.
# - PATHS: Provide specific paths for library.
# - BUNDLED: Provide specific paths for library.
#
#==============================================================================
set(CONDA_DIR "C:/Users/claud/miniconda3")
set(CONDA_ENV "C:/Users/claud/miniconda3/envs/sim")
set(BUNDLE_LIBS "${PROJECT_SOURCE_DIR}/Win64/lib/debug/")

opensees_load(TCL #FIND
LIBRARY ${CONDA_DIR}/Library/lib/tcl86t.lib
INCLUDE ${CONDA_DIR}/Library/include
opensees_load(TCL
LIBRARY ${CONDA_DIR}/Library/lib/tcl86t.lib
#LIBRARY "${BUNDLE_LIBS}/tcl.lib"
INCLUDE ${CONDA_DIR}/Library/include
)

set(TCL_INCLUDE_PATH ${TCL_INCLUDE_DIRS})
set(TCL_LIBRARY ${TCL_LIBRARIES})

message("TCL: ${TCL_INCLUDE_PATH}")

opensees_load(BLAS #FIND
LIBRARY ${CONDA_ENV}/Library/lib/blas.lib
opensees_load(BLAS
LIBRARY "${BUNDLE_LIBS}/blas.lib"
)

opensees_load(CBLAS #FIND
LIBRARY ${CONDA_ENV}/Library/lib/cblas.lib
INCLUDE ${CONDA_ENV}/Library/include/
opensees_load(CBLAS
LIBRARY "${BUNDLE_LIBS}/cblas.lib"
)

opensees_load(LAPACK #FIND
LIBRARY ${CONDA_ENV}/Library/lib/lapack.lib
INCLUDE ${CONDA_ENV}/Library/include/
opensees_load(LAPACK
LIBRARY "${BUNDLE_LIBS}/lapack.lib"
)

set(ENV{SUPERLU_DIR})
opensees_load(SUPERLU #SEARCH
#set(ENV{SUPERLU_DIR})
opensees_load(SUPERLU
BUNDLED ${OPS_BUNDLED_DIR}/SuperLU_5.1.1/
)

opensees_load(ARPACK SEARCH
BUNDLED ${OPS_BUNDLED_DIR}/ARPACK/
)

opensees_load(AMD
BUNDLED ${OPS_BUNDLED_DIR}/AMD/
)

opensees_load(METIS SEARCH)

opensees_load(HDF5 FIND)

opensees_load(MySQL #FIND
LIBRARY ${CONDA_ENV}/Library/lib/libmysql.lib
INCLUDE ${CONDA_ENV}/Library/include/mysql
LIBRARY ${CONDA_ENV}/Library/lib/libmysql.lib
INCLUDE ${CONDA_ENV}/Library/include/mysql
)

set(MYSQL_INCLUDE_DIR "${CONDA_ENV}/Library/include/mysql/")



#==============================================================================
# Select Element Libraries
#
# Each element in this list ows and associated macro definition
#==============================================================================
set(OPS_Element_List
#OPS_Element_PFEMElement
#OPS_Element_beamWithHinges
#OPS_Element_feap
OPS_Element_LHMYS
OPS_Element_PML
OPS_Element_RockingBC
OPS_Element_UP_ucsd
OPS_Element_absorbentBoundaries
OPS_Element_adapter
OPS_Element_beam3d
#OPS_Element_beam2d
OPS_Element_catenaryCable
OPS_Element_componentElement
OPS_Element_dispBeamColumnInt
OPS_Element_forceBeamColumn
OPS_Element_elastomericBearing
OPS_Element_frictionBearing
OPS_Element_generic
OPS_Element_gradientInelasticBeamColumn
OPS_Element_joint
OPS_Element_mixedBeamColumn
OPS_Element_mvlem
OPS_Element_pyMacro
OPS_Element_shell
OPS_Element_surfaceLoad
OPS_Element_truss
OPS_Element_updatedLagrangianBeamColumn
)


0 comments on commit 8ad3426

Please sign in to comment.