Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/OpenSees/OpenSees
Browse files Browse the repository at this point in the history
  • Loading branch information
aschellenberg74 committed May 22, 2024
2 parents 5b8b453 + 6a805f7 commit b03abce
Show file tree
Hide file tree
Showing 271 changed files with 17,041 additions and 4,597 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install conan
run: python3 -m pip install conan==1.60.0

Expand Down Expand Up @@ -63,7 +63,36 @@ jobs:
# - name: Verification OpenSeesPyMP
# run: |
# mpiexec -np 2 python ../EXAMPLES/ExamplePython/example_mpi_paralleltruss_explicit.py

build-mac:
name: Mac Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Library
run: |
ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
brew install hdf5
brew install open-mpi
brew install scalapack
- name: Build
run: |
mkdir build
cd build
cmake .. -DMUMPS_DIR=$PWD/../../mumps/build
cmake --build . --target OpenSees -j8
cmake --build . --target OpenSeesPy -j8
mv ./OpenSeesPy.dylib ./opensees.so
- name: Verification OpenSeesPySP
run: |
cd ./EXAMPLES/ExamplePython/
export PYTHONPATH="../../build/"
python3 -c "import sys; print(sys.path)"
python3 example_variable_analysis.py
# Not building on Windows until we can figure out how to use Fortran
# with Github Actions
# build-win32:
Expand All @@ -73,7 +102,7 @@ jobs:
# - name: Checkout sources
# uses: actions/checkout@v2
# with: {ref: cmake-build}
#
#
# - name: Install Conan
# uses: turtlebrowser/get-conan@main
#
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ SRC/interpreter/tclInterpreter
SRC/interpreter/openseespy
SRC/interpreter/openseestcl
filip
PML
CPlaneStrain.h
CPlaneStress.h
CPlaneStress2d.h
Expand All @@ -90,6 +89,5 @@ Concrete.h
forumat.for
build
bin
CMakeListsmy.txt
__pycache__
*.dat
22 changes: 18 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,22 @@ include(OpenSeesFunctions)
# include user config
include(${PROJECT_SOURCE_DIR}/Conf.cmake)

#
# for ubuntu this has to be before the Compiler SPECIFIC stuff below .. go figure!
#

find_package(MPI)



#cmake -DCMAKE_RULE_MESSAGES:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .

#
# Compiler SPECIFIC
#



if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
MESSAGE("COMPILER: Clang")
# set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
Expand Down Expand Up @@ -347,16 +357,20 @@ endif()

if(MKL_FOUND)
message(STATUS "MKL was found.")
set (SCALAPACK_LIBRARIES ${MKL_LIBRARIES})
if (NOT DEFINED SCALAPACK_LIBRARIES)
set (SCALAPACK_LIBRARIES ${MKL_LIBRARIES})
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set (MKL_LPATH ${MKL_ROOT}/lib/intel64)
set (SCALAPACK_LIBRARIES "${MKL_LPATH}/mkl_scalapack_ilp64.lib;${MKL_LPATH}/mkl_intel_ilp64.lib;${MKL_LPATH}/mkl_sequential.lib;${MKL_LPATH}/mkl_core.lib;${MKL_LPATH}/mkl_blacs_intelmpi_ilp64.lib")
endif()
message(STATUS "SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES}")

else()
message(STATUS "MKL NOT found .. user to provide -DSCALAPACK_LIBRARIES=")
message(STATUS "SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES}")

endif()

message(STATUS "SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES}")

#get_cmake_property(_variableNames VARIABLES)
#list (SORT _variableNames)
Expand Down Expand Up @@ -818,4 +832,4 @@ endif()

if (OPS_Use_Dev_Directories)
add_subdirectory("${PROJECT_SOURCE_DIR}/DEVELOPER/")
endif()
endif()
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Dockerfile to build OpenSees
# .. utilizes ubuntu:20.04 LTS as base
# .. it will build sequential version and place in /usr/local/bin

# written: fmk

FROM ubuntu:20.04

SHELL ["/bin/bash", "-c"]

WORKDIR /opensees

ARG versionOpenSees=v3.6.0

RUN cp /etc/apt/sources.list /etc/apt/sources.list~ \
&& sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata git \
&& apt-get install -y sudo \
&& sudo apt install -y cmake gcc g++ gfortran liblapack-dev git python3-pip \
&& pip3 install conan==1.60.1 \
&& git clone --depth 1 --branch hdf5-1_12_2 https://github.com/HDFGroup/hdf5.git \
&& cd hdf5 \
&& ./configure --prefix=/usr/local/hdf5 \
&& make \
&& cd .. \
&& git clone -b $versionOpenSees --single-branch https://github.com/OpenSees/OpenSees.git \
&& cd OpenSees \
&& mkdir build \
&& cd build \
&& conan install .. --build missing \
&& cmake .. \
&& cmake --build . --config Release \
&& cmake --install . \
&& cp -r ./lib/tcl8.6 /usr/local/lib \
&& cd ../.. \
&& rm -fr OpenSees \
&& rm -fr hdf5




2 changes: 1 addition & 1 deletion EXAMPLES/ExampleScripts/RCFrame5.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ set displayMode "displayOFF"
set g 386.4
set P 192
set m [expr $P/$g]
set mR 1.0e6
set mR 0
set PI [expr 2.0 * asin(1.0)]
set period 2.5;
set mag 5.0;
Expand Down
98 changes: 98 additions & 0 deletions EXAMPLES/verification/RatchetTest.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# ------------------------------
# Start of model generation
# ------------------------------

# Remove existing model
wipe

# Create ModelBuilder
model BasicBuilder -ndm 1 -ndf 1

# Create nodes
# ------------

# Create nodes & add to Domain
node 1 0.0
node 2 0.0

# Set the boundary conditions - command: fix nodeID xResrnt?
fix 1 1

# Define materials for truss elements
# -----------------------------------

# Create Elastic material prototype

set Fy 200.0
set E 1000000.0
set fTravel 0.004
set fTravelInitial 0
set RatType 2

#set b -0.1
#uniaxialMaterial Steel01 1 $Fy $E $b
#uniaxialMaterial ElasticPPGap 1 $E $Fy 0.002 0 damage
#uniaxialMaterial GNG 1 $E $Fy $toothSize 0
uniaxialMaterial Ratchet 1 $E $fTravel $fTravelInitial $RatType
uniaxialMaterial Elastic 2 1

# Define elements
# ---------------

# Create element
element zeroLength 1 1 2 -mat 1 -dir 1
element zeroLength 2 1 2 -mat 2 -dir 1

# Define loads
# ------------

set P 300.0
#create a Linear TimeSeries (load factor varies linearly with time): command timeSeries Linear $tag
timeSeries Linear 1

# Create a Plain load pattern with a linear TimeSeries: command pattern Plain $tag $timeSeriesTag { $loads }
pattern Plain 1 1 {

# Create the nodal load - command: load nodeID xForce
load 2 $P
}

# ------------------------------
# Start of analysis generation
# ------------------------------


constraints Transformation
numberer RCM
test NormDispIncr 1.0e-6 6 0
algorithm ModifiedNewton
system BandGeneral
integrator DisplacementControl 2 1 0.001
analysis Static

# create a Recorder object for the nodal displacements at node 2
recorder Node -file RatchetTestOutput.out -time -node 2 -dof 1 disp

#foreach numIter {10 20 10 20} dU {0.001 -0.001 0.001 -0.001} {
#integrator DisplacementControl 2 1 $dU
#analyze $numIter
#set factor [getTime]
#puts "[expr $factor*$P] [lindex [nodeDisp 2] 0]"
#}

#foreach numIter {10 20 10 10 5 10} dU {0.001 -0.001 0.001 0.001 -0.001 0.001} {
#integrator DisplacementControl 2 1 $dU
#analyze $numIter
#set factor [getTime]
#puts "[expr $factor*$P] [lindex [nodeDisp 2] 0]"
#}

foreach numIter {10 20 10 20 10 20 10} dU {0.001 -0.001 0.001 -0.001 0.001 -0.001 0.001} {
integrator DisplacementControl 2 1 $dU
analyze $numIter
set factor [getTime]
puts "[expr $factor*$P] [lindex [nodeDisp 2] 0]"
}

print node 2
print ele
15 changes: 15 additions & 0 deletions SRC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ ELE_LIBS = $(FE)/element/Element.o \
$(FE)/element/mvlem/SFI_MVLEM.o \
$(FE)/element/mvlem/MVLEM_3D.o \
$(FE)/element/mvlem/SFI_MVLEM_3D.o \
$(FE)/element/mvlem/E_SFI_MVLEM_3D.o \
$(FE)/element/mvlem/E_SFI.o \
$(FE)/element/UWelements/Quad4FiberOverlay.o \
$(FE)/element/UWelements/Brick8FiberOverlay.o \
Expand All @@ -674,6 +675,10 @@ ELE_LIBS = $(FE)/element/Element.o \
$(FE)/element/PML/PML3D.o \
$(FE)/element/PML/pml_2d.o \
$(FE)/element/PML/PML2D.o \
$(FE)/element/PML/PML2D_3.o \
$(FE)/element/PML/PML2D_5.o \
$(FE)/element/PML/PML2D_12.o \
$(FE)/element/PML/PML2DVISCOUS.o \
$(FE)/element/RockingBC/RockingBC.o \
$(FE)/element/masonry/MasonPan12.o \
$(FE)/element/masonry/MasonPan3D.o \
Expand Down Expand Up @@ -822,6 +827,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/uniaxial/Dodd_Restrepo.o \
$(FE)/material/uniaxial/DoddRestr.o \
$(FE)/material/uniaxial/STEELDR.o \
$(FE)/material/uniaxial/ContinuumUniaxial.o \
$(FE)/material/uniaxial/PathIndependentMaterial.o \
$(FE)/material/uniaxial/MultiplierMaterial.o \
$(FE)/material/uniaxial/BackboneMaterial.o \
Expand Down Expand Up @@ -857,6 +863,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/uniaxial/ViscoelasticGap.o \
$(FE)/material/uniaxial/SteelBRB.o \
$(FE)/material/uniaxial/GNGMaterial.o \
$(FE)/material/uniaxial/Ratchet.o \
$(FE)/material/uniaxial/GMG_CyclicReinforcedConcrete.o \
$(FE)/material/uniaxial/SMAMaterial.o \
$(FE)/material/uniaxial/SelfCenteringMaterial.o \
Expand All @@ -866,6 +873,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/uniaxial/TDConcreteEXP.o \
$(FE)/material/uniaxial/TDConcreteMC10.o \
$(FE)/material/uniaxial/TDConcreteMC10NL.o \
$(FE)/material/uniaxial/CreepMaterial.o \
$(FE)/material/uniaxial/DegradingPinchedBW.o \
$(FE)/material/uniaxial/HystereticPoly.o \
$(FE)/material/uniaxial/HystereticSmooth.o \
Expand Down Expand Up @@ -946,6 +954,10 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/element/PML/PML3D.o \
$(FE)/element/PML/pml_2d.o \
$(FE)/element/PML/PML2D.o \
$(FE)/element/PML/PML2D_3.o \
$(FE)/element/PML/PML2D_5.o \
$(FE)/element/PML/PML2D_12.o \
$(FE)/element/PML/PML2DVISCOUS.o \
$(FE)/material/nD/eig3.o \
$(FE)/material/nD/CycLiqCP.o \
$(FE)/material/nD/CycLiqCP3D.o \
Expand Down Expand Up @@ -1305,6 +1317,8 @@ DOMAIN_LIBS = $(FE)/domain/component/DomainComponent.o \
$(FE)/domain/pattern/RectangularSeries.o \
$(FE)/domain/pattern/ConstantSeries.o \
$(FE)/domain/pattern/TrigSeries.o \
$(FE)/domain/pattern/MPAccSeries.o \
$(FE)/domain/pattern/RampSeries.o \
$(FE)/domain/pattern/PathSeries.o \
$(FE)/domain/pattern/PeerMotion.o \
$(FE)/domain/pattern/PeerNGAMotion.o \
Expand Down Expand Up @@ -1346,6 +1360,7 @@ ANALYSIS_LIBS = $(FE)/analysis/analysis/Analysis.o \
$(FE)/analysis/analysis/TransientDomainDecompositionAnalysis.o \
$(FE)/analysis/analysis/SubstructuringAnalysis.o \
$(FE)/analysis/analysis/ResponseSpectrumAnalysis.o \
$(FE)/analysis/analysis/SDFAnalysis.o \
$(FE)/analysis/algorithm/SolutionAlgorithm.o \
$(FE)/analysis/algorithm/equiSolnAlgo/EquiSolnAlgo.o \
$(FE)/analysis/algorithm/equiSolnAlgo/Linear.o \
Expand Down
2 changes: 1 addition & 1 deletion SRC/OPS_Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// Description: This file contains global variables used in OpenSees files.
// if you change some of the variables, you must recompile ALL the code.

#define OPS_VERSION "3.5.1"
#define OPS_VERSION "3.6.0"

#ifdef _WIN32
#ifndef _WIN64
Expand Down
Loading

0 comments on commit b03abce

Please sign in to comment.