-
Notifications
You must be signed in to change notification settings - Fork 11
/
OpenSeesCommands.h
443 lines (382 loc) · 13.3 KB
/
OpenSeesCommands.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
/* *****************************************************************************
Copyright (c) 2015-2017, The Regents of the University of California (Regents).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
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.
*************************************************************************** */
// Written: Minjie
// Description: all opensees APIs are defined or declared here
//
#ifndef OpenSeesCommands_h
#define OpenSeesCommands_h
#include "DL_Interpreter.h"
#include <UniaxialMaterial.h>
#include <Domain.h>
#include <StaticAnalysis.h>
#include <DirectIntegrationAnalysis.h>
#include <LinearSOE.h>
#include <EigenSOE.h>
#include <DOF_Numberer.h>
#include <ConstraintHandler.h>
#include <StaticIntegrator.h>
#include <TransientIntegrator.h>
#include <EquiSolnAlgo.h>
#include <FE_Datastore.h>
#include <FEM_ObjectBrokerAllClasses.h>
#include <PFEMAnalysis.h>
#include <VariableTimeStepDirectIntegrationAnalysis.h>
#ifdef _RELIABILITY
#include <ReliabilityStaticAnalysis.h>
#include <ReliabilityDirectIntegrationAnalysis.h>
#endif
#include <Timer.h>
#include <SimulationInformation.h>
class OpenSeesCommands
{
public:
explicit OpenSeesCommands(DL_Interpreter* interpreter);
~OpenSeesCommands();
DL_Interpreter* getInterpreter();
Domain* getDomain();
int getNDF() const {return ndf;}
void setNDF(int n) {ndf = n;}
int getNDM() const {return ndm;}
void setNDM(int n) {ndm = n;}
void setSOE(LinearSOE* soe);
LinearSOE* getSOE() {return theSOE;}
void setNumberer(DOF_Numberer* numberer);
DOF_Numberer* getNumberer() {return theNumberer;}
void setHandler(ConstraintHandler* handler);
ConstraintHandler* getHandler() {return theHandler;}
void setStaticIntegrator(StaticIntegrator* integrator);
StaticIntegrator* getStaticIntegrator() {return theStaticIntegrator;}
void setTransientIntegrator(TransientIntegrator* integrator);
TransientIntegrator* getTransientIntegrator() {return theTransientIntegrator;}
void setAlgorithm(EquiSolnAlgo* algo);
EquiSolnAlgo* getAlgorithm() {return theAlgorithm;}
void setCTest(ConvergenceTest* test);
ConvergenceTest* getCTest() {return theTest;}
void setStaticAnalysis();
StaticAnalysis* getStaticAnalysis() {return theStaticAnalysis;}
int setPFEMAnalysis();
PFEMAnalysis* getPFEMAnalysis() {return thePFEMAnalysis;}
void setVariableAnalysis();
VariableTimeStepDirectIntegrationAnalysis*
getVariableAnalysis() {return theVariableTimeStepTransientAnalysis;}
void setTransientAnalysis();
DirectIntegrationAnalysis* getTransientAnalysis() {return theTransientAnalysis;}
void setNumEigen(int num) {numEigen = num;}
int getNumEigen() {return numEigen;}
EigenSOE* getEigenSOE() {return theEigenSOE;}
void setFileDatabase(const char* filename);
FE_Datastore* getDatabase() {return theDatabase;}
Timer* getTimer() {return &theTimer;}
SimulationInformation* getSimulationInformation() {return &theSimulationInfo;}
#ifdef _RELIABILITY
int setReliabilityStaticAnalysis();
int setReliabilityTransientAnalysis();
#endif
void wipeAnalysis();
void wipe();
int eigen(int typeSolver, double shift,
bool generalizedAlgo, bool findSmallest);
private:
DL_Interpreter* interpreter;
Domain* theDomain;
int ndf, ndm;
LinearSOE* theSOE;
EigenSOE* theEigenSOE;
DOF_Numberer* theNumberer;
ConstraintHandler* theHandler;
StaticIntegrator *theStaticIntegrator;
TransientIntegrator *theTransientIntegrator;
EquiSolnAlgo *theAlgorithm;
StaticAnalysis* theStaticAnalysis;
DirectIntegrationAnalysis* theTransientAnalysis;
PFEMAnalysis* thePFEMAnalysis;
VariableTimeStepDirectIntegrationAnalysis* theVariableTimeStepTransientAnalysis;
AnalysisModel* theAnalysisModel;
ConvergenceTest *theTest;
int numEigen;
FE_Datastore* theDatabase;
FEM_ObjectBrokerAllClasses theBroker;
Timer theTimer;
SimulationInformation theSimulationInfo;
// AddingSensitivity:BEGIN /////////////////////////////////////////////
#ifdef _RELIABILITY
SensitivityAlgorithm *theSensitivityAlgorithm;
Integrator *theSensitivityIntegrator;
ReliabilityStaticAnalysis* theReliabilityStaticAnalysis;
ReliabilityDirectIntegrationAnalysis* theReliabilityTransientAnalysis;
#endif
// AddingSensitivity:END ///////////////////////////////////////////////
};
///////////////////////////////////////////////////////////////////////////
// Declaration of all OpenSees APIs except those declared in elementAPI.h//
///////////////////////////////////////////////////////////////////////////
/* OpenSeesUniaxialMaterialCommands.cpp */
int OPS_UniaxialMaterial();
int OPS_testUniaxialMaterial();
int OPS_setStrain();
int OPS_getStrain();
int OPS_getStress();
int OPS_getTangent();
int OPS_getDampTangent();
int OPS_LimitCurve();
/* OpenSeesNDMaterialCommands.cpp */
int OPS_NDMaterial();
/* OpenSeesElementCommands.cpp */
int OPS_Element();
int OPS_doBlock2D();
int OPS_doBlock3D();
/* OpenSeesTimeSeriesCommands.cpp */
int OPS_TimeSeries();
/* OpenSeesPatternCommands.cpp */
int OPS_Pattern();
int OPS_NodalLoad();
int OPS_ElementalLoad();
int OPS_SP();
int OPS_ImposedMotionSP();
int OPS_groundMotion();
/* OpenSeesSectionCommands.cpp */
int OPS_Section();
int OPS_Fiber();
int OPS_Patch();
int OPS_Layer();
/* OpenSeesCrdTransfCommands.cpp */
int OPS_CrdTransf();
/* OpenSeesBeamIntegrationCommands.cpp */
int OPS_BeamIntegration();
/* OpenSeesOutputCommands.cpp */
int OPS_nodeDisp();
int OPS_nodeReaction();
int OPS_nodeEigenvector();
int OPS_getTime();
int OPS_eleResponse();
int OPS_getLoadFactor();
int OPS_printModel();
int OPS_printModelGID();
int OPS_getCTestNorms();
int OPS_getCTestIter();
int OPS_Recorder();
int OPS_eleForce();
int OPS_eleDynamicalForce();
int OPS_nodeUnbalance();
int OPS_nodeVel();
int OPS_nodeAccel();
int OPS_nodeResponse();
int OPS_nodeCoord();
int OPS_setNodeCoord();
int OPS_updateElementDomain();
int OPS_eleNodes();
int OPS_nodeMass();
int OPS_nodePressure();
int OPS_nodeBounds();
int OPS_setPrecision();
int OPS_getEleTags();
int OPS_getNodeTags();
int OPS_getParamTags();
int OPS_getParamValue();
int OPS_sectionForce();
int OPS_sectionDeformation();
int OPS_sectionStiffness();
int OPS_sectionFlexibility();
int OPS_sectionLocation();
int OPS_sectionWeight();
int OPS_basicDeformation();
int OPS_basicForce();
int OPS_basicStiffness();
int OPS_version();
int OPS_maxOpenFiles();
/* OpenSeesMiscCommands.cpp */
int OPS_loadConst();
int OPS_calculateNodalReactions();
int OPS_rayleighDamping();
int OPS_setTime();
int OPS_removeObject();
int OPS_addNodalMass();
int OPS_buildModel();
int OPS_setNodeVel();
int OPS_setElementRayleighDampingFactors();
int OPS_MeshRegion();
int OPS_peerNGA();
int OPS_domainChange();
int OPS_record();
int OPS_stripOpenSeesXML();
int OPS_convertBinaryToText();
int OPS_convertTextToBinary();
int OPS_InitialStateAnalysis();
int OPS_RigidLink();
int OPS_RigidDiaphragm();
int OPS_addElementRayleigh();
int OPS_mesh();
int OPS_remesh();
/* OpenSeesCommands.cpp */
int OPS_wipe();
int OPS_wipeAnalysis();
int OPS_model();
int OPS_System();
int OPS_Numberer();
int OPS_ConstraintHandler();
int OPS_CTest();
int OPS_Integrator();
int OPS_Algorithm();
int OPS_Analysis();
int OPS_analyze();
int OPS_eigenAnalysis();
int OPS_resetModel();
int OPS_initializeAnalysis();
int OPS_printA();
int OPS_printB();
int OPS_Database();
int OPS_save();
int OPS_restore();
int OPS_startTimer();
int OPS_stopTimer();
int OPS_modalDamping();
int OPS_modalDampingQ();
int OPS_neesMetaData();
int OPS_neesUpload();
int OPS_totalCPU();
int OPS_solveCPU();
int OPS_accelCPU();
int OPS_numFact();
int OPS_numIter();
int OPS_systemSize();
void* OPS_KrylovNewton();
void* OPS_RaphsonNewton();
void* OPS_MillerNewton();
void* OPS_SecantNewton();
void* OPS_PeriodicNewton();
void* OPS_NewtonLineSearch();
/* Defined in its own class.cpp*/
int OPS_Node();
int OPS_HomogeneousBC();
int OPS_EqualDOF();
int OPS_EqualDOF_Mixed();
int OPS_HomogeneousBC_X();
int OPS_HomogeneousBC_Y();
int OPS_HomogeneousBC_Z();
int OPS_BackgroundMesh();
int OPS_ShallowFoundationGen();
void* OPS_TimeSeriesIntegrator();
void* OPS_BandGenLinLapack();
void* OPS_BandSPDLinLapack();
void* OPS_SuperLUSolver();
void* OPS_ProfileSPDLinDirectSolver();
void* OPS_UmfpackGenLinSolver();
void* OPS_DiagonalDirectSolver();
void* OPS_SProfileSPDLinSolver();
void* OPS_PFEMSolver();
void* OPS_PFEMCompressibleSolver();
void* OPS_PFEMSolver_Umfpack();
void* OPS_SymSparseLinSolver();
void* OPS_FullGenLinLapackSolver();
void* OPS_PlainNumberer();
void* OPS_PlainHandler();
void* OPS_PenaltyConstraintHandler();
void* OPS_LagrangeConstraintHandler();
void* OPS_TransformationConstraintHandler();
void* OPS_CTestNormUnbalance();
void* OPS_CTestNormDispIncr();
void* OPS_CTestEnergyIncr();
void* OPS_NormDispAndUnbalance();
void* OPS_NormDispOrUnbalance();
void* OPS_CTestPFEM();
void* OPS_CTestFixedNumIter();
void* OPS_CTestRelativeNormUnbalance();
void* OPS_CTestRelativeNormDispIncr();
void* OPS_CTestRelativeEnergyIncr();
void* OPS_CTestRelativeTotalNormDispIncr();
void* OPS_LoadControlIntegrator();
void* OPS_DisplacementControlIntegrator();
void* OPS_Newmark();
void* OPS_ArcLength();
void* OPS_ArcLength1();
void* OPS_HSConstraint();
void* OPS_MinUnbalDispNorm();
void* OPS_TRBDF2();
void* OPS_TRBDF3();
void* OPS_Houbolt();
void* OPS_BackwardEuler();
void* OPS_PFEMIntegrator();
void* OPS_NewmarkExplicit();
void* OPS_NewmarkHSIncrReduct();
void* OPS_NewmarkHSIncrLimit();
void* OPS_NewmarkHSFixedNumIter();
void* OPS_HHT();
void* OPS_HHT_TP();
void* OPS_HHTGeneralized();
void* OPS_HHTGeneralized_TP();
void* OPS_HHTExplicit();
void* OPS_HHTExplicit_TP();
void* OPS_HHTGeneralizedExplicit();
void* OPS_HHTGeneralizedExplicit_TP();
void* OPS_HHTHSIncrLimit();
void* OPS_HHTHSIncrLimit_TP();
void* OPS_HHTHSIncrReduct();
void* OPS_HHTHSIncrReduct_TP();
void* OPS_HHTHSFixedNumIter();
void* OPS_HHTHSFixedNumIter_TP();
void* OPS_GeneralizedAlpha();
void* OPS_KRAlphaExplicit();
void* OPS_KRAlphaExplicit_TP();
void* OPS_AlphaOS();
void* OPS_AlphaOS_TP();
void* OPS_AlphaOSGeneralized();
void* OPS_AlphaOSGeneralized_TP();
void* OPS_Collocation();
void* OPS_CollocationHSIncrReduct();
void* OPS_CollocationHSIncrLimit();
void* OPS_CollocationHSFixedNumIter();
void* OPS_Newmark1();
void* OPS_WilsonTheta();
void* OPS_CentralDifference();
void* OPS_CentralDifferenceAlternative();
void* OPS_CentralDifferenceNoDamping();
void* OPS_LinearAlgorithm();
void* OPS_NewtonRaphsonAlgorithm();
void* OPS_ModifiedNewton();
void* OPS_Broyden();
void* OPS_BFGS();
//////////////////////////////////////////////////////
// commands that changed or added:
// pattern section block2d block3d beamIntegration
// forceBeamColumn dispBeamColumn timoshenkoBeamColumn
// forceBeamColumnCBDI forceBeamColumnCSBDI forceBeamColumnWarping
// elasticForceBeamColumnWarping dispBeamColumnNL dispBeamColumnThermal
// elasticForceBeamColumn nonlinearBeamColumn dispBeamColumnWithSensitivity
//
// missing : video, logFile, getNP, getPI, barrier, send, recv, partition,
// defaultUnits, setParameter, reliability, wipeReliability,
// parameter, addToParameter, updateParameter, FiberThermal, FiberInt,
// UCFiber, TclModelBuilderYS_SectionCommand, yieldSurface_BC,
// ysEvolutionModel, plasticMaterial, cyclicModel, damageModel,
// FirePattern, PySimple1Gen, TzSimple1Gen, Hfiber, frictionModel,
// stiffnessDegradation, unloadingRule, strengthDegradation,
// hystereticBackbone, updateMaterialStage, updateMaterials,
// loadPackage
#endif