Skip to content

Commit

Permalink
Merge pull request #619 from Xiaodong-Ji-THU/master
Browse files Browse the repository at this point in the history
add a new InertiaTruss element
  • Loading branch information
mhscott committed Oct 4, 2021
2 parents 0ba9f78 + 9af2556 commit 4ff0314
Show file tree
Hide file tree
Showing 12 changed files with 1,187 additions and 2 deletions.
6 changes: 5 additions & 1 deletion SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
#include "truss/TrussSection.h"
#include "truss/CorotTruss.h"
#include "truss/CorotTrussSection.h"
#include "truss/InertiaTruss.h"
#include "zeroLength/ZeroLength.h"
#include "zeroLength/ZeroLengthSection.h"
#include "zeroLength/ZeroLengthContact2D.h"
Expand Down Expand Up @@ -662,7 +663,10 @@ FEM_ObjectBrokerAllClasses::getNewElement(int classTag)
return new CorotTruss();

case ELE_TAG_CorotTrussSection:
return new CorotTrussSection();
return new CorotTrussSection();

case ELE_TAG_InertiaTruss:
return new InertiaTruss();

case ELE_TAG_ZeroLength:
return new ZeroLength();
Expand Down
1 change: 1 addition & 0 deletions SRC/classTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@
#define ELE_TAG_MasonPan12 215
#define ELE_TAG_MasonPan3D 216
#define ELE_TAG_ASDEmbeddedNodeElement 217 // Massimo Petracca (ASDEA)
#define ELE_TAG_InertiaTruss 218 //Added by Xiaodong Ji, Yuhao Cheng, Yue Yu
#define ELE_TAG_ExternalElement 99990


Expand Down
14 changes: 14 additions & 0 deletions SRC/element/TclElementCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ extern void *OPS_ElastomericBearingBoucWenMod3d(void);
extern void *OPS_PFEMElement2DBubble(const ID &info);
extern void *OPS_PFEMElement2Dmini(const ID &info);
extern void *OPS_PFEMElement2D();
extern void* OPS_InertiaTrussElement(void); //Added by Xiaodong Ji, Yuhao Cheng, Yue Yu

#if defined(_HAVE_LHNMYS) || defined(OPSDEF_ELEMENT_LHNMYS)
extern void* OPS_BeamColumn2DwLHNMYS(void);
extern void* OPS_Beam2dDamage(void);
Expand Down Expand Up @@ -1534,6 +1536,18 @@ TclModelBuilderElementCommand(ClientData clientData, Tcl_Interp *interp,
}
//Xinlong Du


else if ((strcmp(argv[1], "InertiaTruss") == 0)) {

void* theEle = OPS_InertiaTrussElement();
if (theEle != 0)
theElement = (Element*)theEle;
else {
opserr << "tclelementcommand -- unable to create element of type : " << argv[1] << endln;
return TCL_ERROR;
}
}

// if one of the above worked
if (theElement != 0) {
if (theTclDomain->addElement(theElement) == false) {
Expand Down
Loading

0 comments on commit 4ff0314

Please sign in to comment.