Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenSees/OpenSees into contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioperez committed Jul 5, 2021
2 parents b93d5bc + 5051ed9 commit 5e387db
Show file tree
Hide file tree
Showing 62 changed files with 7,318 additions and 183 deletions.
5 changes: 5 additions & 0 deletions SRC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ ELE_LIBS = $(FE)/element/Element.o \
$(FE)/element/dispBeamColumn/DispBeamColumn3d.o \
$(FE)/element/dispBeamColumn/DispBeamColumnNL3d.o \
$(FE)/element/dispBeamColumn/DispBeamColumnWarping3d.o \
$(FE)/element/dispBeamColumn/DispBeamColumnAsym3d.o \
$(FE)/element/dispBeamColumn/DispBeamColumn3dThermal.o \
$(FE)/element/dispBeamColumn/DispBeamColumn2dWithSensitivity.o \
$(FE)/element/dispBeamColumn/DispBeamColumn3dWithSensitivity.o \
Expand All @@ -534,6 +535,7 @@ ELE_LIBS = $(FE)/element/Element.o \
$(FE)/element/gradientInelasticBeamColumn/TclGradientInelasticBeamColumnCommand.o \
$(FE)/element/mixedBeamColumn/MixedBeamColumn2d.o \
$(FE)/element/mixedBeamColumn/MixedBeamColumn3d.o \
$(FE)/element/mixedBeamColumn/MixedBeamColumnAsym3d.o \
$(FE)/element/fourNodeQuad/FourNodeQuad.o \
$(FE)/element/fourNodeQuad/FourNodeQuad3d.o \
$(FE)/element/fourNodeQuad/FourNodeQuadWithSensitivity.o \
Expand Down Expand Up @@ -899,6 +901,8 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/nD/UWmaterials/ManzariDafaliasPlaneStrainRO.o \
$(FE)/material/nD/UWmaterials/InitialStateAnalysisWrapper.o \
$(FE)/material/nD/UWmaterials/J2CyclicBoundingSurface.o \
$(FE)/material/nD/UWmaterials/J2CyclicBoundingSurface3D.o \
$(FE)/material/nD/UWmaterials/J2CyclicBoundingSurfacePlaneStrain.o \
$(FE)/material/nD/UWmaterials/PM4Sand.o \
$(FE)/material/nD/UWmaterials/PM4Silt.o \
$(FE)/material/nD/LinearCap.o \
Expand Down Expand Up @@ -1021,6 +1025,7 @@ SECTION_LIBS = $(FE)/material/section/SectionForceDeformation.o \
$(FE)/material/section/FiberSectionGJThermal.o \
$(FE)/material/section/FiberSection3d.o \
$(FE)/material/section/FiberSectionWarping3d.o \
$(FE)/material/section/FiberSectionAsym3d.o \
$(FE)/material/section/NDFiberSection3d.o \
$(FE)/material/section/SectionAggregator.o \
$(FE)/material/section/ParallelSection.o \
Expand Down
24 changes: 24 additions & 0 deletions SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
//#include "FiberSection.h"
#include "FiberSection2d.h"
#include "FiberSection3d.h"
#include "FiberSectionAsym3d.h" //Xinlong Du
#include "ElasticPlateSection.h"
#include "ElasticMembranePlateSection.h"
#include "MembranePlateFiberSection.h"
Expand Down Expand Up @@ -190,6 +191,9 @@
#include "UWmaterials/ManzariDafaliasPlaneStrainRO.h"
#include "UWmaterials/PM4Sand.h"
#include "UWmaterials/PM4Silt.h"
#include "J2CyclicBoundingSurface.h"
#include "J2CyclicBoundingSurface3D.h"
#include "J2CyclicBoundingSurfacePlaneStrain.h"
#include "UWmaterials/InitialStateAnalysisWrapper.h"
#include "stressDensityModel/stressDensity.h"
#include "InitStressNDMaterial.h"
Expand Down Expand Up @@ -259,6 +263,8 @@

#include "dispBeamColumn/DispBeamColumn2d.h"
#include "dispBeamColumn/DispBeamColumn3d.h"
#include "dispBeamColumn/DispBeamColumnAsym3d.h" //Xinlong Du
#include "mixedBeamColumn/MixedBeamColumnAsym3d.h" //Xinlong Du
#include "shell/ShellMITC4.h"
#include "shell/ShellMITC9.h"
#include "shell/ShellDKGQ.h" //Added by Lisha Wang, Xinzheng Lu, Linlin Xie, Song Cen & Quan Gu
Expand Down Expand Up @@ -713,6 +719,12 @@ FEM_ObjectBrokerAllClasses::getNewElement(int classTag)

case ELE_TAG_DispBeamColumn3d:
return new DispBeamColumn3d();

case ELE_TAG_DispBeamColumnAsym3d:
return new DispBeamColumnAsym3d(); //Xinlong Du

case ELE_TAG_MixedBeamColumnAsym3d:
return new MixedBeamColumnAsym3d(); //Xinlong Du

case ELE_TAG_EnhancedQuad:
return new EnhancedQuad();
Expand Down Expand Up @@ -1367,6 +1379,9 @@ FEM_ObjectBrokerAllClasses::getNewSection(int classTag)
case SEC_TAG_FiberSection3d:
return new FiberSection3d();

case SEC_TAG_FiberSectionAsym3d:
return new FiberSectionAsym3d(); //Xinlong Du

case SEC_TAG_ElasticPlateSection:
return new ElasticPlateSection();

Expand Down Expand Up @@ -1507,6 +1522,15 @@ FEM_ObjectBrokerAllClasses::getNewNDMaterial(int classTag)
case ND_TAG_PM4Silt:
return new PM4Silt();

case ND_TAG_J2CyclicBoundingSurface:
return new J2CyclicBoundingSurface();

case ND_TAG_J2CyclicBoundingSurface3D:
return new J2CyclicBoundingSurface3D();

case ND_TAG_J2CyclicBoundingSurfacePlaneStrain:
return new J2CyclicBoundingSurfacePlaneStrain();

case ND_TAG_InitialStateAnalysisWrapper:
return new InitialStateAnalysisWrapper();

Expand Down
64 changes: 32 additions & 32 deletions SRC/analysis/integrator/ExplicitDifference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
#define OPS_Export


void* OPS_Explicitdifference(void)
void* OPS_ExplicitDifference(void)
{
TransientIntegrator *theIntegrator = 0;
theIntegrator = new Explicitdifference();
theIntegrator = new ExplicitDifference();

if (theIntegrator == 0)
opserr << "WARNING - out of memory creating Explicitdifference integrator\n";
opserr << "WARNING - out of memory creating ExplicitDifference integrator\n";

return theIntegrator;
}


Explicitdifference::Explicitdifference()
ExplicitDifference::ExplicitDifference()
: TransientIntegrator(INTEGRATOR_TAGS_ExplicitDifference),
deltaT(0.0),
alphaM(0.0), betaK(0.0), betaKi(0.0), betaKc(0.0),
Expand All @@ -37,7 +37,7 @@ Explicitdifference::Explicitdifference()
}


Explicitdifference::Explicitdifference(
ExplicitDifference::ExplicitDifference(
double _alphaM, double _betaK, double _betaKi, double _betaKc)
: TransientIntegrator(INTEGRATOR_TAGS_ExplicitDifference),
deltaT(0.0),
Expand All @@ -50,7 +50,7 @@ Explicitdifference::Explicitdifference(
}


Explicitdifference::~Explicitdifference()
ExplicitDifference::~ExplicitDifference()
{
// clean up the memory created

Expand All @@ -72,14 +72,14 @@ Explicitdifference::~Explicitdifference()
}


int Explicitdifference::newStep(double _deltaT)
int ExplicitDifference::newStep(double _deltaT)
{
updateCount = 0;

deltaT = _deltaT;

if (deltaT <= 0.0) {
opserr << "Explicitdifference::newStep() - error in variable\n";
opserr << "ExplicitDifference::newStep() - error in variable\n";
opserr << "dT = " << deltaT << endln;
return -1;
}
Expand All @@ -94,7 +94,7 @@ int Explicitdifference::newStep(double _deltaT)
int size = Utdotdot->Size();

if (Ut == 0) {
opserr << "Explicitdifference::newStep() - domainChange() failed or hasn't been called\n";
opserr << "ExplicitDifference::newStep() - domainChange() failed or hasn't been called\n";
return -2;
}

Expand All @@ -109,7 +109,7 @@ int Explicitdifference::newStep(double _deltaT)
// increment the time to t and apply the load
double time = theModel->getCurrentDomainTime();
if (theModel->updateDomain(time, deltaT) < 0) {
opserr << "Explicitdifference::newStep() - failed to update the domain\n";
opserr << "ExplicitDifference::newStep() - failed to update the domain\n";
return -3;
}

Expand All @@ -120,7 +120,7 @@ int Explicitdifference::newStep(double _deltaT)
}


int Explicitdifference::formEleTangent(FE_Element *theEle)
int ExplicitDifference::formEleTangent(FE_Element *theEle)
{
theEle->zeroTangent();

Expand All @@ -130,7 +130,7 @@ int Explicitdifference::formEleTangent(FE_Element *theEle)
}


int Explicitdifference::formNodTangent(DOF_Group *theDof)
int ExplicitDifference::formNodTangent(DOF_Group *theDof)
{
theDof->zeroTangent();

Expand All @@ -140,7 +140,7 @@ int Explicitdifference::formNodTangent(DOF_Group *theDof)
}


int Explicitdifference::domainChanged()
int ExplicitDifference::domainChanged()
{

AnalysisModel *theModel = this->getAnalysisModel();
Expand Down Expand Up @@ -195,7 +195,7 @@ int Explicitdifference::domainChanged()
Utdot1 == 0 || Utdot1->Size() != size
) {

opserr << "Explicitdifference::domainChanged - ran out of memory\n";
opserr << "ExplicitDifference::domainChanged - ran out of memory\n";

// delete the old

Expand Down Expand Up @@ -261,36 +261,36 @@ int Explicitdifference::domainChanged()
}
}

opserr << "WARNING: Explicitdifference::domainChanged() - assuming Ut-1 = Ut\n";
opserr << "WARNING: ExplicitDifference::domainChanged() - assuming Ut-1 = Ut\n";

return 0;
}


int Explicitdifference::update(const Vector &Udotdot)
int ExplicitDifference::update(const Vector &Udotdot)
{
updateCount++;
if (updateCount > 2) {
opserr << "WARNING Explicitdifference::update() - called more than once -";
opserr << " Explicitdifference integration scheme requires a LINEAR solution algorithm\n";
opserr << "WARNING ExplicitDifference::update() - called more than once -";
opserr << " ExplicitDifference integration scheme requires a LINEAR solution algorithm\n";
return -1;
}

AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING Explicitdifference::update() - no souAnalysisModel set\n";
opserr << "WARNING ExplicitDifference::update() - no souAnalysisModel set\n";
return -2;
}

// check domainChanged() has been called, i.e. Ut will not be zero
if (Ut == 0) {
opserr << "WARNING Explicitdifference::update() - domainChange() failed or not called\n";
opserr << "WARNING ExplicitDifference::update() - domainChange() failed or not called\n";
return -3;
}

// check Udotdot is of correct size
if (Udotdot.Size() != Utdotdot->Size()) {
opserr << "WARNING Explicitdifference::update() - Vectors of incompatible size ";
opserr << "WARNING ExplicitDifference::update() - Vectors of incompatible size ";
opserr << " expecting " << Utdotdot->Size() << " obtained " << Udotdot.Size() << endln;
return -4;
}
Expand All @@ -312,7 +312,7 @@ int Explicitdifference::update(const Vector &Udotdot)
theModel->setResponse(*Ut, *Utdot1, Udotdot);

if (theModel->updateDomain() < 0) {
opserr << "Explicitdifference::update() - failed to update the domain\n";
opserr << "ExplicitDifference::update() - failed to update the domain\n";
return -5;
}

Expand All @@ -330,11 +330,11 @@ int Explicitdifference::update(const Vector &Udotdot)
}


int Explicitdifference::commit(void)
int ExplicitDifference::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING Explicitdifference::commit() - no AnalysisModel set\n";
opserr << "WARNING ExplicitDifference::commit() - no AnalysisModel set\n";
return -1;
}

Expand All @@ -347,7 +347,7 @@ int Explicitdifference::commit(void)
}


int Explicitdifference::sendSelf(int cTag, Channel &theChannel)
int ExplicitDifference::sendSelf(int cTag, Channel &theChannel)
{
Vector data(4);
data(0) = alphaM;
Expand All @@ -356,19 +356,19 @@ int Explicitdifference::sendSelf(int cTag, Channel &theChannel)
data(3) = betaKc;

if (theChannel.sendVector(this->getDbTag(), cTag, data) < 0) {
opserr << "WARNING Explicitdifference::sendSelf() - could not send data\n";
opserr << "WARNING ExplicitDifference::sendSelf() - could not send data\n";
return -1;
}

return 0;
}


int Explicitdifference::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
int ExplicitDifference::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
Vector data(4);
if (theChannel.recvVector(this->getDbTag(), cTag, data) < 0) {
opserr << "WARNING Explicitdifference::recvSelf() - could not receive data\n";
opserr << "WARNING ExplicitDifference::recvSelf() - could not receive data\n";
return -1;
}

Expand All @@ -381,24 +381,24 @@ int Explicitdifference::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker
}


void Explicitdifference::Print(OPS_Stream &s, int flag)
void ExplicitDifference::Print(OPS_Stream &s, int flag)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel != 0) {
double currentTime = theModel->getCurrentDomainTime();
s << "Explicitdifference - currentTime: " << currentTime << endln;
s << "ExplicitDifference - currentTime: " << currentTime << endln;
s << " Rayleigh Damping - alphaM: " << alphaM << " betaK: " << betaK;
s << " betaKi: " << betaKi << " betaKc: " << betaKc << endln;
}
else
s << "Explicitdifference - no associated AnalysisModel\n";
s << "ExplicitDifference - no associated AnalysisModel\n";
}



//a interface to get velosity for modal damping
const Vector &
Explicitdifference::getVel()
ExplicitDifference::getVel()
{
return *Utdot;
}
Expand Down
12 changes: 6 additions & 6 deletions SRC/analysis/integrator/ExplicitDifference.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef Explicitdifference_h
#define Explicitdifference_h
#ifndef ExplicitDifference_h
#define ExplicitDifference_h


#include<TransientIntegrator.h>
Expand All @@ -9,12 +9,12 @@ class DOF_Group;
class FE_Element;
class Vector;

class Explicitdifference : public TransientIntegrator
class ExplicitDifference : public TransientIntegrator
{
public:
Explicitdifference();
Explicitdifference(double alphaM, double betaK, double betaKi, double betaKc);
~Explicitdifference(); //constructors and unconstructor
ExplicitDifference();
ExplicitDifference(double alphaM, double betaK, double betaKi, double betaKc);
~ExplicitDifference(); //constructors and unconstructor



Expand Down
5 changes: 4 additions & 1 deletion SRC/classTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
#define SEC_TAG_NDFiberSection2d 900
#define SEC_TAG_FiberSection3d 10
#define SEC_TAG_FiberSectionWarping3d 1010
#define SEC_TAG_FiberSectionAsym3d 1011
#define SEC_TAG_NDFiberSection3d 1000
#define SEC_TAG_FiberSectionGJ 11
#define SEC_TAG_BeamFiberSection 12
Expand Down Expand Up @@ -458,7 +459,7 @@
#define ND_TAG_PM4Sand 14021
// PM4Silt material - L.Chen
#define ND_TAG_PM4Silt 14022
// J2CyclicBoundingSurface material - D.Turello
// J2CyclicBoundingSurface material - P. Arduino, D.Turello
#define ND_TAG_J2CyclicBoundingSurface 14023
#define ND_TAG_J2CyclicBoundingSurface3D 14024
#define ND_TAG_J2CyclicBoundingSurfacePlaneStrain 14025
Expand Down Expand Up @@ -624,6 +625,7 @@
#define ELE_TAG_DispBeamColumn3d 64
#define ELE_TAG_DispBeamColumnNL3d 640
#define ELE_TAG_DispBeamColumnWarping3d 641
#define ELE_TAG_DispBeamColumnAsym3d 642
#define ELE_TAG_HingedBeam2d 65
#define ELE_TAG_HingedBeam3d 66
#define ELE_TAG_TwoPointHingedBeam2d 67
Expand All @@ -642,6 +644,7 @@
#define ELE_TAG_ForceBeamColumnCBDI3d 78
#define ELE_TAG_MixedBeamColumn2d 30766
#define ELE_TAG_MixedBeamColumn3d 30765
#define ELE_TAG_MixedBeamColumnAsym3d 30767
#define ELE_TAG_DispBeamColumn2dInt 79
#define ELE_TAG_InternalSpring 80
#define ELE_TAG_SimpleJoint2D 81
Expand Down
Loading

0 comments on commit 5e387db

Please sign in to comment.