Skip to content

Commit

Permalink
Merge pull request #27 from OpenSees/master
Browse files Browse the repository at this point in the history
merging to HEAD
  • Loading branch information
parduino committed Nov 3, 2021
2 parents ffb3dba + 395c576 commit fc3c6da
Show file tree
Hide file tree
Showing 46 changed files with 7,265 additions and 151 deletions.
7 changes: 6 additions & 1 deletion SRC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@ RECORDER_LIBS = $(FE)/recorder/Recorder.o \
$(FE)/recorder/DamageRecorder.o \
$(FE)/recorder/RemoveRecorder.o \
$(FE)/recorder/PVDRecorder.o \
$(FE)/recorder/MPCORecorder.o \
$(FE)/recorder/GmshRecorder.o \
$(FE)/recorder/ElementRecorderRMS.o \
$(FE)/recorder/NodeRecorderRMS.o \
$(FE)/recorder/MPCORecorder.o \
$(FE)/recorder/VTK_Recorder.o


Expand Down Expand Up @@ -721,6 +721,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/uniaxial/Elastic2Material.o \
$(FE)/material/uniaxial/ElasticMultiLinear.o \
$(FE)/material/uniaxial/ReinforcingSteel.o \
$(FE)/material/uniaxial/SteelDRC.o \
$(FE)/material/uniaxial/ElasticPPMaterial.o \
$(FE)/material/uniaxial/ElasticBilin.o \
$(FE)/material/uniaxial/ElasticPowerFunc.o \
Expand Down Expand Up @@ -923,6 +924,9 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/nD/UWmaterials/J2CyclicBoundingSurfacePlaneStrain.o \
$(FE)/material/nD/UWmaterials/PM4Sand.o \
$(FE)/material/nD/UWmaterials/PM4Silt.o \
$(FE)/material/nD/UANDESmaterials/SAniSandMS.o \
$(FE)/material/nD/UANDESmaterials/SAniSandMS3D.o \
$(FE)/material/nD/UANDESmaterials/SAniSandMSPlaneStrain.o \
$(FE)/material/nD/LinearCap.o \
$(FE)/material/nD/AcousticMedium.o \
$(FE)/material/nD/FeapMaterial.o \
Expand Down Expand Up @@ -1062,6 +1066,7 @@ SECTION_LIBS = $(FE)/material/section/SectionForceDeformation.o \
$(FE)/material/section/integration/WideFlangeSectionIntegration.o \
$(FE)/material/section/integration/RCTBeamSectionIntegration.o \
$(FE)/material/section/integration/TubeSectionIntegration.o \
$(FE)/material/section/integration/HSSSectionIntegration.o \
$(FE)/material/section/repres/patch/Patch.o \
$(FE)/material/section/repres/patch/QuadPatch.o \
$(FE)/material/section/repres/patch/CircPatch.o \
Expand Down
1 change: 1 addition & 0 deletions SRC/Makefile.incl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ FE_INCLUDES = -I$(FE)/matrix \
-I$(FE)/material/nD/FiniteDeformation/fdEvolution \
-I$(FE)/material/nD/cyclicSoil \
-I$(FE)/material/nD/UWmaterials \
-I$(FE)/material/nD/UANDESmaterials \
-I$(FE)/material/nD/stressDensityModel \
-I$(FE)/material/section \
-I$(FE)/material/section/repres/cell \
Expand Down
5 changes: 5 additions & 0 deletions SRC/classTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
#define MAT_TAG_Steel02 26
#define MAT_TAG_Bond_SP01 27
#define MAT_TAG_Hysteretic2 28
#define MAT_TAG_SteelDRC 29
#define MAT_TAG_Concrete04 30
#define MAT_TAG_SecantConcrete 31
#define MAT_TAG_ContinuumUniaxial 32
Expand Down Expand Up @@ -340,6 +341,7 @@
#define SECTION_INTEGRATION_TAG_RCCIRCULAR 5
#define SECTION_INTEGRATION_TAG_RCTUNNEL 6
#define SECTION_INTEGRATION_TAG_Tube 7
#define SECTION_INTEGRATION_TAG_HSS 8

#define ND_TAG_WrapperNDMaterial 9
#define ND_TAG_ElasticIsotropic 10
Expand Down Expand Up @@ -497,6 +499,9 @@

#define ND_TAG_IncrementalElasticIsotropicThreeDimensional 7010 //Chile

#define ND_TAG_SAniSandMS 7011 //UANDES - Chile
#define ND_TAG_SAniSandMSPlaneStrain 7011 //UANDES - Chile
#define ND_TAG_SAniSandMS3D 7011 //UANDES - Chile


#define FIBER_TAG_Uniaxial2d 1
Expand Down
3 changes: 1 addition & 2 deletions SRC/domain/node/NodalLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ NodalLoad::applyLoad(Vector& loadFactors) {

const Vector&
NodalLoad::getData(int& type) {
Vector* Empty = new Vector();
return *Empty;
return *load;
}

//Adding general function for using NodalThermalAction, L.Jiang [SIF]
2 changes: 1 addition & 1 deletion SRC/handler/FileStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ FileStream::operator<<(int n)
this->open();

if (fileOpen != 0)
theFile << 1.0*n;
theFile << n;

return *this;
}
Expand Down
4 changes: 4 additions & 0 deletions SRC/interpreter/OpenSeesCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ int OPS_nodeCoord();
int OPS_setNodeCoord();
int OPS_updateElementDomain();
int OPS_eleNodes();
int OPS_getNDMM();
int OPS_getNDFF();
int OPS_eleType();
int OPS_nodeDOFs();
int OPS_nodeMass();
Expand Down Expand Up @@ -289,6 +291,8 @@ int OPS_getEleClassTags();
int OPS_getEleLoadClassTags();
int OPS_getEleLoadTags();
int OPS_getEleLoadData();
int OPS_getNodeLoadTags();
int OPS_getNodeLoadData();
// Sensitivity:END /////////////////////////////////////////////

/* OpenSeesMiscCommands.cpp */
Expand Down
217 changes: 217 additions & 0 deletions SRC/interpreter/OpenSeesOutputCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <LoadPatternIter.h>
#include <FileStream.h>
#include <ID.h>
#include <NodalLoad.h>
#include <NodalLoadIter.h>
#include <ElementalLoad.h>
#include <ElementalLoadIter.h>
#include <Element.h>
Expand Down Expand Up @@ -1574,6 +1576,91 @@ int OPS_updateElementDomain()
return 0;
}

int OPS_getNDMM()
{

int ndm;
int numdata = 1;

if (OPS_GetNumRemainingInputArgs() > 0) {

int tag;

if (OPS_GetIntInput(&numdata, &tag) < 0) {
opserr << "WARNING getNDM nodeTag? \n";
return -1;
}

Domain* theDomain = OPS_GetDomain();
if (theDomain == 0) return -1;
Node *theNode = theDomain->getNode(tag);

if (theNode == 0) {
opserr << "WARNING node "<< tag <<" does not exist\n";
return -1;
}

const Vector& crds = theNode->getCrds();
ndm = crds.Size();

} else {

ndm = OPS_GetNDM();

}

int size = 1;

if (OPS_SetIntOutput(&size, &ndm, false) < 0) {
opserr << "WARNING failed to set output\n";
return -1;
}

return 0;
}

int OPS_getNDFF()
{

int ndf;
int numdata = 1;

if (OPS_GetNumRemainingInputArgs() > 0) {

int tag;

if (OPS_GetIntInput(&numdata, &tag) < 0) {
opserr << "WARNING getNDF nodeTag? \n";
return -1;
}

Domain* theDomain = OPS_GetDomain();
if (theDomain == 0) return -1;
Node *theNode = theDomain->getNode(tag);

if (theNode == 0) {
opserr << "WARNING node "<< tag <<" does not exist\n";
return -1;
}

ndf = theNode->getNumberDOF();

} else {

ndf = OPS_GetNDF();

}

int size = 1;

if (OPS_SetIntOutput(&size, &ndf, false) < 0) {
opserr << "WARNING failed to set output\n";
return -1;
}

return 0;
}

int OPS_eleType()
{
if (OPS_GetNumRemainingInputArgs() < 1) {
Expand Down Expand Up @@ -3515,6 +3602,136 @@ int OPS_getEleLoadData()
return 0;
}

int OPS_getNodeLoadTags()
{
Domain* theDomain = OPS_GetDomain();
if (theDomain == 0) return -1;

int numdata = OPS_GetNumRemainingInputArgs();

std::vector <int> data;

if (numdata < 1) {
LoadPattern *thePattern;
LoadPatternIter &thePatterns = theDomain->getLoadPatterns();

while ((thePattern = thePatterns()) != 0) {
NodalLoadIter theNodLoads = thePattern->getNodalLoads();
NodalLoad* theNodLoad;

while ((theNodLoad = theNodLoads()) != 0) {
data.push_back(theNodLoad->getNodeTag());
}

}

} else if (numdata == 1) {

int patternTag;
if (OPS_GetIntInput(&numdata, &patternTag) < 0) {
opserr << "could not read patternTag\n";
return -1;
}

LoadPattern* thePattern = theDomain->getLoadPattern(patternTag);
if (thePattern == nullptr) {
opserr << "ERROR load pattern with tag " << patternTag << " not found in domain -- getEleLoadTags\n";
return -1;
}
NodalLoadIter& theNodLoads = thePattern->getNodalLoads();
NodalLoad* theNodLoad;

while ((theNodLoad = theNodLoads()) != 0) {
data.push_back(theNodLoad->getNodeTag());
}

} else {
opserr << "WARNING want - getNodeLoadTags <patternTag?>\n";
return -1;
}

int size = data.size();

if (OPS_SetIntOutput(&size, data.data(), false) < 0) {
opserr << "WARNING failed to set output\n";
return -1;
}

return 0;
}

int OPS_getNodeLoadData()
{
Domain* theDomain = OPS_GetDomain();
if (theDomain == 0) return -1;

int numdata = OPS_GetNumRemainingInputArgs();

std::vector <double> data;

if (numdata < 1) {
LoadPattern *thePattern;
LoadPatternIter &thePatterns = theDomain->getLoadPatterns();

int typeEL;

while ((thePattern = thePatterns()) != 0) {
NodalLoadIter &theNodLoads = thePattern->getNodalLoads();
NodalLoad* theNodLoad;

while ((theNodLoad = theNodLoads()) != 0) {
const Vector &nodeLoadData = theNodLoad->getData(typeEL);

int nodeLoadDataSize = nodeLoadData.Size();
for (int i = 0; i < nodeLoadDataSize; i++) {
data.push_back(nodeLoadData(i));
}
}
}

} else if (numdata == 1) {

int patternTag;
if (OPS_GetIntInput(&numdata, &patternTag) < 0) {
opserr << "could not read patternTag\n";
return -1;
}

LoadPattern* thePattern = theDomain->getLoadPattern(patternTag);
if (thePattern == nullptr) {
opserr << "ERROR load pattern with tag " << patternTag << " not found in domain -- getNodeLoadData\n";
return -1;
}
NodalLoadIter& theNodLoads = thePattern->getNodalLoads();
NodalLoad* theNodLoad;

int typeEL;

while ((theNodLoad = theNodLoads()) != 0) {
const Vector &nodeLoadData = theNodLoad->getData(typeEL);

int nodeLoadDataSize = nodeLoadData.Size();
for (int i = 0; i < nodeLoadDataSize; i++) {
data.push_back(nodeLoadData(i));
}
}

} else {
opserr << "WARNING want - getNodeLoadData <patternTag?>\n";
return -1;
}

int size = data.size();

if (OPS_SetDoubleOutput(&size, data.data(), false) < 0) {
opserr << "WARNING failed to set output\n";
return -1;
}

return 0;
}


int OPS_getNumElements()
{
Domain* theDomain = OPS_GetDomain();
Expand Down
3 changes: 3 additions & 0 deletions SRC/interpreter/OpenSeesSectionCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <ReinfBar.h>
#include <TubeSectionIntegration.h>
#include <WideFlangeSectionIntegration.h>
#include <HSSSectionIntegration.h>
#include <NDFiberSectionWarping2d.h>
#include <RCSectionIntegration.h>
#include <RCTBeamSectionIntegration.h>
Expand Down Expand Up @@ -91,6 +92,7 @@ void* OPS_Bidirectional();
void* OPS_Elliptical2();
void* OPS_Isolator2spring();
void* OPS_FiberSection2dThermal();
void* OPS_HSSSection();

namespace {
static FiberSection2d* theActiveFiberSection2d = 0;
Expand Down Expand Up @@ -1086,6 +1088,7 @@ namespace {
functionMap.insert(std::make_pair("ElasticWarpingShear", &OPS_ElasticWarpingShearSection2d));
functionMap.insert(std::make_pair("ElasticTube", &OPS_ElasticTubeSection3d));
functionMap.insert(std::make_pair("Tube", &OPS_TubeSection));
functionMap.insert(std::make_pair("HSS", &OPS_HSSSection));
functionMap.insert(std::make_pair("WFSection2d", &OPS_WFSection2d));
functionMap.insert(std::make_pair("WSection2d", &OPS_WFSection2d));
functionMap.insert(std::make_pair("RCSection2d", &OPS_RCSection2d));
Expand Down
2 changes: 2 additions & 0 deletions SRC/interpreter/OpenSeesUniaxialMaterialCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void* OPS_ReinforcingSteel();
void* OPS_Dodd_Restrepo();
void* OPS_RambergOsgoodSteel();
void* OPS_SteelMPF();
void* OPS_SteelDRC();
void* OPS_Concrete02();
void* OPS_Concrete02IS();
void* OPS_Concrete04();
Expand Down Expand Up @@ -243,6 +244,7 @@ namespace {
uniaxialMaterialsMap.insert(std::make_pair("RambergOsgoodSteel", &OPS_RambergOsgoodSteel));
uniaxialMaterialsMap.insert(std::make_pair("RambergOsgood", &OPS_RambergOsgoodSteel));
uniaxialMaterialsMap.insert(std::make_pair("SteelMPF", &OPS_SteelMPF));
uniaxialMaterialsMap.insert(std::make_pair("SteelDRC", &OPS_SteelDRC));
uniaxialMaterialsMap.insert(std::make_pair("Concrete02", &OPS_Concrete02));
uniaxialMaterialsMap.insert(std::make_pair("Concrete02IS", &OPS_Concrete02IS));
uniaxialMaterialsMap.insert(std::make_pair("Concrete04", &OPS_Concrete04));
Expand Down
Loading

0 comments on commit fc3c6da

Please sign in to comment.