Skip to content

Commit 40cb2ec

Browse files
Merge branch 'OpenSees:master' into master
2 parents 5626402 + f9033e0 commit 40cb2ec

68 files changed

Lines changed: 4705 additions & 73 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_cmake.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ jobs:
160160
export PYTHONPATH="./build/lib/"
161161
python3 -c "import sys; print(sys.path)"
162162
python3 ./EXAMPLES/ExamplePython/example_variable_analysis.py
163+
- name: Run pytest in tests/ folder
164+
run: |
165+
python3 -m pip install pytest
166+
cp build/lib/opensees.so tests/
167+
cd tests
168+
pytest -v
163169
- name: Upload Artifacts
164170
uses: actions/upload-artifact@v4
165171
with:

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ add_subdirectory("${PROJECT_SOURCE_DIR}/OTHER/ARPACK")
287287
set (ARPACK_LIBRARIES ARPACK)
288288
add_subdirectory("${PROJECT_SOURCE_DIR}/OTHER/CSPARSE")
289289
set (CSPARSE_LIBRARIES CSPARSE)
290+
add_subdirectory("${PROJECT_SOURCE_DIR}/OTHER/ITPACK")
291+
set (ITPACK_LIBRARIES ITPACK)
290292
add_subdirectory("${PROJECT_SOURCE_DIR}/OTHER/tetgen1.4.3")
291293
set (TETGEN_LIBRARIES tet)
292294
add_subdirectory("${PROJECT_SOURCE_DIR}/OTHER/Triangle")
@@ -406,7 +408,7 @@ target_link_libraries(OPS_Numerics INTERFACE
406408
${TETGEN_LIBRARIES}
407409
${TRIANGLE_LIBRARIES}
408410
${AMD_LIBRARIES}
409-
${AMD_LIBRARIES}
411+
${ITPACK_LIBRARIES}
410412
${LAPACK_LIBRARIES}
411413
${EIGENAPI_LIBRARIES}
412414
)

OTHER/ITPACK/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
To compile test problem, `dtst2c.f`
2+
3+
```console
4+
gfortran -o myprogram dtst2c.f dsrc2c.f jcg.f jsi.f rscg.f rssi.f sor.f ssorcg.f ssorsi.f -lblas
5+
```
6+
7+
Additional compilation notes
8+
9+
+ Rename `IRAND` to `IRANDBLH` (due to name conflict)
10+
+ Changed line 1 to `PROGRAM ITPTST` (removed args)

OTHER/ITPACK/dtst2c.f

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROGRAM ITPTST (OUTPUT,TAPE6=OUTPUT)
1+
PROGRAM ITPTST
22
C
33
C CHANGES TO BE MADE FOR USE ON DIFFERENT COMPUTERS:
44
C 1. REMOVE OR CHANGE PROGRAM LINE ABOVE OR OPEN LINE BELOW
@@ -1608,7 +1608,7 @@ SUBROUTINE SETPER (P,IP)
16081608
C
16091609
DO 10 I = 1,N
16101610
P(I) = I
1611-
IP(I) = IRAND(1,N,ISEED)
1611+
IP(I) = IRANDBLH(1,N,ISEED)
16121612
10 CONTINUE
16131613
C
16141614
RETURN
@@ -1657,8 +1657,8 @@ SUBROUTINE SETSYS (IA,JA,A,RHS,P,IP,ROW,IROW,IWKSP)
16571657
C STORE SYMMETRIC SYSTEM OFF-DIAGONAL ELEMENTS
16581658
C
16591659
DO 90 K = 1,NZRED
1660-
70 I = IRAND(1,NRED,ISEED)
1661-
J = IRAND(NRED+1,N,ISEED)
1660+
70 I = IRANDBLH(1,NRED,ISEED)
1661+
J = IRANDBLH(NRED+1,N,ISEED)
16621662
PI = MIN0(P(I),P(J))
16631663
PJ = MAX0(P(I),P(J))
16641664
VAL = -DBLE(RANDOM(ISEED))
@@ -1681,8 +1681,8 @@ SUBROUTINE SETSYS (IA,JA,A,RHS,P,IP,ROW,IROW,IWKSP)
16811681
C STORE NONSYMMETRIC SYSTEM OFF-DIAGONAL ELEMENTS
16821682
C
16831683
DO 130 K = 1,NZRED
1684-
120 I = IRAND(1,NRED,ISEED)
1685-
J = IRAND(NRED+1,N,ISEED)
1684+
120 I = IRANDBLH(1,NRED,ISEED)
1685+
J = IRANDBLH(NRED+1,N,ISEED)
16861686
PI = P(I)
16871687
PJ = P(J)
16881688
VAL = -DBLE(RANDOM(ISEED))
@@ -1693,8 +1693,8 @@ SUBROUTINE SETSYS (IA,JA,A,RHS,P,IP,ROW,IROW,IWKSP)
16931693
ROW(PI) = ROW(PI)-VAL
16941694
130 CONTINUE
16951695
DO 150 K = 1,NZBLK
1696-
140 I = IRAND(NRED+1,N,ISEED)
1697-
J = IRAND(1,NRED,ISEED)
1696+
140 I = IRANDBLH(NRED+1,N,ISEED)
1697+
J = IRANDBLH(1,NRED,ISEED)
16981698
PI = P(I)
16991699
PJ = P(J)
17001700
VAL = -DBLE(RANDOM(ISEED))
@@ -1731,7 +1731,7 @@ SUBROUTINE SETSYS (IA,JA,A,RHS,P,IP,ROW,IROW,IWKSP)
17311731
IF (IER.NE.0) STOP
17321732
C
17331733
DO 190 K = 1,N,5
1734-
NBIG = IRAND(1,N,ISEED)
1734+
NBIG = IRANDBLH(1,N,ISEED)
17351735
RHS(NBIG) = EVAL+RHS(NBIG)
17361736
PI = NBIG
17371737
PJ = NBIG
@@ -2036,7 +2036,7 @@ SUBROUTINE CHKNRM (U,WKSP,DIGIT)
20362036
C
20372037
RETURN
20382038
END
2039-
INTEGER FUNCTION IRAND (I,J,ISEED)
2039+
INTEGER FUNCTION IRANDBLH (I,J,ISEED)
20402040
C
20412041
C*****************************************************************
20422042
C
@@ -2049,7 +2049,7 @@ INTEGER FUNCTION IRAND (I,J,ISEED)
20492049
C
20502050
C====================================================================
20512051
C
2052-
IRAND = IFIX(FLOAT(J-I+1)*RANDOM(ISEED))+I
2052+
IRANDBLH = IFIX(FLOAT(J-I+1)*RANDOM(ISEED))+I
20532053
C
20542054
RETURN
20552055
END

SRC/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ RECORDER_LIBS = $(FE)/recorder/Recorder.o \
433433
$(FE)/recorder/ElementRecorderRMS.o \
434434
$(FE)/recorder/NodeRecorderRMS.o \
435435
$(FE)/recorder/MPCORecorder.o \
436-
$(FE)/recorder/VTK_Recorder.o \
437-
$(FE)/recorder/VTKHDF_Recorder.o \
436+
$(FE)/recorder/VTK_Recorder.o
438437

439438

440439
DATABASE_LIBS = $(FE)/database/FileDatastore.o \
@@ -778,6 +777,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
778777
$(FE)/material/uniaxial/Neoprene.o \
779778
$(FE)/material/uniaxial/ASD_SMA_3K.o \
780779
$(FE)/material/uniaxial/ASDConcrete1DMaterial.o \
780+
$(FE)/material/uniaxial/ASDSteel1DMaterial.o \
781781
$(FE)/material/uniaxial/Concrete01.o \
782782
$(FE)/material/uniaxial/Concrete02.o \
783783
$(FE)/material/uniaxial/Concrete02IS.o \
@@ -889,6 +889,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
889889
$(FE)/material/uniaxial/TDConcreteMC10.o \
890890
$(FE)/material/uniaxial/TDConcreteMC10NL.o \
891891
$(FE)/material/uniaxial/CreepMaterial.o \
892+
$(FE)/material/uniaxial/CreepShrinkageACI209.o \
892893
$(FE)/material/uniaxial/DegradingPinchedBW.o \
893894
$(FE)/material/uniaxial/HystereticPoly.o \
894895
$(FE)/material/uniaxial/HystereticSmooth.o \
@@ -1327,6 +1328,7 @@ DOMAIN_LIBS = $(FE)/domain/component/DomainComponent.o \
13271328
$(FE)/domain/load/Beam2dPointLoad.o \
13281329
$(FE)/domain/load/Beam2dTempLoad.o \
13291330
$(FE)/domain/load/Beam2dThermalAction.o \
1331+
$(FE)/domain/load/BeamUniformMoment.o \
13301332
$(FE)/domain/load/NodalThermalAction.o \
13311333
$(FE)/domain/load/ThermalActionWrapper.o \
13321334
$(FE)/domain/load/Beam3dThermalAction.o \

SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#include "TensionOnlyMaterial.h"
7575
#include "ASD_SMA_3K.h"
7676
#include "ASDConcrete1DMaterial.h"
77+
#include "ASDSteel1DMaterial.h"
7778
#include "Concrete01.h"
7879
#include "Concrete01WithSITC.h"
7980
#include "Concrete02.h"
@@ -589,6 +590,7 @@
589590
#include "Beam2dPointLoad.h"
590591
#include "Beam3dUniformLoad.h"
591592
#include "Beam3dPointLoad.h"
593+
#include "BeamUniformMoment.h"
592594
#include "BrickSelfWeight.h"
593595
#include "SelfWeight.h"
594596
#include "SurfaceLoader.h"
@@ -1364,6 +1366,9 @@ FEM_ObjectBrokerAllClasses::getNewElementalLoad(int classTag)
13641366

13651367
case LOAD_TAG_Beam3dPointLoad:
13661368
return new Beam3dPointLoad();
1369+
1370+
case LOAD_TAG_BeamUniformMoment:
1371+
return new BeamUniformMoment();
13671372

13681373
case LOAD_TAG_BrickSelfWeight:
13691374
return new BrickSelfWeight();
@@ -1734,6 +1739,9 @@ FEM_ObjectBrokerAllClasses::getNewUniaxialMaterial(int classTag)
17341739
case MAT_TAG_ASDConcrete1DMaterial:
17351740
return new ASDConcrete1DMaterial();
17361741

1742+
case MAT_TAG_ASDSteel1DMaterial:
1743+
return new ASDSteel1DMaterial();
1744+
17371745
case MAT_TAG_Concrete01:
17381746
return new Concrete01();
17391747

SRC/classTags.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@
259259
#define MAT_TAG_PipeMaterial 232
260260
#define MAT_TAG_TzSandCPT 233
261261
#define MAT_TAG_QbSandCPT 234
262+
#define MAT_TAG_ASDSteel1DMaterial 235
263+
#define MAT_TAG_CreepShrinkageACI209 236
262264

263265
#define MAT_TAG_FedeasMaterial 1000
264266
#define MAT_TAG_FedeasBond1 1001
@@ -608,7 +610,7 @@
608610
#define PATTERN_TAG_LoadPattern 1
609611
#define PATTERN_TAG_MultiSupportPattern 3
610612
#define PATTERN_TAG_UniformExcitation 2
611-
#define PATTERN_TAG_FirePattern 3
613+
#define PATTERN_TAG_FirePattern 7
612614
#define PATTERN_TAG_PBowlLoading 4
613615
#define PATTERN_TAG_DRMLoadPattern 5
614616
#define PATTERN_TAG_H5DRM 6
@@ -617,6 +619,7 @@
617619
#define LOAD_TAG_Beam2dPointLoad 4
618620
#define LOAD_TAG_Beam3dUniformLoad 5
619621
#define LOAD_TAG_Beam3dPointLoad 6
622+
#define LOAD_TAG_BeamUniformMoment 60
620623
#define LOAD_TAG_BrickSelfWeight 7
621624
#define LOAD_TAG_Beam2dTempLoad 8
622625
#define LOAD_TAG_SurfaceLoader 9 // C.McGann, U.W.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
/* ****************************************************************** **
2+
** OpenSees - Open System for Earthquake Engineering Simulation **
3+
** Pacific Earthquake Engineering Research Center **
4+
** **
5+
** **
6+
** (C) Copyright 1999, The Regents of the University of California **
7+
** All Rights Reserved. **
8+
** **
9+
** Commercial use of this program without express permission of the **
10+
** University of California, Berkeley, is strictly prohibited. See **
11+
** file 'COPYRIGHT' in main directory for information on usage and **
12+
** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
13+
** **
14+
** Developed by: **
15+
** Frank McKenna (fmckenna@ce.berkeley.edu) **
16+
** Gregory L. Fenves (fenves@ce.berkeley.edu) **
17+
** Filip C. Filippou (filippou@ce.berkeley.edu) **
18+
** **
19+
** ****************************************************************** */
20+
21+
// $Revision: 1.4 $
22+
// $Date: 2007-10-17 22:11:35 $
23+
// $Source: /usr/local/cvs/OpenSees/SRC/domain/load/BeamUniformMoment.cpp,v $
24+
25+
26+
// Written: fmk
27+
//
28+
// Purpose: This file contains the class implementation of BeamUniformMoment.
29+
30+
#include <BeamUniformMoment.h>
31+
#include <Vector.h>
32+
#include <Channel.h>
33+
#include <FEM_ObjectBroker.h>
34+
35+
Vector BeamUniformMoment::data(3);
36+
37+
BeamUniformMoment::BeamUniformMoment(int tag, double x, double y, double z,
38+
int theElementTag)
39+
:ElementalLoad(tag, LOAD_TAG_BeamUniformMoment, theElementTag),
40+
mx(x), my(y), mz(z)
41+
{
42+
43+
}
44+
45+
BeamUniformMoment::BeamUniformMoment()
46+
:ElementalLoad(LOAD_TAG_BeamUniformMoment),
47+
mx(0.0), my(0.0), mz(0.0)
48+
{
49+
50+
}
51+
52+
BeamUniformMoment::~BeamUniformMoment()
53+
{
54+
55+
}
56+
57+
const Vector &
58+
BeamUniformMoment::getData(int &type, double loadFactor)
59+
{
60+
type = LOAD_TAG_BeamUniformMoment;
61+
data(0) = mx;
62+
data(1) = my;
63+
data(2) = mz;
64+
return data;
65+
}
66+
67+
68+
int
69+
BeamUniformMoment::sendSelf(int commitTag, Channel &theChannel)
70+
{
71+
int dbTag = this->getDbTag();
72+
73+
static Vector vectData(5);
74+
vectData(4) = this->getTag();
75+
vectData(0) = mx;
76+
vectData(1) = my;
77+
vectData(2) = mz;
78+
vectData(3) = eleTag;
79+
80+
int result = theChannel.sendVector(dbTag, commitTag, vectData);
81+
if (result < 0) {
82+
opserr << "BeamUniformMoment::sendSelf - failed to send data\n";
83+
return result;
84+
}
85+
86+
return 0;
87+
}
88+
89+
int
90+
BeamUniformMoment::recvSelf(int commitTag, Channel &theChannel,
91+
FEM_ObjectBroker &theBroker)
92+
{
93+
int dbTag = this->getDbTag();
94+
95+
static Vector vectData(5);
96+
97+
int result = theChannel.recvVector(dbTag, commitTag, vectData);
98+
if (result < 0) {
99+
opserr << "BeamUniformMoment::recvSelf - failed to recv data\n";
100+
return result;
101+
}
102+
103+
mx = vectData(0);;
104+
my = vectData(1);;
105+
mz = vectData(2);;
106+
eleTag = (int)vectData(3);
107+
this->setTag(vectData(4));
108+
109+
return 0;
110+
}
111+
112+
void
113+
BeamUniformMoment::Print(OPS_Stream &s, int flag)
114+
{
115+
s << "BeamUniformMoment - Reference load: " << this->getTag() << endln;
116+
s << " Torque (x): " << mx << endln;
117+
s << " About y: " << my << endln;
118+
s << " About z: " << mz << endln;
119+
s << " Element: " << eleTag << endln;
120+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/* ****************************************************************** **
2+
** OpenSees - Open System for Earthquake Engineering Simulation **
3+
** Pacific Earthquake Engineering Research Center **
4+
** **
5+
** **
6+
** (C) Copyright 1999, The Regents of the University of California **
7+
** All Rights Reserved. **
8+
** **
9+
** Commercial use of this program without express permission of the **
10+
** University of California, Berkeley, is strictly prohibited. See **
11+
** file 'COPYRIGHT' in main directory for information on usage and **
12+
** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
13+
** **
14+
** Developed by: **
15+
** Frank McKenna (fmckenna@ce.berkeley.edu) **
16+
** Gregory L. Fenves (fenves@ce.berkeley.edu) **
17+
** Filip C. Filippou (filippou@ce.berkeley.edu) **
18+
** **
19+
** ****************************************************************** */
20+
21+
// $Revision: 1.3 $
22+
// $Date: 2007-10-17 22:11:35 $
23+
// $Source: /usr/local/cvs/OpenSees/SRC/domain/load/BeamUniformMoment.h,v $
24+
25+
#ifndef BeamUniformMoment_h
26+
#define BeamUniformMoment_h
27+
28+
// Written: fmk
29+
30+
// Purpose: This file contains the class definition for BeamUniformMoment.
31+
32+
#include <ElementalLoad.h>
33+
34+
class BeamUniformMoment : public ElementalLoad
35+
{
36+
public:
37+
BeamUniformMoment(int tag, double mx, double my, double mz, int eleTag);
38+
39+
BeamUniformMoment();
40+
~BeamUniformMoment();
41+
42+
const Vector &getData(int &type, double loadFactor);
43+
44+
int sendSelf(int commitTag, Channel &theChannel);
45+
int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
46+
void Print(OPS_Stream &s, int flag =0);
47+
48+
protected:
49+
50+
private:
51+
double mx; // Twist
52+
double my; // About y
53+
double mz; // About z
54+
static Vector data;
55+
};
56+
57+
#endif
58+

0 commit comments

Comments
 (0)