Skip to content

Commit

Permalink
Merge commit 'c72bcd315ac06c04c6961e8b258590aaa55e280b' as 'opensees'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuminjie committed May 28, 2020
2 parents bc1a47a + c72bcd3 commit d0e4920
Show file tree
Hide file tree
Showing 5,602 changed files with 2,784,288 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5,331 changes: 5,331 additions & 0 deletions opensees/.gitattributes

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions opensees/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Prerequisites
*.d

# old text editor files
*~

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so*
*.dylib
*.dll
*.pyd

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Visual Studio
*.vcxproj.user
*.bsc
*.pdb
.vs
obj
*.exp

# CLion
.gitignore
.idea
cmake-build-debug
cmake-build-release
CMakeLists.txt
.dropbox.attr

# VSCode
.vscode

# OTHER
Makefile.def
PlainConcrete.f
forumat.f
Damage2p.cpp
Damage2p.h
Damage2p3D.cpp
Damage2p3D.h
Damage2pThanh.tar
Damage2ppstress.cpp
Damage2ppstress.h
Faria1998.cpp
Faria1998.h
Faria1998PlaneStrain.cpp
Faria1998PlaneStrain.h
Faria1998PlaneStress.cpp
Faria1998PlaneStress.h
Faria1998PlaneStress2d.cpp
Faria1998PlaneStress2d.h
Faria1998ThreeDimensional.cpp
Faria1998ThreeDimensional.h
SRC/interpreter/pythonInterpreter
SRC/interpreter/tclInterpreter
SRC/interpreter/openseespy
SRC/interpreter/openseestcl
19 changes: 19 additions & 0 deletions opensees/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: cpp

dist: xenial

before_install:
- sudo apt-get install -y g++ gcc gfortran make python3 python3-dev tcl8.6 tcl8.6-dev
- mkdir bin
- mkdir lib
- cp MAKES/Makefile.def.TRAVIS-CI Makefile.def

script:
- make --silent
- cd ./SRC/interpreter
- make --silent
- python3 -c 'import opensees'

addons:
apt:
update: true
32 changes: 32 additions & 0 deletions opensees/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Copyright @ 1999-2020 The Regents of the University of California (The Regents). All Rights Reserved.

The Regents grants permission, without fee and without a written license agreement, for (a) use,
reproduction, modification, and distribution of this software and its documentation by educational,
research, and non-profit entities for noncommercial purposes only; and (b) use, reproduction and
modification of this software by other entities for internal purposes only. The above copyright
notice, this paragraph and the following three paragraphs must appear in all copies and modifications
of the software and/or documentation.


Permission to incorporate this software into products for commercial distribution may be obtained
by contacting the University of California
Office of Technology Licensing
2150 Shattuck Avenue #510,
Berkeley, CA 94720-1620,
(510) 643-7201.

This software program and documentation are copyrighted by The Regents of the University of California.
The Regents does not warrant that the operation of the program will be uninterrupted or error-free. The
end-user understands that the program was developed for research purposes and is advised not to rely
exclusively on the program for any reason.

IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. REGENTS GRANTS NO EXPRESS OR IMPLIED LICENSE IN ANY PATENT
RIGHTS OF REGENTS BUT HAS IMPLEMENTED AN INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT FOR THE OPENSEES PROJECT AT
THE UNIVERISTY OF CALIFORNIA, BERKELEY TO BENEFIT THE END USER.

REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED
"AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

25 changes: 25 additions & 0 deletions opensees/DEVELOPER/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

include ./Makefile.def

all:
@cd ./element; $(MAKE);
@cd ./material; $(MAKE);
@cd ./recorder; $(MAKE);
@cd ./system; $(MAKE);
@cd ./integrator; $(MAKE);

tidy:
@rm -f Makefile.bak *~ #*# core

clean: tidy
@rm -f *.o

spotless: clean

wipe: spotless
@cd ./element; $(MAKE) wipe;
@cd ./material; $(MAKE) wipe;
@cd ./recorder; $(MAKE) wipe;
@cd ./system; $(MAKE) wipe;
@cd ./integrator; $(MAKE) wipe;

30 changes: 30 additions & 0 deletions opensees/DEVELOPER/Makefile.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#OS_FLAG = -D_MACOSX
OS_FLAG = -D_LINUX

CC++ = g++
CC = gcc
FC = gfortran

LINKER = $(CC++)
LINKFLAGS = -Wl

CD = cd

C++FLAGS = -O3
CFLAGS = -O2
FFLAGS = -O

INCLUDES = -I../core -I../../core

.cpp.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@
.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@
.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $< -o $@
.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@
17 changes: 17 additions & 0 deletions opensees/DEVELOPER/UnixInstructions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

for Mac users you need to edit the first part of the Makefile.def, uncomment
the first line and comment or delete the second line!


there are a number of example classes and example scripts to test these
classes. In addition for elements and materials there are example c and
fortran routines.

typing make in the DEVELOPER directory will build them all. the resulting
shared object libraries (dynamic link libraries) will be found in the same
directory as the source code.

to test them you need to ensure that the LD_LIBRARY_PATH is set to include ./

to test them run 'OpenSees example1.tcl', note OpenSees must be on your path.

50 changes: 50 additions & 0 deletions opensees/DEVELOPER/WindowsInstructions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
1. Open ViualStudio
2. File -> New Project
3. Give it name of New class and location of current class files (ElasticPPcpp and C:\???\OpenSeesDeveloper\material (VisualStudio2010 want VisualStudio C++ Win32 - Win32 Project)
4. Select OK (visual Studio20
5. New windows pops up, Select Application Settings
6. Select DLL AND select Empty Project
7. Select Finish

a new project pops up in the workspace with class name (ElasticPPcpp)
8. Right click on source files, select add Existing Item.
9. browse to the class file (should be up 1 directory, select it (elasticPPcpp.cpp)
10.Right click on heared files, select add existing item.
11. browse to header file, select it (elasticPPcpp.h)

12. right click on Project (ElasticPPcpp), select build.

It fails in compilation, as cannot find file elementAPI.h
13. right click on Project (ElasticPPCPP), select Properties.
14. select C/C++ folder icon
15. In Configuration pull down menu, select all configurations
16. Click 3 dots to right of Additional Include Directories
17. In window that pops up, select folder
18. add to line ..\..\core (this directory contains the elementAPI.h file). (keep adding ..\ till it works!)
19. select ok.
20 right click on project (ElasticPPcpp), select build

It fails in Linking, a lot of unresolved external symbols.
21. Right click on source files, select add Existing Item.
22. browse to the core directory (should be 1 directory up)
23. select all the .cpp files here

24. right click on Project (ElasticPPCPP), select build.

IT SHOULD WORK! .. IF IT FAILS GET MY ATTENTION.

Now test it,

25. using windows finder, copy the .dll (C:\??\OpenSeesDeveloper\material\ElasticPPCPP\Debug) into the class directory (C:\???\material\)
26. run OpenSees (2.2.0) (C:\??\OpenSeesDeveloper\bin)
27. cd into directory containing example (cd ..\material)
28. source an example script containing your new command, i.e. type: "source example1.tcl"

If it fails and you are using the x64 bit version you need to change the code generated
30. Under build, choose the configuration manager, you woill see the project marked as win32
31. in the pull down platform menu, choose new, x64 should pop up .. select that
32. build again

IT SHOULD RUN THE SCRIPT! .. IF IT FAILS GET MY ATTENTION.


58 changes: 58 additions & 0 deletions opensees/DEVELOPER/core/Analysis.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** **
** (C) Copyright 1999, The Regents of the University of California **
** All Rights Reserved. **
** **
** Commercial use of this program without express permission of the **
** University of California, Berkeley, is strictly prohibited. See **
** file 'COPYRIGHT' in main directory for information on usage and **
** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
** **
** Developed by: **
** Frank McKenna (fmckenna@ce.berkeley.edu) **
** Gregory L. Fenves (fenves@ce.berkeley.edu) **
** Filip C. Filippou (filippou@ce.berkeley.edu) **
** **
** ****************************************************************** */

// $Revision: 1.1.1.1 $
// $Date: 2000-09-15 08:23:16 $
// $Source: /usr/local/cvs/OpenSees/SRC/analysis/analysis/Analysis.cpp,v $


// File: ~/analysis/analysis/Analysis.C
//
// Written: fmk
// Created: 11/96
// Revision: A
//
// Description: This file contains the implementation of Analysis.
// Analysis is an abstract base class, i.e. no objects of it's
// type can be created.
//
// What: "@(#) Analysis.C, revA"

#include <Analysis.h>
#include <Domain.h>

Analysis::Analysis(Domain &theDom)
:theDomain(&theDom)
{

}

Analysis::~Analysis()
{

}

Domain *
Analysis::getDomainPtr(void)
{
return theDomain;
}


60 changes: 60 additions & 0 deletions opensees/DEVELOPER/core/Analysis.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** **
** (C) Copyright 1999, The Regents of the University of California **
** All Rights Reserved. **
** **
** Commercial use of this program without express permission of the **
** University of California, Berkeley, is strictly prohibited. See **
** file 'COPYRIGHT' in main directory for information on usage and **
** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
** **
** Developed by: **
** Frank McKenna (fmckenna@ce.berkeley.edu) **
** Gregory L. Fenves (fenves@ce.berkeley.edu) **
** Filip C. Filippou (filippou@ce.berkeley.edu) **
** **
** ****************************************************************** */

// $Revision: 1.1.1.1 $
// $Date: 2000-09-15 08:23:16 $
// $Source: /usr/local/cvs/OpenSees/SRC/analysis/analysis/Analysis.h,v $


#ifndef Analysis_h
#define Analysis_h

// File: ~/analysis/analysis/Analysis.h
//
// Written: fmk
// Created: 11/96
// Revision: A
//
// Description: This file contains the interface for the Analysis class.
// Analysis is an abstract class, i.e. no objects of it's type can be created.
//
// What: "@(#) Analysis.h, revA"

class Domain;

class Analysis
{
public:
Analysis(Domain &theDomain);
virtual ~Analysis();

// pure virtual functions
// virtual int analyze(void) =0;
virtual int domainChanged(void) = 0;

protected:
Domain *getDomainPtr(void);

private:
Domain *theDomain;
};

#endif

Loading

0 comments on commit d0e4920

Please sign in to comment.