Rev 2965 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2965 | fmk | 1 | /* ****************************************************************** ** |
| 2 | ** OpenSees - Open System for Earthquake Engineering Simulation ** |
||
| 3 | ** Pacific Earthquake Engineering Research Center ** |
||
| 4 | ** ** |
||
| 5 | ** ** |
||
| 6 | ** (C) Copyright 1999, The Regents of the University of California ** |
||
| 7 | ** All Rights Reserved. ** |
||
| 8 | ** ** |
||
| 9 | ** Commercial use of this program without express permission of the ** |
||
| 10 | ** University of California, Berkeley, is strictly prohibited. See ** |
||
| 11 | ** file 'COPYRIGHT' in main directory for information on usage and ** |
||
| 12 | ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** |
||
| 13 | ** ** |
||
| 14 | ** Developed by: ** |
||
| 15 | ** Frank McKenna (fmckenna@ce.berkeley.edu) ** |
||
| 16 | ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** |
||
| 17 | ** Filip C. Filippou (filippou@ce.berkeley.edu) ** |
||
| 18 | ** ** |
||
| 19 | ** ****************************************************************** */ |
||
| 20 | |||
| 21 | // $Revision: 1.1 $ |
||
| 22 | // $Date: 2007-07-03 18:47:28 $ |
||
| 23 | // $Source: /usr/local/cvs/OpenSees/SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp,v $ |
||
| 24 | |||
| 25 | // Written: fmk |
||
| 26 | // Revision: A |
||
| 27 | // |
||
| 28 | // Purpose: This file contains the class definition for FEM_ObjectBrokerAllClasses. |
||
| 29 | // FEM_ObjectBrokerAllClasses is is an object broker class for the finite element |
||
| 30 | // method. All methods are virtual to allow for subclasses; which can be |
||
| 31 | // used by programmers when introducing new subclasses of the main objects. |
||
| 32 | // |
||
| 33 | // What: "@(#) FEM_ObjectBrokerAllClasses.C, revA" |
||
| 34 | |||
| 35 | |||
| 36 | #include <FEM_ObjectBrokerAllClasses.h> |
||
| 37 | |||
| 38 | // ActorTypes |
||
| 39 | #include <ActorSubdomain.h> |
||
| 40 | |||
| 41 | // Convergence tests |
||
| 42 | #include <CTestNormUnbalance.h> |
||
| 43 | #include <CTestNormDispIncr.h> |
||
| 44 | #include <CTestEnergyIncr.h> |
||
| 45 | |||
| 46 | // graph numbering schemes |
||
| 47 | #include <RCM.h> |
||
| 48 | #include <MyRCM.h> |
||
| 49 | #include <SimpleNumberer.h> |
||
| 50 | |||
| 51 | |||
| 52 | // uniaxial material model header files |
||
| 53 | #include <ElasticMaterial.h> |
||
| 54 | #include <Elastic2Material.h> |
||
| 55 | #include <ElasticPPMaterial.h> |
||
| 56 | #include <ParallelMaterial.h> |
||
| 57 | #include <Concrete01.h> |
||
| 58 | #include <Steel01.h> |
||
| 59 | #include <HardeningMaterial.h> |
||
| 60 | #include <HystereticMaterial.h> |
||
| 61 | #include <EPPGapMaterial.h> |
||
| 62 | #include <ViscousMaterial.h> |
||
| 63 | #include <PathIndependentMaterial.h> |
||
| 64 | #include <SeriesMaterial.h> |
||
| 65 | #include <CableMaterial.h> |
||
| 66 | #include <ENTMaterial.h> |
||
| 67 | #include <MinMaxMaterial.h> |
||
| 68 | |||
| 69 | //PY springs: RWBoulanger and BJeremic |
||
| 70 | #include <PySimple1.h> |
||
| 71 | #include <TzSimple1.h> |
||
| 72 | #include <QzSimple1.h> |
||
| 73 | #include <PyLiq1.h> |
||
| 74 | #include <TzLiq1.h> |
||
| 75 | |||
| 76 | |||
| 77 | #include <FedeasBond1Material.h> |
||
| 78 | #include <FedeasBond2Material.h> |
||
| 79 | #include <FedeasConcr1Material.h> |
||
| 80 | #include <FedeasConcr2Material.h> |
||
| 81 | #include <FedeasConcr3Material.h> |
||
| 82 | #include <FedeasHardeningMaterial.h> |
||
| 83 | #include <FedeasHyster1Material.h> |
||
| 84 | #include <FedeasHyster2Material.h> |
||
| 85 | #include <FedeasSteel1Material.h> |
||
| 86 | #include <FedeasSteel2Material.h> |
||
| 87 | |||
| 88 | #include <DrainBilinearMaterial.h> |
||
| 89 | #include <DrainClough1Material.h> |
||
| 90 | #include <DrainClough2Material.h> |
||
| 91 | #include <DrainPinch1Material.h> |
||
| 92 | |||
| 93 | // Sections |
||
| 94 | #include <ElasticSection2d.h> |
||
| 95 | #include <ElasticSection3d.h> |
||
| 96 | #include <GenericSection1d.h> |
||
| 97 | //#include <GenericSectionNd.h> |
||
| 98 | #include <SectionAggregator.h> |
||
| 99 | //#include <FiberSection.h> |
||
| 100 | #include <FiberSection2d.h> |
||
| 101 | #include <FiberSection3d.h> |
||
| 102 | #include <ElasticPlateSection.h> |
||
| 103 | #include <ElasticMembranePlateSection.h> |
||
| 104 | #include <MembranePlateFiberSection.h> |
||
| 105 | #include <Bidirectional.h> |
||
| 106 | |||
| 107 | // NDMaterials |
||
| 108 | #include <ElasticIsotropicPlaneStrain2D.h> |
||
| 109 | #include <ElasticIsotropicPlaneStress2D.h> |
||
| 110 | #include <ElasticIsotropicPlateFiber.h> |
||
| 111 | #include <ElasticIsotropicAxiSymm.h> |
||
| 112 | #include <ElasticIsotropic3D.h> |
||
| 113 | #include <J2PlaneStrain.h> |
||
| 114 | #include <J2PlaneStress.h> |
||
| 115 | #include <J2PlateFiber.h> |
||
| 116 | #include <J2AxiSymm.h> |
||
| 117 | #include <J2ThreeDimensional.h> |
||
| 118 | #include <PlaneStressMaterial.h> |
||
| 119 | #include <PlateFiberMaterial.h> |
||
| 120 | #include <FeapMaterial03.h> |
||
| 121 | |||
| 122 | #include <FluidSolidPorousMaterial.h> |
||
| 123 | #include <PressureDependMultiYield.h> |
||
| 124 | #include <PressureIndependMultiYield.h> |
||
| 125 | |||
| 126 | // Fibers |
||
| 127 | #include <UniaxialFiber2d.h> |
||
| 128 | #include <UniaxialFiber3d.h> |
||
| 129 | // element header files |
||
| 130 | #include <Element.h> |
||
| 131 | #include <beam2d02.h> |
||
| 132 | #include <beam2d03.h> |
||
| 133 | #include <beam2d04.h> |
||
| 134 | #include <beam3d01.h> |
||
| 135 | #include <beam3d02.h> |
||
| 136 | #include <Truss.h> |
||
| 137 | #include <TrussSection.h> |
||
| 138 | #include <CorotTruss.h> |
||
| 139 | #include <CorotTrussSection.h> |
||
| 140 | #include <ZeroLength.h> |
||
| 141 | #include <ZeroLengthSection.h> |
||
| 142 | //#include <ZeroLengthND.h> |
||
| 143 | #include <FourNodeQuad.h> |
||
| 144 | #include <EnhancedQuad.h> |
||
| 145 | #include <NineNodeMixedQuad.h> |
||
| 146 | #include <ConstantPressureVolumeQuad.h> |
||
| 147 | #include <ElasticBeam2d.h> |
||
| 148 | #include <ElasticBeam3d.h> |
||
| 149 | #include <ForceBeamColumn2d.h> |
||
| 150 | #include <ForceBeamColumn3d.h> |
||
| 151 | |||
| 152 | #include <Nine_Four_Node_QuadUP.h> |
||
| 153 | #include <BrickUP.h> |
||
| 154 | #include <Twenty_Eight_Node_BrickUP.h> |
||
| 155 | #include <FourNodeQuadUP.h> |
||
| 156 | |||
| 157 | #include <DispBeamColumn2d.h> |
||
| 158 | #include <DispBeamColumn3d.h> |
||
| 159 | #include <ShellMITC4.h> |
||
| 160 | #include <Brick.h> |
||
| 161 | #include <BbarBrick.h> |
||
| 162 | #include <Joint2D.h> // Arash |
||
| 163 | |||
| 164 | |||
| 165 | #include <LinearCrdTransf2d.h> |
||
| 166 | #include <LinearCrdTransf3d.h> |
||
| 167 | #include <PDeltaCrdTransf2d.h> |
||
| 168 | #include <PDeltaCrdTransf3d.h> |
||
| 169 | #include <CorotCrdTransf2d.h> |
||
| 170 | #include <CorotCrdTransf3d.h> |
||
| 171 | |||
| 172 | #include <HingeMidpointBeamIntegration.h> |
||
| 173 | #include <HingeEndpointBeamIntegration.h> |
||
| 174 | #include <HingeRadauBeamIntegration.h> |
||
| 175 | #include <HingeRadauTwoBeamIntegration.h> |
||
| 176 | #include <LobattoBeamIntegration.h> |
||
| 177 | #include <LegendreBeamIntegration.h> |
||
| 178 | #include <RadauBeamIntegration.h> |
||
| 179 | #include <NewtonCotesBeamIntegration.h> |
||
| 180 | |||
| 181 | // node header files |
||
| 182 | #include <Node.h> |
||
| 183 | |||
| 184 | |||
| 185 | #include <FileStream.h> |
||
| 186 | #include <StandardStream.h> |
||
| 187 | #include <XmlFileStream.h> |
||
| 188 | #include <DataFileStream.h> |
||
| 189 | #include <DatabaseStream.h> |
||
| 190 | #include <DummyStream.h> |
||
| 191 | |||
| 192 | #include <NodeRecorder.h> |
||
| 193 | #include <ElementRecorder.h> |
||
| 194 | #include <EnvelopeNodeRecorder.h> |
||
| 195 | #include <EnvelopeElementRecorder.h> |
||
| 196 | |||
| 197 | |||
| 198 | // mp_constraint header files |
||
| 199 | #include <MP_Constraint.h> |
||
| 200 | #include <MP_Joint2D.h> |
||
| 201 | |||
| 202 | // sp_constraint header files |
||
| 203 | #include <SP_Constraint.h> |
||
| 204 | #include <SP_Constraint.h> |
||
| 205 | #include <ImposedMotionSP.h> |
||
| 206 | #include <ImposedMotionSP1.h> |
||
| 207 | |||
| 208 | // nodal load header files |
||
| 209 | #include <NodalLoad.h> |
||
| 210 | |||
| 211 | // elemental load header files |
||
| 212 | #include <ElementalLoad.h> |
||
| 213 | #include<Beam2dUniformLoad.h> |
||
| 214 | #include<Beam2dPointLoad.h> |
||
| 215 | #include<Beam3dUniformLoad.h> |
||
| 216 | #include<Beam3dPointLoad.h> |
||
| 217 | #include<BrickSelfWeight.h> |
||
| 218 | |||
| 219 | // matrix, vector & id header files |
||
| 220 | #include <Matrix.h> |
||
| 221 | #include <Vector.h> |
||
| 222 | #include <ID.h> |
||
| 223 | |||
| 224 | // subdomain header files |
||
| 225 | #include <Subdomain.h> |
||
| 226 | |||
| 227 | // constraint handler header files |
||
| 228 | #include <ConstraintHandler.h> |
||
| 229 | #include <PlainHandler.h> |
||
| 230 | #include <PenaltyConstraintHandler.h> |
||
| 231 | #include <LagrangeConstraintHandler.h> |
||
| 232 | #include <TransformationConstraintHandler.h> |
||
| 233 | |||
| 234 | // dof numberer header files |
||
| 235 | #include <DOF_Numberer.h> |
||
| 236 | #include <PlainNumberer.h> |
||
| 237 | |||
| 238 | // analysis model header files |
||
| 239 | #include <AnalysisModel.h> |
||
| 240 | |||
| 241 | // equi soln algo header files |
||
| 242 | #include <EquiSolnAlgo.h> |
||
| 243 | #include <Linear.h> |
||
| 244 | #include <NewtonRaphson.h> |
||
| 245 | #include <Broyden.h> |
||
| 246 | #include <NewtonLineSearch.h> |
||
| 247 | #include <KrylovNewton.h> |
||
| 248 | #include <ModifiedNewton.h> |
||
| 249 | |||
| 250 | |||
| 251 | #include <BisectionLineSearch.h> |
||
| 252 | #include <InitialInterpolatedLineSearch.h> |
||
| 253 | #include <RegulaFalsiLineSearch.h> |
||
| 254 | #include <SecantLineSearch.h> |
||
| 255 | |||
| 256 | // domain decomp soln algo header files |
||
| 257 | #include <DomainDecompAlgo.h> |
||
| 258 | |||
| 259 | // integrator header files |
||
| 260 | #include <LoadControl.h> |
||
| 261 | #include <ArcLength.h> |
||
| 262 | #include <TransientIntegrator.h> |
||
| 263 | #include <Newmark.h> |
||
| 264 | #include <DisplacementControl.h> |
||
| 265 | #include <CentralDifferenceNoDamping.h> |
||
| 266 | #include <CentralDifferenceAlternative.h> |
||
| 267 | |||
| 268 | #ifdef _PARALLEL_PROCESSING |
||
| 269 | #include <DistributedDisplacementControl.h> |
||
| 270 | #endif |
||
| 271 | // system of eqn header files |
||
| 272 | #include <LinearSOE.h> |
||
| 273 | #include <DomainSolver.h> |
||
| 274 | #include <FullGenLinSOE.h> |
||
| 275 | #include <FullGenLinLapackSolver.h> |
||
| 276 | #include <BandGenLinSOE.h> |
||
| 277 | |||
| 278 | #include <BandGenLinLapackSolver.h> |
||
| 279 | #include <BandSPDLinSOE.h> |
||
| 280 | #include <BandSPDLinLapackSolver.h> |
||
| 281 | #include <ProfileSPDLinSOE.h> |
||
| 282 | #include <ProfileSPDLinDirectSolver.h> |
||
| 283 | #include <ProfileSPDLinSubstrSolver.h> |
||
| 284 | |||
| 285 | #include <SparseGenColLinSOE.h> |
||
| 286 | #include <SuperLU.h> |
||
| 287 | |||
| 288 | #include <DomainDecompositionAnalysis.h> |
||
| 289 | |||
| 290 | // load patterns |
||
| 291 | #include <LoadPattern.h> |
||
| 292 | #include <UniformExcitation.h> |
||
| 293 | #include <MultiSupportPattern.h> |
||
| 294 | #include <GroundMotion.h> |
||
| 295 | #include <InterpolatedGroundMotion.h> |
||
| 296 | |||
| 297 | #include <Parameter.h> |
||
| 298 | #include <MaterialStageParameter.h> |
||
| 299 | #include <MatParameter.h> |
||
| 300 | |||
| 301 | // time series |
||
| 302 | #include <LinearSeries.h> |
||
| 303 | #include <PathSeries.h> |
||
| 304 | #include <PathTimeSeries.h> |
||
| 305 | #include <RectangularSeries.h> |
||
| 306 | #include <ConstantSeries.h> |
||
| 307 | #include <TrigSeries.h> |
||
| 308 | |||
| 309 | // time series integrators |
||
| 310 | #include <TrapezoidalTimeSeriesIntegrator.h> |
||
| 311 | |||
| 312 | #ifdef _PETSC |
||
| 313 | #include <PetscSOE.h> |
||
| 314 | #include <PetscSolver.h> |
||
| 315 | #include <SparseGenColLinSOE.h> |
||
| 316 | #include <PetscSparseSeqSolver.h> |
||
| 317 | #endif |
||
| 318 | |||
| 319 | |||
| 320 | #ifdef _MUMPS |
||
| 321 | #include <MumpsSOE.h> |
||
| 322 | #include <MumpsSolver.h> |
||
| 323 | #ifdef _PARALLEL_PROCESSING |
||
| 324 | #include <MumpsParallelSOE.h> |
||
| 325 | #include <MumpsParallelSolver.h> |
||
| 326 | #endif |
||
| 327 | #endif |
||
| 328 | |||
| 329 | #ifdef _PARALLEL_PROCESSING |
||
| 330 | #include <DistributedBandSPDLinSOE.h> |
||
| 331 | #include <DistributedProfileSPDLinSOE.h> |
||
| 332 | #include <DistributedSparseGenColLinSOE.h> |
||
| 333 | #include <DistributedSparseGenRowLinSOE.h> |
||
| 334 | #include <DistributedSparseGenRowLinSolver.h> |
||
| 335 | #include <DistributedBandGenLinSOE.h> |
||
| 336 | #include <DistributedSuperLU.h> |
||
| 337 | #include <ParallelNumberer.h> |
||
| 338 | #include <StaticDomainDecompositionAnalysis.h> |
||
| 339 | #include <TransientDomainDecompositionAnalysis.h> |
||
| 340 | #include <DistributedDiagonalSOE.h> |
||
| 341 | #include <DistributedDiagonalSolver.h> |
||
| 342 | #endif |
||
| 343 | |||
| 344 | #include <TclFeViewer.h> |
||
| 345 | |||
| 346 | #include <packages.h> |
||
| 347 | |||
| 348 | typedef struct uniaxialPackage { |
||
| 349 | int classTag; |
||
| 350 | char *libName; |
||
| 351 | char *funcName; |
||
| 352 | UniaxialMaterial *(*funcPtr)(void); |
||
| 353 | struct uniaxialPackage *next; |
||
| 354 | } UniaxialPackage; |
||
| 355 | |||
| 356 | static UniaxialPackage *theUniaxialPackage = NULL; |
||
| 357 | |||
| 358 | |||
| 359 | |||
| 360 | FEM_ObjectBrokerAllClasses::FEM_ObjectBrokerAllClasses() |
||
| 361 | :lastLinearSolver(0),lastDomainSolver(0) |
||
| 362 | { |
||
| 363 | |||
| 364 | } |
||
| 365 | |||
| 366 | |||
| 367 | FEM_ObjectBrokerAllClasses::~FEM_ObjectBrokerAllClasses() |
||
| 368 | { |
||
| 369 | |||
| 370 | } |
||
| 371 | |||
| 372 | |||
| 373 | Actor * |
||
| 374 | FEM_ObjectBrokerAllClasses::getNewActor(int classTag, Channel *theChannel) |
||
| 375 | { |
||
| 376 | switch(classTag) { |
||
| 377 | |||
| 378 | #ifdef _PARALLEL_PROCESSING |
||
| 379 | case ACTOR_TAGS_SUBDOMAIN: |
||
| 380 | return new ActorSubdomain(*theChannel, *this); |
||
| 381 | #endif |
||
| 382 | |||
| 383 | default: |
||
| 384 | opserr << "FEM_ObjectBrokerAllClasses::getNewActor - "; |
||
| 385 | opserr << " - no ActorType type exists for class tag "; |
||
| 386 | opserr << classTag << endln; |
||
| 387 | return 0; |
||
| 388 | } |
||
| 389 | } |
||
| 390 | |||
| 391 | |||
| 392 | PartitionedModelBuilder * |
||
| 393 | FEM_ObjectBrokerAllClasses::getPtrNewPartitionedModelBuilder(Subdomain &theSubdomain, |
||
| 394 | int classTag) |
||
| 395 | { |
||
| 396 | switch(classTag) { |
||
| 397 | /* |
||
| 398 | case PartitionedModelBuilder_TAGS_PartitionedQuick2dFrameModel: |
||
| 399 | return new PartitionedQuick2dFrame(theSubdomain); |
||
| 400 | */ |
||
| 401 | |||
| 402 | default: |
||
| 403 | opserr << "FEM_ObjectBrokerAllClasses::getPtrNewPartitionedModelBuilder - "; |
||
| 404 | opserr << " - no PartitionedModelBuilder type exists for class tag "; |
||
| 405 | opserr << classTag << endln; |
||
| 406 | return 0; |
||
| 407 | |||
| 408 | } |
||
| 409 | } |
||
| 410 | |||
| 411 | |||
| 412 | GraphNumberer * |
||
| 413 | FEM_ObjectBrokerAllClasses::getPtrNewGraphNumberer(int classTag) |
||
| 414 | { |
||
| 415 | switch(classTag) { |
||
| 416 | case GraphNUMBERER_TAG_RCM: |
||
| 417 | return new RCM(); |
||
| 418 | |||
| 419 | |||
| 420 | case GraphNUMBERER_TAG_MyRCM: |
||
| 421 | return new MyRCM(); |
||
| 422 | |||
| 423 | |||
| 424 | case GraphNUMBERER_TAG_SimpleNumberer: |
||
| 425 | return new SimpleNumberer(); |
||
| 426 | |||
| 427 | |||
| 428 | default: |
||
| 429 | opserr << "ObjectBrokerAllClasses::getPtrNewGraphNumberer - "; |
||
| 430 | opserr << " - no GraphNumberer type exists for class tag " ; |
||
| 431 | opserr << classTag << endln; |
||
| 432 | return 0; |
||
| 433 | |||
| 434 | } |
||
| 435 | } |
||
| 436 | |||
| 437 | /***************************************** |
||
| 438 | * |
||
| 439 | * METHODS TO GET NEW MODELLING CLASSES |
||
| 440 | * |
||
| 441 | *****************************************/ |
||
| 442 | |||
| 443 | |||
| 444 | |||
| 445 | |||
| 446 | |||
| 447 | |||
| 448 | |||
| 449 | |||
| 450 | Element * |
||
| 451 | FEM_ObjectBrokerAllClasses::getNewElement(int classTag) |
||
| 452 | { |
||
| 453 | switch(classTag) { |
||
| 454 | |||
| 455 | case ELE_TAG_Truss: |
||
| 456 | return new Truss(); |
||
| 457 | |||
| 458 | case ELE_TAG_TrussSection: |
||
| 459 | return new TrussSection(); |
||
| 460 | |||
| 461 | case ELE_TAG_CorotTruss: |
||
| 462 | return new CorotTruss(); |
||
| 463 | |||
| 464 | case ELE_TAG_CorotTrussSection: |
||
| 465 | return new CorotTrussSection(); |
||
| 466 | |||
| 467 | case ELE_TAG_ZeroLength: |
||
| 468 | return new ZeroLength(); |
||
| 469 | |||
| 470 | case ELE_TAG_ZeroLengthSection: |
||
| 471 | return new ZeroLengthSection(); |
||
| 472 | |||
| 473 | //case ELE_TAG_ZeroLengthND: |
||
| 474 | //return new ZeroLengthND(); |
||
| 475 | |||
| 476 | case ELE_TAG_FourNodeQuadUP: |
||
| 477 | return new FourNodeQuadUP(); |
||
| 478 | |||
| 479 | case ELE_TAG_FourNodeQuad: |
||
| 480 | return new FourNodeQuad(); |
||
| 481 | |||
| 482 | case ELE_TAG_ElasticBeam2d: |
||
| 483 | return new ElasticBeam2d(); |
||
| 484 | |||
| 485 | case ELE_TAG_ElasticBeam3d: |
||
| 486 | return new ElasticBeam3d(); |
||
| 487 | |||
| 488 | case ELE_TAG_ForceBeamColumn2d: |
||
| 489 | return new ForceBeamColumn2d(); |
||
| 490 | |||
| 491 | case ELE_TAG_ForceBeamColumn3d: |
||
| 492 | return new ForceBeamColumn3d(); |
||
| 493 | |||
| 494 | case ELE_TAG_DispBeamColumn2d: |
||
| 495 | return new DispBeamColumn2d(); |
||
| 496 | |||
| 497 | case ELE_TAG_DispBeamColumn3d: |
||
| 498 | return new DispBeamColumn3d(); |
||
| 499 | |||
| 500 | case ELE_TAG_EnhancedQuad: |
||
| 501 | return new EnhancedQuad(); |
||
| 502 | |||
| 503 | case ELE_TAG_NineNodeMixedQuad: |
||
| 504 | return new NineNodeMixedQuad(); |
||
| 505 | |||
| 506 | case ELE_TAG_ConstantPressureVolumeQuad: |
||
| 507 | return new ConstantPressureVolumeQuad(); |
||
| 508 | |||
| 509 | case ELE_TAG_Brick: |
||
| 510 | return new Brick(); |
||
| 511 | |||
| 512 | case ELE_TAG_ShellMITC4: |
||
| 513 | return new ShellMITC4(); |
||
| 514 | |||
| 515 | case ELE_TAG_BbarBrick: |
||
| 516 | return new BbarBrick(); |
||
| 517 | |||
| 518 | case ELE_TAG_Joint2D: // Arash |
||
| 519 | return new Joint2D(); // Arash |
||
| 520 | |||
| 521 | |||
| 522 | case ELE_TAG_Nine_Four_Node_QuadUP: |
||
| 523 | return new NineFourNodeQuadUP(); |
||
| 524 | |||
| 525 | case ELE_TAG_BrickUP: |
||
| 526 | return new BrickUP(); |
||
| 527 | |||
| 528 | case ELE_TAG_Twenty_Eight_Node_BrickUP: |
||
| 529 | return new TwentyEightNodeBrickUP(); |
||
| 530 | |||
| 531 | default: |
||
| 532 | opserr << "FEM_ObjectBrokerAllClasses::getNewElement - "; |
||
| 533 | opserr << " - no Element type exists for class tag " ; |
||
| 534 | opserr << classTag << endln; |
||
| 535 | return 0; |
||
| 536 | |||
| 537 | } |
||
| 538 | } |
||
| 539 | |||
| 540 | Node * |
||
| 541 | FEM_ObjectBrokerAllClasses::getNewNode(int classTag) |
||
| 542 | { |
||
| 543 | switch(classTag) { |
||
| 544 | case NOD_TAG_Node: |
||
| 545 | return new Node(classTag); |
||
| 546 | |||
| 547 | |||
| 548 | default: |
||
| 549 | opserr << "FEM_ObjectBrokerAllClasses::getNewNode - "; |
||
| 550 | opserr << " - no Node type exists for class tag "; |
||
| 551 | opserr << classTag << endln; |
||
| 552 | return 0; |
||
| 553 | |||
| 554 | } |
||
| 555 | } |
||
| 556 | |||
| 557 | |||
| 558 | MP_Constraint * |
||
| 559 | FEM_ObjectBrokerAllClasses::getNewMP(int classTag) |
||
| 560 | { |
||
| 561 | switch(classTag) { |
||
| 562 | case CNSTRNT_TAG_MP_Constraint: |
||
| 563 | return new MP_Constraint( 0 , classTag); |
||
| 564 | |||
| 565 | case CNSTRNT_TAG_MP_Joint2D: // Arash |
||
| 566 | return new MP_Joint2D(); // Arash |
||
| 567 | |||
| 568 | default: |
||
| 569 | opserr << "FEM_ObjectBrokerAllClasses::getNewMP - "; |
||
| 570 | opserr << " - no MP_Constraint type exists for class tag "; |
||
| 571 | opserr << classTag << endln; |
||
| 572 | return 0; |
||
| 573 | |||
| 574 | } |
||
| 575 | } |
||
| 576 | |||
| 577 | |||
| 578 | SP_Constraint * |
||
| 579 | FEM_ObjectBrokerAllClasses::getNewSP(int classTag) |
||
| 580 | { |
||
| 581 | switch(classTag) { |
||
| 582 | case CNSTRNT_TAG_SP_Constraint: |
||
| 583 | return new SP_Constraint(classTag); |
||
| 584 | |||
| 585 | case CNSTRNT_TAG_ImposedMotionSP: |
||
| 586 | return new ImposedMotionSP(); |
||
| 587 | |||
| 588 | case CNSTRNT_TAG_ImposedMotionSP1: |
||
| 589 | return new ImposedMotionSP1(); |
||
| 590 | |||
| 591 | default: |
||
| 592 | opserr << "FEM_ObjectBrokerAllClasses::getNewSP - "; |
||
| 593 | opserr << " - no SP_Constraint type exists for class tag "; |
||
| 594 | opserr << classTag << endln; |
||
| 595 | return 0; |
||
| 596 | |||
| 597 | } |
||
| 598 | } |
||
| 599 | |||
| 600 | NodalLoad * |
||
| 601 | FEM_ObjectBrokerAllClasses::getNewNodalLoad(int classTag) |
||
| 602 | { |
||
| 603 | switch(classTag) { |
||
| 604 | case LOAD_TAG_NodalLoad: |
||
| 605 | return new NodalLoad(classTag); |
||
| 606 | |||
| 607 | |||
| 608 | default: |
||
| 609 | opserr << "FEM_ObjectBrokerAllClasses::getNewNodalLoad - "; |
||
| 610 | opserr << " - no NodalLoad type exists for class tag "; |
||
| 611 | opserr << classTag << endln; |
||
| 612 | return 0; |
||
| 613 | |||
| 614 | } |
||
| 615 | } |
||
| 616 | |||
| 617 | |||
| 618 | ElementalLoad * |
||
| 619 | FEM_ObjectBrokerAllClasses::getNewElementalLoad(int classTag) |
||
| 620 | { |
||
| 621 | switch(classTag) { |
||
| 622 | |||
| 623 | case LOAD_TAG_Beam2dUniformLoad: |
||
| 624 | return new Beam2dUniformLoad(); |
||
| 625 | |||
| 626 | case LOAD_TAG_Beam2dPointLoad: |
||
| 627 | return new Beam2dPointLoad(); |
||
| 628 | |||
| 629 | case LOAD_TAG_Beam3dUniformLoad: |
||
| 630 | return new Beam3dUniformLoad(); |
||
| 631 | |||
| 632 | case LOAD_TAG_Beam3dPointLoad: |
||
| 633 | return new Beam3dPointLoad(); |
||
| 634 | |||
| 635 | case LOAD_TAG_BrickSelfWeight: |
||
| 636 | return new BrickSelfWeight(); |
||
| 637 | |||
| 638 | default: |
||
| 639 | opserr << "FEM_ObjectBrokerAllClasses::getNewNodalLoad - "; |
||
| 640 | opserr << " - no NodalLoad type exists for class tag "; |
||
| 641 | opserr << classTag << endln; |
||
| 642 | return 0; |
||
| 643 | |||
| 644 | } |
||
| 645 | |||
| 646 | return 0; |
||
| 647 | } |
||
| 648 | |||
| 649 | CrdTransf2d* |
||
| 650 | FEM_ObjectBrokerAllClasses::getNewCrdTransf2d(int classTag) |
||
| 651 | { |
||
| 652 | switch(classTag) { |
||
| 653 | case CRDTR_TAG_LinearCrdTransf2d: |
||
| 654 | return new LinearCrdTransf2d(); |
||
| 655 | case CRDTR_TAG_PDeltaCrdTransf2d: |
||
| 656 | return new PDeltaCrdTransf2d(); |
||
| 657 | #ifdef _COROTATIONAL |
||
| 658 | case CRDTR_TAG_CorotCrdTransf2d: |
||
| 659 | return new CorotCrdTransf2d(); |
||
| 660 | #endif |
||
| 661 | default: |
||
| 662 | opserr << "FEM_ObjectBrokerAllClasses::getCrdTransf2d - "; |
||
| 663 | opserr << " - no CrdTransf2d type exists for class tag "; |
||
| 664 | opserr << classTag << endln; |
||
| 665 | return 0; |
||
| 666 | } |
||
| 667 | |||
| 668 | } |
||
| 669 | |||
| 670 | CrdTransf3d* |
||
| 671 | FEM_ObjectBrokerAllClasses::getNewCrdTransf3d(int classTag) |
||
| 672 | { |
||
| 673 | switch(classTag) { |
||
| 674 | case CRDTR_TAG_LinearCrdTransf3d: |
||
| 675 | return new LinearCrdTransf3d(); |
||
| 676 | case CRDTR_TAG_PDeltaCrdTransf3d: |
||
| 677 | return new PDeltaCrdTransf3d(); |
||
| 678 | #ifdef _COROTATIONAL |
||
| 679 | case CRDTR_TAG_CorotCrdTransf3d: |
||
| 680 | return new CorotCrdTransf3d(); |
||
| 681 | #endif |
||
| 682 | default: |
||
| 683 | opserr << "FEM_ObjectBrokerAllClasses::getCrdTransf3d - "; |
||
| 684 | opserr << " - no CrdTransf3d type exists for class tag "; |
||
| 685 | opserr << classTag << endln; |
||
| 686 | return 0; |
||
| 687 | } |
||
| 688 | |||
| 689 | } |
||
| 690 | |||
| 691 | BeamIntegration * |
||
| 692 | FEM_ObjectBrokerAllClasses::getNewBeamIntegration(int classTag) |
||
| 693 | { |
||
| 694 | switch(classTag) { |
||
| 695 | case BEAM_INTEGRATION_TAG_Lobatto: |
||
| 696 | return new LobattoBeamIntegration(); |
||
| 697 | |||
| 698 | case BEAM_INTEGRATION_TAG_Legendre: |
||
| 699 | return new LegendreBeamIntegration(); |
||
| 700 | |||
| 701 | case BEAM_INTEGRATION_TAG_Radau: |
||
| 702 | return new RadauBeamIntegration(); |
||
| 703 | |||
| 704 | case BEAM_INTEGRATION_TAG_NewtonCotes: |
||
| 705 | return new NewtonCotesBeamIntegration(); |
||
| 706 | |||
| 707 | case BEAM_INTEGRATION_TAG_HingeMidpoint: |
||
| 708 | return new HingeMidpointBeamIntegration(); |
||
| 709 | |||
| 710 | case BEAM_INTEGRATION_TAG_HingeRadau: |
||
| 711 | return new HingeRadauBeamIntegration(); |
||
| 712 | |||
| 713 | case BEAM_INTEGRATION_TAG_HingeRadauTwo: |
||
| 714 | return new HingeRadauTwoBeamIntegration(); |
||
| 715 | |||
| 716 | case BEAM_INTEGRATION_TAG_HingeEndpoint: |
||
| 717 | return new HingeEndpointBeamIntegration(); |
||
| 718 | |||
| 719 | default: |
||
| 720 | opserr << "FEM_ObjectBrokerAllClasses::getBeamIntegration - "; |
||
| 721 | opserr << " - no BeamIntegration type exists for class tag "; |
||
| 722 | opserr << classTag << endln; |
||
| 723 | return 0; |
||
| 724 | } |
||
| 725 | } |
||
| 726 | |||
| 727 | |||
| 728 | UniaxialMaterial * |
||
| 729 | FEM_ObjectBrokerAllClasses::getNewUniaxialMaterial(int classTag) |
||
| 730 | { |
||
| 731 | switch(classTag) { |
||
| 732 | case MAT_TAG_ElasticMaterial: |
||
| 733 | return new ElasticMaterial(); // values set in recvSelf |
||
| 734 | |||
| 735 | case MAT_TAG_Elastic2Material: |
||
| 736 | return new Elastic2Material(); |
||
| 737 | |||
| 738 | case MAT_TAG_ElasticPPMaterial: |
||
| 739 | return new ElasticPPMaterial(); // values set in recvSelf |
||
| 740 | |||
| 741 | case MAT_TAG_ParallelMaterial: |
||
| 742 | return new ParallelMaterial(); |
||
| 743 | |||
| 744 | case MAT_TAG_Concrete01: |
||
| 745 | return new Concrete01(); |
||
| 746 | |||
| 747 | case MAT_TAG_Steel01: |
||
| 748 | return new Steel01(); |
||
| 749 | |||
| 750 | case MAT_TAG_Hardening: |
||
| 751 | return new HardeningMaterial(); |
||
| 752 | |||
| 753 | //PY springs: RWBoulanger and BJeremic |
||
| 754 | case MAT_TAG_PySimple1: |
||
| 755 | return new PySimple1(); |
||
| 756 | |||
| 757 | case MAT_TAG_PyLiq1: |
||
| 758 | return new PyLiq1(); |
||
| 759 | |||
| 760 | case MAT_TAG_TzSimple1: |
||
| 761 | return new TzSimple1(); |
||
| 762 | |||
| 763 | case MAT_TAG_TzLiq1: |
||
| 764 | return new TzLiq1(); |
||
| 765 | |||
| 766 | case MAT_TAG_QzSimple1: |
||
| 767 | return new QzSimple1(); |
||
| 768 | |||
| 769 | |||
| 770 | case MAT_TAG_Hysteretic: |
||
| 771 | return new HystereticMaterial(); |
||
| 772 | |||
| 773 | case MAT_TAG_EPPGap: |
||
| 774 | return new EPPGapMaterial(); |
||
| 775 | |||
| 776 | case MAT_TAG_Viscous: |
||
| 777 | return new ViscousMaterial(); |
||
| 778 | |||
| 779 | case MAT_TAG_PathIndependent: |
||
| 780 | return new PathIndependentMaterial(); |
||
| 781 | |||
| 782 | case MAT_TAG_SeriesMaterial: |
||
| 783 | return new SeriesMaterial(); |
||
| 784 | |||
| 785 | case MAT_TAG_CableMaterial: |
||
| 786 | return new CableMaterial(); |
||
| 787 | |||
| 788 | case MAT_TAG_ENTMaterial: |
||
| 789 | return new ENTMaterial(); |
||
| 790 | |||
| 791 | case MAT_TAG_FedeasBond1: |
||
| 792 | return new FedeasBond1Material(); |
||
| 793 | |||
| 794 | case MAT_TAG_FedeasBond2: |
||
| 795 | return new FedeasBond2Material(); |
||
| 796 | |||
| 797 | case MAT_TAG_FedeasConcrete1: |
||
| 798 | return new FedeasConcr1Material(); |
||
| 799 | |||
| 800 | case MAT_TAG_FedeasConcrete2: |
||
| 801 | return new FedeasConcr2Material(); |
||
| 802 | |||
| 803 | case MAT_TAG_FedeasConcrete3: |
||
| 804 | return new FedeasConcr3Material(); |
||
| 805 | |||
| 806 | case MAT_TAG_FedeasHardening: |
||
| 807 | return new FedeasHardeningMaterial(); |
||
| 808 | |||
| 809 | case MAT_TAG_FedeasHysteretic1: |
||
| 810 | return new FedeasHyster1Material(); |
||
| 811 | |||
| 812 | case MAT_TAG_FedeasHysteretic2: |
||
| 813 | return new FedeasHyster2Material(); |
||
| 814 | |||
| 815 | case MAT_TAG_FedeasSteel1: |
||
| 816 | return new FedeasSteel1Material(); |
||
| 817 | |||
| 818 | case MAT_TAG_FedeasSteel2: |
||
| 819 | return new FedeasSteel2Material(); |
||
| 820 | |||
| 821 | case MAT_TAG_DrainBilinear: |
||
| 822 | return new DrainBilinearMaterial(); |
||
| 823 | |||
| 824 | case MAT_TAG_DrainClough1: |
||
| 825 | return new DrainClough1Material(); |
||
| 826 | |||
| 827 | case MAT_TAG_DrainClough2: |
||
| 828 | return new DrainClough2Material(); |
||
| 829 | |||
| 830 | case MAT_TAG_DrainPinch1: |
||
| 831 | return new DrainPinch1Material(); |
||
| 832 | |||
| 833 | case MAT_TAG_MinMax: |
||
| 834 | return new MinMaxMaterial(); |
||
| 835 | |||
| 836 | default: |
||
| 837 | |||
| 838 | UniaxialPackage *matCommands = theUniaxialPackage; |
||
| 839 | bool found = false; |
||
| 840 | while (matCommands != NULL && found == false) { |
||
| 841 | if ((matCommands->classTag == classTag) && (matCommands->funcPtr != 0)){ |
||
| 842 | UniaxialMaterial *result = (*(matCommands->funcPtr))(); |
||
| 843 | return result; |
||
| 844 | } |
||
| 845 | matCommands = matCommands->next; |
||
| 846 | } |
||
| 847 | |||
| 848 | opserr << "FEM_ObjectBrokerAllClasses::getNewUniaxialMaterial - "; |
||
| 849 | opserr << " - no UniaxialMaterial type exists for class tag "; |
||
| 850 | opserr << classTag << endln; |
||
| 851 | return 0; |
||
| 852 | |||
| 853 | } |
||
| 854 | } |
||
| 855 | |||
| 856 | SectionForceDeformation * |
||
| 857 | FEM_ObjectBrokerAllClasses::getNewSection(int classTag) |
||
| 858 | { |
||
| 859 | switch(classTag) { |
||
| 860 | case SEC_TAG_Elastic2d: |
||
| 861 | return new ElasticSection2d(); |
||
| 862 | |||
| 863 | case SEC_TAG_Elastic3d: |
||
| 864 | return new ElasticSection3d(); |
||
| 865 | |||
| 866 | case SEC_TAG_Generic1d: |
||
| 867 | return new GenericSection1d(); |
||
| 868 | |||
| 869 | //case SEC_TAG_GenericNd: |
||
| 870 | //return new GenericSectionNd(); |
||
| 871 | |||
| 872 | case SEC_TAG_Aggregator: |
||
| 873 | return new SectionAggregator(); |
||
| 874 | |||
| 875 | //case SEC_TAG_Fiber: |
||
| 876 | //return new FiberSection(); |
||
| 877 | |||
| 878 | case SEC_TAG_FiberSection2d: |
||
| 879 | return new FiberSection2d(); |
||
| 880 | |||
| 881 | case SEC_TAG_FiberSection3d: |
||
| 882 | return new FiberSection3d(); |
||
| 883 | |||
| 884 | case SEC_TAG_ElasticPlateSection: |
||
| 885 | return new ElasticPlateSection(); |
||
| 886 | |||
| 887 | case SEC_TAG_ElasticMembranePlateSection: |
||
| 888 | return new ElasticMembranePlateSection(); |
||
| 889 | |||
| 890 | case SEC_TAG_MembranePlateFiberSection: |
||
| 891 | return new MembranePlateFiberSection(); |
||
| 892 | |||
| 893 | case SEC_TAG_Bidirectional: |
||
| 894 | return new Bidirectional(); |
||
| 895 | |||
| 896 | default: |
||
| 897 | opserr << "FEM_ObjectBrokerAllClasses::getNewSection - "; |
||
| 898 | opserr << " - no section type exists for class tag "; |
||
| 899 | opserr << classTag << endln; |
||
| 900 | return 0; |
||
| 901 | |||
| 902 | } |
||
| 903 | } |
||
| 904 | |||
| 905 | NDMaterial* |
||
| 906 | FEM_ObjectBrokerAllClasses::getNewNDMaterial(int classTag) |
||
| 907 | { |
||
| 908 | switch(classTag) { |
||
| 909 | case ND_TAG_ElasticIsotropicPlaneStrain2d: |
||
| 910 | return new ElasticIsotropicPlaneStrain2D(); |
||
| 911 | |||
| 912 | case ND_TAG_ElasticIsotropicPlaneStress2d: |
||
| 913 | return new ElasticIsotropicPlaneStress2D(); |
||
| 914 | |||
| 915 | case ND_TAG_ElasticIsotropicAxiSymm: |
||
| 916 | return new ElasticIsotropicAxiSymm(); |
||
| 917 | |||
| 918 | case ND_TAG_ElasticIsotropicPlateFiber: |
||
| 919 | return new ElasticIsotropicPlateFiber(); |
||
| 920 | |||
| 921 | case ND_TAG_ElasticIsotropic3D: |
||
| 922 | return new ElasticIsotropic3D(); |
||
| 923 | |||
| 924 | case ND_TAG_J2PlaneStrain: |
||
| 925 | return new J2PlaneStrain(); |
||
| 926 | |||
| 927 | case ND_TAG_J2PlaneStress: |
||
| 928 | return new J2PlaneStress(); |
||
| 929 | |||
| 930 | case ND_TAG_J2AxiSymm: |
||
| 931 | return new J2AxiSymm(); |
||
| 932 | |||
| 933 | case ND_TAG_J2PlateFiber: |
||
| 934 | return new J2PlateFiber(); |
||
| 935 | |||
| 936 | case ND_TAG_J2ThreeDimensional: |
||
| 937 | return new J2ThreeDimensional(); |
||
| 938 | |||
| 939 | case ND_TAG_PlaneStressMaterial: |
||
| 940 | return new PlaneStressMaterial(); |
||
| 941 | |||
| 942 | case ND_TAG_PlateFiberMaterial: |
||
| 943 | return new PlateFiberMaterial(); |
||
| 944 | |||
| 945 | case ND_TAG_FluidSolidPorousMaterial: |
||
| 946 | return new FluidSolidPorousMaterial(); |
||
| 947 | |||
| 948 | case ND_TAG_PressureDependMultiYield: |
||
| 949 | return new PressureDependMultiYield(); |
||
| 950 | |||
| 951 | case ND_TAG_PressureIndependMultiYield: |
||
| 952 | return new PressureIndependMultiYield(); |
||
| 953 | |||
| 954 | case ND_TAG_FeapMaterial03: |
||
| 955 | return new FeapMaterial03(); |
||
| 956 | |||
| 957 | default: |
||
| 958 | opserr << "FEM_ObjectBrokerAllClasses::getNewNDMaterial - "; |
||
| 959 | opserr << " - no NDMaterial type exists for class tag "; |
||
| 960 | opserr << classTag << endln; |
||
| 961 | return 0; |
||
| 962 | } |
||
| 963 | } |
||
| 964 | |||
| 965 | Fiber* |
||
| 966 | FEM_ObjectBrokerAllClasses::getNewFiber(int classTag) |
||
| 967 | { |
||
| 968 | switch(classTag) { |
||
| 969 | case FIBER_TAG_Uniaxial2d: |
||
| 970 | return new UniaxialFiber2d(); |
||
| 971 | |||
| 972 | case FIBER_TAG_Uniaxial3d: |
||
| 973 | return new UniaxialFiber3d(); |
||
| 974 | |||
| 975 | default: |
||
| 976 | opserr << "FEM_ObjectBrokerAllClasses::getNewFiber - "; |
||
| 977 | opserr << " - no Fiber type exists for class tag "; |
||
| 978 | opserr << classTag << endln; |
||
| 979 | return 0; |
||
| 980 | } |
||
| 981 | } |
||
| 982 | |||
| 983 | ConvergenceTest * |
||
| 984 | FEM_ObjectBrokerAllClasses::getNewConvergenceTest(int classTag) |
||
| 985 | { |
||
| 986 | switch(classTag) { |
||
| 987 | case CONVERGENCE_TEST_CTestNormUnbalance: |
||
| 988 | return new CTestNormUnbalance(); |
||
| 989 | |||
| 990 | case CONVERGENCE_TEST_CTestNormDispIncr: |
||
| 991 | return new CTestNormDispIncr(); |
||
| 992 | |||
| 993 | case CONVERGENCE_TEST_CTestEnergyIncr: |
||
| 994 | return new CTestEnergyIncr(); |
||
| 995 | |||
| 996 | |||
| 997 | default: |
||
| 998 | opserr << "FEM_ObjectBrokerAllClasses::getNewConvergenceTest - "; |
||
| 999 | opserr << " - no ConvergenceTest type exists for class tag "; |
||
| 1000 | opserr << classTag << endln; |
||
| 1001 | return 0; |
||
| 1002 | |||
| 1003 | } |
||
| 1004 | } |
||
| 1005 | |||
| 1006 | |||
| 1007 | LoadPattern * |
||
| 1008 | FEM_ObjectBrokerAllClasses::getNewLoadPattern(int classTag) |
||
| 1009 | { |
||
| 1010 | switch(classTag) { |
||
| 1011 | case PATTERN_TAG_LoadPattern: |
||
| 1012 | return new LoadPattern(); |
||
| 1013 | |||
| 1014 | case PATTERN_TAG_UniformExcitation: |
||
| 1015 | return new UniformExcitation(); |
||
| 1016 | |||
| 1017 | case PATTERN_TAG_MultiSupportPattern: |
||
| 1018 | return new MultiSupportPattern(); |
||
| 1019 | |||
| 1020 | default: |
||
| 1021 | opserr << "FEM_ObjectBrokerAllClasses::getPtrLoadPattern - "; |
||
| 1022 | opserr << " - no Load type exists for class tag "; |
||
| 1023 | opserr << classTag << endln; |
||
| 1024 | return 0; |
||
| 1025 | |||
| 1026 | } |
||
| 1027 | } |
||
| 1028 | |||
| 1029 | |||
| 1030 | GroundMotion * |
||
| 1031 | FEM_ObjectBrokerAllClasses::getNewGroundMotion(int classTag) |
||
| 1032 | { |
||
| 1033 | switch(classTag) { |
||
| 1034 | |||
| 1035 | case GROUND_MOTION_TAG_GroundMotion: |
||
| 1036 | return new GroundMotion(GROUND_MOTION_TAG_GroundMotion); |
||
| 1037 | |||
| 1038 | case GROUND_MOTION_TAG_InterpolatedGroundMotion: |
||
| 1039 | return new GroundMotion(GROUND_MOTION_TAG_InterpolatedGroundMotion); |
||
| 1040 | |||
| 1041 | default: |
||
| 1042 | opserr << "FEM_ObjectBrokerAllClasses::getPtrGroundMotion - "; |
||
| 1043 | opserr << " - no Load type exists for class tag "; |
||
| 1044 | opserr << classTag << endln; |
||
| 1045 | return 0; |
||
| 1046 | |||
| 1047 | } |
||
| 1048 | } |
||
| 1049 | |||
| 1050 | TimeSeries * |
||
| 1051 | FEM_ObjectBrokerAllClasses::getNewTimeSeries(int classTag) |
||
| 1052 | { |
||
| 1053 | switch(classTag) { |
||
| 1054 | case TSERIES_TAG_LinearSeries: |
||
| 1055 | return new LinearSeries; |
||
| 1056 | |||
| 1057 | case TSERIES_TAG_RectangularSeries: |
||
| 1058 | return new RectangularSeries; |
||
| 1059 | |||
| 1060 | case TSERIES_TAG_PathTimeSeries: |
||
| 1061 | return new PathTimeSeries; |
||
| 1062 | |||
| 1063 | case TSERIES_TAG_PathSeries: |
||
| 1064 | return new PathSeries; |
||
| 1065 | |||
| 1066 | case TSERIES_TAG_ConstantSeries: |
||
| 1067 | return new ConstantSeries; |
||
| 1068 | |||
| 1069 | case TSERIES_TAG_TrigSeries: |
||
| 1070 | return new TrigSeries; |
||
| 1071 | |||
| 1072 | default: |
||
| 1073 | opserr << "FEM_ObjectBrokerAllClasses::getPtrTimeSeries - "; |
||
| 1074 | opserr << " - no Load type exists for class tag "; |
||
| 1075 | opserr << classTag << endln; |
||
| 1076 | return 0; |
||
| 1077 | |||
| 1078 | } |
||
| 1079 | } |
||
| 1080 | |||
| 1081 | TimeSeriesIntegrator * |
||
| 1082 | FEM_ObjectBrokerAllClasses::getNewTimeSeriesIntegrator(int classTag) |
||
| 1083 | { |
||
| 1084 | switch(classTag) { |
||
| 1085 | case TIMESERIES_INTEGRATOR_TAG_Trapezoidal: |
||
| 1086 | return new TrapezoidalTimeSeriesIntegrator(); |
||
| 1087 | |||
| 1088 | default: |
||
| 1089 | opserr << "FEM_ObjectBrokerAllClasses::getPtrTimeSeriesIntegrator - "; |
||
| 1090 | opserr << " - no Load type exists for class tag "; |
||
| 1091 | opserr << classTag << endln; |
||
| 1092 | return 0; |
||
| 1093 | |||
| 1094 | } |
||
| 1095 | } |
||
| 1096 | |||
| 1097 | |||
| 1098 | Matrix * |
||
| 1099 | FEM_ObjectBrokerAllClasses::getPtrNewMatrix(int classTag, int noRows, int noCols) |
||
| 1100 | { |
||
| 1101 | switch(classTag) { |
||
| 1102 | case MATRIX_TAG_Matrix: |
||
| 1103 | return new Matrix(noRows,noCols); |
||
| 1104 | |||
| 1105 | |||
| 1106 | default: |
||
| 1107 | opserr << "FEM_ObjectBrokerAllClasses::getPtrNewMatrix - "; |
||
| 1108 | opserr << " - no NodalLoad type exists for class tag "; |
||
| 1109 | opserr << classTag << endln; |
||
| 1110 | return 0; |
||
| 1111 | |||
| 1112 | } |
||
| 1113 | } |
||
| 1114 | |||
| 1115 | |||
| 1116 | Vector * |
||
| 1117 | FEM_ObjectBrokerAllClasses::getPtrNewVector(int classTag, int size) |
||
| 1118 | { |
||
| 1119 | switch(classTag) { |
||
| 1120 | case VECTOR_TAG_Vector: |
||
| 1121 | return new Vector(size); |
||
| 1122 | |||
| 1123 | |||
| 1124 | default: |
||
| 1125 | opserr << "FEM_ObjectBrokerAllClasses::getPtrNewVector - "; |
||
| 1126 | opserr << " - no Vector type exists for class tag "; |
||
| 1127 | opserr << classTag << endln; |
||
| 1128 | return 0; |
||
| 1129 | |||
| 1130 | } |
||
| 1131 | } |
||
| 1132 | |||
| 1133 | |||
| 1134 | ID * |
||
| 1135 | FEM_ObjectBrokerAllClasses::getPtrNewID(int classTag, int size) |
||
| 1136 | { |
||
| 1137 | switch(classTag) { |
||
| 1138 | case ID_TAG_ID: |
||
| 1139 | return new ID(size); |
||
| 1140 | |||
| 1141 | |||
| 1142 | default: |
||
| 1143 | opserr << "FEM_ObjectBrokerAllClasses::getPtrNewID - "; |
||
| 1144 | opserr << " - no ID type exists for class tag "; |
||
| 1145 | opserr << classTag << endln; |
||
| 1146 | return 0; |
||
| 1147 | |||
| 1148 | } |
||
| 1149 | } |
||
| 1150 | |||
| 1151 | /***************************************** |
||
| 1152 | * |
||
| 1153 | * METHODS TO GET NEW OUTPUT CLASS OBJECTS |
||
| 1154 | * |
||
| 1155 | *****************************************/ |
||
| 1156 | |||
| 1157 | OPS_Stream * |
||
| 1158 | FEM_ObjectBrokerAllClasses::getPtrNewStream(int classTag) |
||
| 1159 | { |
||
| 1160 | switch(classTag) { |
||
| 1161 | case OPS_STREAM_TAGS_StandardStream: |
||
| 1162 | return new StandardStream(); |
||
| 1163 | |||
| 1164 | case OPS_STREAM_TAGS_FileStream: |
||
| 1165 | return new FileStream(); |
||
| 1166 | |||
| 1167 | case OPS_STREAM_TAGS_XmlFileStream: |
||
| 1168 | return new XmlFileStream(); |
||
| 1169 | |||
| 1170 | case OPS_STREAM_TAGS_DataFileStream: |
||
| 1171 | return new DataFileStream(); |
||
| 1172 | |||
| 1173 | case OPS_STREAM_TAGS_DatabaseStream: |
||
| 1174 | return new DatabaseStream(); |
||
| 1175 | |||
| 1176 | case OPS_STREAM_TAGS_DummyStream: |
||
| 1177 | return new DummyStream(); |
||
| 1178 | |||
| 1179 | |||
| 1180 | |||
| 1181 | default: |
||
| 1182 | opserr << "FEM_ObjectBrokerAllClasses::getPtrNewStream - "; |
||
| 1183 | opserr << " - no DataOutputHandler type exists for class tag "; |
||
| 1184 | opserr << classTag << endln; |
||
| 1185 | return 0; |
||
| 1186 | |||
| 1187 | } |
||
| 1188 | } |
||
| 1189 | |||
| 1190 | Recorder * |
||
| 1191 | FEM_ObjectBrokerAllClasses::getPtrNewRecorder(int classTag) |
||
| 1192 | { |
||
| 1193 | switch(classTag) { |
||
| 1194 | case RECORDER_TAGS_ElementRecorder: |
||
| 1195 | return new ElementRecorder(); |
||
| 1196 | |||
| 1197 | case RECORDER_TAGS_NodeRecorder: |
||
| 1198 | return new NodeRecorder(); |
||
| 1199 | |||
| 1200 | case RECORDER_TAGS_EnvelopeNodeRecorder: |
||
| 1201 | return new EnvelopeNodeRecorder(); |
||
| 1202 | |||
| 1203 | case RECORDER_TAGS_EnvelopeElementRecorder: |
||
| 1204 | return new EnvelopeElementRecorder(); |
||
| 1205 | |||
| 1206 | |||
| 1207 | case RECORDER_TAGS_TclFeViewer: |
||
| 1208 | return new TclFeViewer(); |
||
| 1209 | |||
| 1210 | default: |
||
| 1211 | opserr << "FEM_ObjectBrokerAllClasses::getNewConstraintHandler - "; |
||
| 1212 | opserr << " - no ConstraintHandler type exists for class tag "; |
||
| 1213 | opserr << classTag << endln; |
||
| 1214 | return 0; |
||
| 1215 | |||
| 1216 | } |
||
| 1217 | } |
||
| 1218 | |||
| 1219 | |||
| 1220 | |||
| 1221 | /***************************************** |
||
| 1222 | * |
||
| 1223 | * METHODS TO GET NEW ANALYSIS CLASSES |
||
| 1224 | * |
||
| 1225 | *****************************************/ |
||
| 1226 | |||
| 1227 | ConstraintHandler * |
||
| 1228 | FEM_ObjectBrokerAllClasses::getNewConstraintHandler(int classTag) |
||
| 1229 | { |
||
| 1230 | switch(classTag) { |
||
| 1231 | case HANDLER_TAG_PlainHandler: |
||
| 1232 | return new PlainHandler(); |
||
| 1233 | |||
| 1234 | case HANDLER_TAG_PenaltyConstraintHandler: |
||
| 1235 | return new PenaltyConstraintHandler(1.0e12, 1.0e12); |
||
| 1236 | |||
| 1237 | case HANDLER_TAG_LagrangeConstraintHandler: |
||
| 1238 | return new LagrangeConstraintHandler(1.0, 1.0); |
||
| 1239 | |||
| 1240 | case HANDLER_TAG_TransformationConstraintHandler: |
||
| 1241 | return new TransformationConstraintHandler(); |
||
| 1242 | |||
| 1243 | default: |
||
| 1244 | opserr << "FEM_ObjectBrokerAllClasses::getNewConstraintHandler - "; |
||
| 1245 | opserr << " - no ConstraintHandler type exists for class tag "; |
||
| 1246 | opserr << classTag << endln; |
||
| 1247 | return 0; |
||
| 1248 | |||
| 1249 | } |
||
| 1250 | } |
||
| 1251 | |||
| 1252 | |||
| 1253 | DOF_Numberer * |
||
| 1254 | FEM_ObjectBrokerAllClasses::getNewNumberer(int classTag) |
||
| 1255 | { |
||
| 1256 | switch(classTag) { |
||
| 1257 | case NUMBERER_TAG_DOF_Numberer: |
||
| 1258 | return new DOF_Numberer(); |
||
| 1259 | |||
| 1260 | |||
| 1261 | case NUMBERER_TAG_PlainNumberer: |
||
| 1262 | return new PlainNumberer(); |
||
| 1263 | |||
| 1264 | |||
| 1265 | #ifdef _PARALLEL_PROCESSING |
||
| 1266 | case NUMBERER_TAG_ParallelNumberer: |
||
| 1267 | return new ParallelNumberer(); |
||
| 1268 | #endif |
||
| 1269 | |||
| 1270 | default: |
||
| 1271 | opserr << "FEM_ObjectBrokerAllClasses::getNewConstraintHandler - "; |
||
| 1272 | opserr << " - no ConstraintHandler type exists for class tag "; |
||
| 1273 | opserr << classTag << endln; |
||
| 1274 | return 0; |
||
| 1275 | |||
| 1276 | } |
||
| 1277 | } |
||
| 1278 | |||
| 1279 | |||
| 1280 | AnalysisModel * |
||
| 1281 | FEM_ObjectBrokerAllClasses::getNewAnalysisModel(int classTag) |
||
| 1282 | { |
||
| 1283 | switch(classTag) { |
||
| 1284 | case AnaMODEL_TAGS_AnalysisModel: |
||
| 1285 | return new AnalysisModel(); |
||
| 1286 | |||
| 1287 | |||
| 1288 | default: |
||
| 1289 | opserr << "FEM_ObjectBrokerAllClasses::getNewAnalysisModel - "; |
||
| 1290 | opserr << " - no AnalysisModel type exists for class tag "; |
||
| 1291 | opserr << classTag << endln; |
||
| 1292 | return 0; |
||
| 1293 | |||
| 1294 | } |
||
| 1295 | } |
||
| 1296 | |||
| 1297 | |||
| 1298 | EquiSolnAlgo * |
||
| 1299 | FEM_ObjectBrokerAllClasses::getNewEquiSolnAlgo(int classTag) |
||
| 1300 | { |
||
| 1301 | switch(classTag) { |
||
| 1302 | case EquiALGORITHM_TAGS_Linear: |
||
| 1303 | return new Linear(); |
||
| 1304 | |||
| 1305 | case EquiALGORITHM_TAGS_NewtonRaphson: |
||
| 1306 | return new NewtonRaphson(); |
||
| 1307 | |||
| 1308 | case EquiALGORITHM_TAGS_NewtonLineSearch: |
||
| 1309 | return new NewtonLineSearch(); |
||
| 1310 | |||
| 1311 | case EquiALGORITHM_TAGS_KrylovNewton: |
||
| 1312 | return new KrylovNewton(); |
||
| 1313 | |||
| 1314 | case EquiALGORITHM_TAGS_ModifiedNewton: |
||
| 1315 | return new ModifiedNewton(); |
||
| 1316 | |||
| 1317 | case EquiALGORITHM_TAGS_Broyden: |
||
| 1318 | return new Broyden(); |
||
| 1319 | |||
| 1320 | default: |
||
| 1321 | opserr << "FEM_ObjectBrokerAllClasses::getNewEquiSolnAlgo - "; |
||
| 1322 | opserr << " - no EquiSolnAlgo type exists for class tag "; |
||
| 1323 | opserr << classTag << endln; |
||
| 1324 | return 0; |
||
| 1325 | |||
| 1326 | } |
||
| 1327 | } |
||
| 1328 | |||
| 1329 | |||
| 1330 | LineSearch * |
||
| 1331 | FEM_ObjectBrokerAllClasses::getLineSearch(int classTag) |
||
| 1332 | { |
||
| 1333 | switch(classTag) { |
||
| 1334 | |||
| 1335 | case LINESEARCH_TAGS_BisectionLineSearch: |
||
| 1336 | return new BisectionLineSearch(); |
||
| 1337 | |||
| 1338 | case LINESEARCH_TAGS_InitialInterpolatedLineSearch: |
||
| 1339 | return new InitialInterpolatedLineSearch(); |
||
| 1340 | |||
| 1341 | case LINESEARCH_TAGS_RegulaFalsiLineSearch: |
||
| 1342 | return new RegulaFalsiLineSearch(); |
||
| 1343 | |||
| 1344 | case LINESEARCH_TAGS_SecantLineSearch: |
||
| 1345 | return new SecantLineSearch(); |
||
| 1346 | default: |
||
| 1347 | opserr << "FEM_ObjectBrokerAllClasses::getNewEquiSolnAlgo - "; |
||
| 1348 | opserr << " - no EquiSolnAlgo type exists for class tag "; |
||
| 1349 | opserr << classTag << endln; |
||
| 1350 | return 0; |
||
| 1351 | } |
||
| 1352 | } |
||
| 1353 | |||
| 1354 | |||
| 1355 | DomainDecompAlgo * |
||
| 1356 | FEM_ObjectBrokerAllClasses::getNewDomainDecompAlgo(int classTag) |
||
| 1357 | { |
||
| 1358 | switch(classTag) { |
||
| 1359 | case DomDecompALGORITHM_TAGS_DomainDecompAlgo: |
||
| 1360 | return new DomainDecompAlgo(); |
||
| 1361 | |||
| 1362 | default: |
||
| 1363 | opserr << "FEM_ObjectBrokerAllClasses::getNewDomainDecompAlgo - "; |
||
| 1364 | opserr << " - no DomainDecompAlgo type exists for class tag "; |
||
| 1365 | opserr << classTag << endln; |
||
| 1366 | return 0; |
||
| 1367 | |||
| 1368 | } |
||
| 1369 | } |
||
| 1370 | |||
| 1371 | |||
| 1372 | StaticIntegrator * |
||
| 1373 | FEM_ObjectBrokerAllClasses::getNewStaticIntegrator(int classTag) |
||
| 1374 | { |
||
| 1375 | switch(classTag) { |
||
| 1376 | case INTEGRATOR_TAGS_LoadControl: |
||
| 1377 | return new LoadControl(1.0,1,1.0,.10); // must recvSelf |
||
| 1378 | |||
| 1379 | #ifdef _PARALLEL_PROCESSING |
||
| 1380 | case INTEGRATOR_TAGS_DistributedDisplacementControl: |
||
| 1381 | return new DistributedDisplacementControl(); // must recvSelf |
||
| 1382 | #endif |
||
| 1383 | |||
| 1384 | case INTEGRATOR_TAGS_ArcLength: |
||
| 1385 | return new ArcLength(1.0); // must recvSelf |
||
| 1386 | |||
| 1387 | |||
| 1388 | default: |
||
| 1389 | opserr << "FEM_ObjectBrokerAllClasses::getNewStaticIntegrator - "; |
||
| 1390 | opserr << " - no StaticIntegrator type exists for class tag "; |
||
| 1391 | opserr << classTag << endln; |
||
| 1392 | return 0; |
||
| 1393 | |||
| 1394 | } |
||
| 1395 | } |
||
| 1396 | |||
| 1397 | |||
| 1398 | TransientIntegrator * |
||
| 1399 | FEM_ObjectBrokerAllClasses::getNewTransientIntegrator(int classTag) |
||
| 1400 | { |
||
| 1401 | switch(classTag) { |
||
| 1402 | case INTEGRATOR_TAGS_Newmark: |
||
| 1403 | return new Newmark(); |
||
| 1404 | |||
| 1405 | case INTEGRATOR_TAGS_CentralDifferenceNoDamping: |
||
| 1406 | return new CentralDifferenceNoDamping(); // must recvSelf |
||
| 1407 | |||
| 1408 | case INTEGRATOR_TAGS_CentralDifferenceAlternative: |
||
| 1409 | return new CentralDifferenceAlternative(); // must recvSelf |
||
| 1410 | |||
| 1411 | default: |
||
| 1412 | opserr << "FEM_ObjectBrokerAllClasses::getNewTransientIntegrator - "; |
||
| 1413 | opserr << " - no TransientIntegrator type exists for class tag "; |
||
| 1414 | opserr << classTag << endln; |
||
| 1415 | return 0; |
||
| 1416 | |||
| 1417 | } |
||
| 1418 | } |
||
| 1419 | |||
| 1420 | |||
| 1421 | IncrementalIntegrator * |
||
| 1422 | FEM_ObjectBrokerAllClasses::getNewIncrementalIntegrator(int classTag) |
||
| 1423 | { |
||
| 1424 | switch(classTag) { |
||
| 1425 | case INTEGRATOR_TAGS_LoadControl: |
||
| 1426 | return new LoadControl(1.0,1,1.0,1.0); // must recvSelf |
||
| 1427 | |||
| 1428 | |||
| 1429 | case INTEGRATOR_TAGS_ArcLength: |
||
| 1430 | return new ArcLength(1.0); // must recvSelf |
||
| 1431 | |||
| 1432 | |||
| 1433 | case INTEGRATOR_TAGS_Newmark: |
||
| 1434 | return new Newmark(); |
||
| 1435 | |||
| 1436 | #ifdef _PARALLEL_PROCESSING |
||
| 1437 | case INTEGRATOR_TAGS_DistributedDisplacementControl: |
||
| 1438 | return new DistributedDisplacementControl(); // must recvSelf |
||
| 1439 | #endif |
||
| 1440 | |||
| 1441 | default: |
||
| 1442 | opserr << "FEM_ObjectBrokerAllClasses::getNewIncrementalIntegrator - "; |
||
| 1443 | opserr << " - no IncrementalIntegrator type exists for class tag "; |
||
| 1444 | opserr << classTag << endln; |
||
| 1445 | return 0; |
||
| 1446 | |||
| 1447 | } |
||
| 1448 | } |
||
| 1449 | |||
| 1450 | |||
| 1451 | LinearSOESolver * |
||
| 1452 | FEM_ObjectBrokerAllClasses::getNewLinearSolver(void) |
||
| 1453 | { |
||
| 1454 | return lastLinearSolver; |
||
| 1455 | } |
||
| 1456 | |||
| 1457 | LinearSOE * |
||
| 1458 | FEM_ObjectBrokerAllClasses::getNewLinearSOE(int classTagSOE, |
||
| 1459 | int classTagSolver) |
||
| 1460 | { |
||
| 1461 | LinearSOE *theSOE =0; |
||
| 1462 | // SlowLinearSOESolver *theSlowSolver =0; |
||
| 1463 | FullGenLinSolver *theGenSolver =0; |
||
| 1464 | BandGenLinSolver *theGenBandSolver =0; |
||
| 1465 | BandSPDLinSolver *theBandSPDSolver =0; |
||
| 1466 | ProfileSPDLinSolver *theProfileSPDSolver =0; |
||
| 1467 | SuperLU *theSparseGenLinSolver =0; |
||
| 1468 | |||
| 1469 | #ifdef _PETSC |
||
| 1470 | PetscSolver *thePetscSolver = 0; |
||
| 1471 | #endif |
||
| 1472 | |||
| 1473 | #ifdef _PARALLEL_PROCESSING |
||
| 1474 | DistributedSuperLU *theDistributedSparseGenLinSolver =0; |
||
| 1475 | DistributedDiagonalSolver *theDistributedDiagonalSolver =0; |
||
| 1476 | #ifdef _MUMPS |
||
| 1477 | MumpsParallelSolver *theMumpsSolver = 0; |
||
| 1478 | #endif |
||
| 1479 | #endif |
||
| 1480 | |||
| 1481 | /* |
||
| 1482 | case LinSOE_TAGS_SlowLinearSOE: |
||
| 1483 | if (classTagSolver == SOLVER_TAGS_SlowLinearSOESolver) { |
||
| 1484 | theSlowSolver = new SlowLinearSOESolver(); |
||
| 1485 | theSOE = new SlowLinearSOE(*theSlowSolver); |
||
| 1486 | lastLinearSolver = theSlowSolver; |
||
| 1487 | return theSOE; |
||
| 1488 | } else { |
||
| 1489 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1490 | opserr << " - no SlowLinearSOESolver type exists for class tag "; |
||
| 1491 | opserr << classTagSolver << endln; |
||
| 1492 | return 0; |
||
| 1493 | } |
||
| 1494 | |||
| 1495 | */ |
||
| 1496 | |||
| 1497 | |||
| 1498 | switch(classTagSOE) { |
||
| 1499 | case LinSOE_TAGS_FullGenLinSOE: |
||
| 1500 | |||
| 1501 | if (classTagSolver == SOLVER_TAGS_FullGenLinLapackSolver) { |
||
| 1502 | theGenSolver = new FullGenLinLapackSolver(); |
||
| 1503 | theSOE = new FullGenLinSOE(*theGenSolver); |
||
| 1504 | lastLinearSolver = theGenSolver; |
||
| 1505 | return theSOE; |
||
| 1506 | } else { |
||
| 1507 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1508 | opserr << " - no FullGenLinSOESolver type exists for class tag "; |
||
| 1509 | opserr << classTagSolver << endln; |
||
| 1510 | return 0; |
||
| 1511 | } |
||
| 1512 | |||
| 1513 | |||
| 1514 | case LinSOE_TAGS_BandGenLinSOE: |
||
| 1515 | |||
| 1516 | if (classTagSolver == SOLVER_TAGS_BandGenLinLapackSolver) { |
||
| 1517 | theGenBandSolver = new BandGenLinLapackSolver(); |
||
| 1518 | theSOE = new BandGenLinSOE(*theGenBandSolver); |
||
| 1519 | lastLinearSolver = theGenBandSolver; |
||
| 1520 | return theSOE; |
||
| 1521 | } else { |
||
| 1522 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1523 | opserr << " - no BandGenLinSolver type exists for class tag "; |
||
| 1524 | opserr << classTagSolver << endln; |
||
| 1525 | return 0; |
||
| 1526 | } |
||
| 1527 | |||
| 1528 | case LinSOE_TAGS_BandSPDLinSOE: |
||
| 1529 | |||
| 1530 | if (classTagSolver == SOLVER_TAGS_BandSPDLinLapackSolver) { |
||
| 1531 | theBandSPDSolver = new BandSPDLinLapackSolver(); |
||
| 1532 | theSOE = new BandSPDLinSOE(*theBandSPDSolver); |
||
| 1533 | lastLinearSolver = theBandSPDSolver; |
||
| 1534 | return theSOE; |
||
| 1535 | } else { |
||
| 1536 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1537 | opserr << " - no BandSPDLinSOESolver type exists for class tag "; |
||
| 1538 | opserr << classTagSolver << endln; |
||
| 1539 | return 0; |
||
| 1540 | } |
||
| 1541 | |||
| 1542 | case LinSOE_TAGS_ProfileSPDLinSOE: |
||
| 1543 | |||
| 1544 | if (classTagSolver == SOLVER_TAGS_ProfileSPDLinDirectSolver) { |
||
| 1545 | theProfileSPDSolver = new ProfileSPDLinDirectSolver(); |
||
| 1546 | theSOE = new ProfileSPDLinSOE(*theProfileSPDSolver); |
||
| 1547 | lastLinearSolver = theProfileSPDSolver; |
||
| 1548 | return theSOE; |
||
| 1549 | } else if (classTagSolver == SOLVER_TAGS_ProfileSPDLinSubstrSolver) { |
||
| 1550 | theProfileSPDSolver = new ProfileSPDLinSubstrSolver(); |
||
| 1551 | theSOE = new ProfileSPDLinSOE(*theProfileSPDSolver); |
||
| 1552 | lastLinearSolver = theProfileSPDSolver; |
||
| 1553 | return 0; |
||
| 1554 | } |
||
| 1555 | else { |
||
| 1556 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1557 | opserr << " - no ProfileSPD_LinSolver type exists for class tag "; |
||
| 1558 | opserr << classTagSolver << endln; |
||
| 1559 | return 0; |
||
| 1560 | } |
||
| 1561 | |||
| 1562 | |||
| 1563 | #ifdef _PETSC |
||
| 1564 | case LinSOE_TAGS_PetscSOE: |
||
| 1565 | |||
| 1566 | if (classTagSolver == SOLVER_TAGS_PetscSolver) { |
||
| 1567 | thePetscSolver = new PetscSolver(); |
||
| 1568 | theSOE = new PetscSOE(*thePetscSolver); |
||
| 1569 | return theSOE; |
||
| 1570 | } else { |
||
| 1571 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1572 | opserr << " - no PetscSolver type exists for class tag "; |
||
| 1573 | opserr << classTagSolver << endln; |
||
| 1574 | return 0; |
||
| 1575 | } |
||
| 1576 | #endif |
||
| 1577 | |||
| 1578 | #ifdef _PARALLEL_PROCESSING |
||
| 1579 | |||
| 1580 | #ifdef _MUMPS |
||
| 1581 | case LinSOE_TAGS_MumpsParallelSOE: |
||
| 1582 | if (classTagSolver == SOLVER_TAGS_MumpsParallelSolver) { |
||
| 1583 | theMumpsSolver = new MumpsParallelSolver(); |
||
| 1584 | theSOE = new MumpsParallelSOE(*theMumpsSolver); |
||
| 1585 | lastLinearSolver = theMumpsSolver; |
||
| 1586 | return theSOE; |
||
| 1587 | } else { |
||
| 1588 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1589 | opserr << " - no DistributedBandGenLinSolver type exists for class tag "; |
||
| 1590 | opserr << classTagSolver << endln; |
||
| 1591 | return 0; |
||
| 1592 | } |
||
| 1593 | #endif |
||
| 1594 | |||
| 1595 | case LinSOE_TAGS_DistributedBandGenLinSOE: |
||
| 1596 | |||
| 1597 | if (classTagSolver == SOLVER_TAGS_BandGenLinLapackSolver) { |
||
| 1598 | theGenBandSolver = new BandGenLinLapackSolver(); |
||
| 1599 | theSOE = new DistributedBandGenLinSOE(*theGenBandSolver); |
||
| 1600 | lastLinearSolver = theGenBandSolver; |
||
| 1601 | return theSOE; |
||
| 1602 | } else { |
||
| 1603 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1604 | opserr << " - no DistributedBandGenLinSolver type exists for class tag "; |
||
| 1605 | opserr << classTagSolver << endln; |
||
| 1606 | return 0; |
||
| 1607 | } |
||
| 1608 | |||
| 1609 | case LinSOE_TAGS_DistributedBandSPDLinSOE: |
||
| 1610 | |||
| 1611 | if (classTagSolver == SOLVER_TAGS_BandSPDLinLapackSolver) { |
||
| 1612 | theBandSPDSolver = new BandSPDLinLapackSolver(); |
||
| 1613 | theSOE = new DistributedBandSPDLinSOE(*theBandSPDSolver); |
||
| 1614 | lastLinearSolver = theBandSPDSolver; |
||
| 1615 | return theSOE; |
||
| 1616 | } else { |
||
| 1617 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1618 | opserr << " - no DistributedBandSPDLinSolver type exists for class tag "; |
||
| 1619 | opserr << classTagSolver << endln; |
||
| 1620 | return 0; |
||
| 1621 | } |
||
| 1622 | |||
| 1623 | |||
| 1624 | case LinSOE_TAGS_DistributedProfileSPDLinSOE: |
||
| 1625 | |||
| 1626 | if (classTagSolver == SOLVER_TAGS_ProfileSPDLinDirectSolver) { |
||
| 1627 | theProfileSPDSolver = new ProfileSPDLinDirectSolver(); |
||
| 1628 | theSOE = new DistributedProfileSPDLinSOE(*theProfileSPDSolver); |
||
| 1629 | lastLinearSolver = theProfileSPDSolver; |
||
| 1630 | return theSOE; |
||
| 1631 | } else if (classTagSolver == SOLVER_TAGS_ProfileSPDLinSubstrSolver) { |
||
| 1632 | theProfileSPDSolver = new ProfileSPDLinSubstrSolver(); |
||
| 1633 | theSOE = new DistributedProfileSPDLinSOE(*theProfileSPDSolver); |
||
| 1634 | lastLinearSolver = theProfileSPDSolver; |
||
| 1635 | return 0; |
||
| 1636 | } |
||
| 1637 | else { |
||
| 1638 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1639 | opserr << " - no ProfileSPD_LinSolver type exists for class tag "; |
||
| 1640 | opserr << classTagSolver << endln; |
||
| 1641 | return 0; |
||
| 1642 | } |
||
| 1643 | |||
| 1644 | case LinSOE_TAGS_DistributedDiagonalSOE: |
||
| 1645 | |||
| 1646 | if (classTagSolver == SOLVER_TAGS_DistributedDiagonalSolver) { |
||
| 1647 | theDistributedDiagonalSolver = new DistributedDiagonalSolver(); |
||
| 1648 | theSOE = new DistributedDiagonalSOE(*theDistributedDiagonalSolver); |
||
| 1649 | lastLinearSolver = theDistributedDiagonalSolver; |
||
| 1650 | return theSOE; |
||
| 1651 | } else { |
||
| 1652 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1653 | opserr << " - no DistributedSparseGenLinSolverSolver type exists for class tag "; |
||
| 1654 | opserr << classTagSolver << endln; |
||
| 1655 | return 0; |
||
| 1656 | } |
||
| 1657 | |||
| 1658 | case LinSOE_TAGS_DistributedSparseGenColLinSOE: |
||
| 1659 | |||
| 1660 | if (classTagSolver == SOLVER_TAGS_SuperLU) { |
||
| 1661 | theSparseGenLinSolver = new SuperLU(); |
||
| 1662 | theSOE = new DistributedSparseGenColLinSOE(*theSparseGenLinSolver); |
||
| 1663 | lastLinearSolver = theSparseGenLinSolver; |
||
| 1664 | return theSOE; |
||
| 1665 | } else if (classTagSolver == SOLVER_TAGS_DistributedSuperLU) { |
||
| 1666 | theDistributedSparseGenLinSolver = new DistributedSuperLU(); |
||
| 1667 | theSOE = new DistributedSparseGenColLinSOE(*theDistributedSparseGenLinSolver); |
||
| 1668 | lastLinearSolver = theSparseGenLinSolver; |
||
| 1669 | return theSOE; |
||
| 1670 | } else { |
||
| 1671 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1672 | opserr << " - no DistributedSparseGenLinSolverSolver type exists for class tag "; |
||
| 1673 | opserr << classTagSolver << endln; |
||
| 1674 | return 0; |
||
| 1675 | } |
||
| 1676 | |||
| 1677 | #else |
||
| 1678 | case LinSOE_TAGS_SparseGenColLinSOE: |
||
| 1679 | |||
| 1680 | if (classTagSolver == SOLVER_TAGS_SuperLU) { |
||
| 1681 | theSparseGenLinSolver = new SuperLU(); |
||
| 1682 | theSOE = new SparseGenColLinSOE(*theSparseGenLinSolver); |
||
| 1683 | lastLinearSolver = theSparseGenLinSolver; |
||
| 1684 | return theSOE; |
||
| 1685 | } else { |
||
| 1686 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1687 | opserr << " - no SparseGenLinSolverSolver type exists for class tag "; |
||
| 1688 | opserr << classTagSolver << endln; |
||
| 1689 | return 0; |
||
| 1690 | } |
||
| 1691 | |||
| 1692 | #endif |
||
| 1693 | |||
| 1694 | default: |
||
| 1695 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1696 | opserr << " - no LinearSOE type exists for class tag "; |
||
| 1697 | opserr << classTagSOE << endln; |
||
| 1698 | return 0; |
||
| 1699 | |||
| 1700 | |||
| 1701 | } |
||
| 1702 | } |
||
| 1703 | |||
| 1704 | |||
| 1705 | |||
| 1706 | |||
| 1707 | DomainSolver * |
||
| 1708 | FEM_ObjectBrokerAllClasses::getNewDomainSolver(void) |
||
| 1709 | { |
||
| 1710 | return lastDomainSolver; |
||
| 1711 | } |
||
| 1712 | |||
| 1713 | LinearSOE * |
||
| 1714 | FEM_ObjectBrokerAllClasses::getPtrNewDDLinearSOE(int classTagSOE, |
||
| 1715 | int classTagDDSolver) |
||
| 1716 | { |
||
| 1717 | ProfileSPDLinSubstrSolver *theProfileSPDSolver =0; |
||
| 1718 | |||
| 1719 | switch(classTagSOE) { |
||
| 1720 | case LinSOE_TAGS_ProfileSPDLinSOE: |
||
| 1721 | |||
| 1722 | if (classTagDDSolver == SOLVER_TAGS_ProfileSPDLinSubstrSolver) { |
||
| 1723 | theProfileSPDSolver = new ProfileSPDLinSubstrSolver(); |
||
| 1724 | LinearSOE *theSOE = new ProfileSPDLinSOE(*theProfileSPDSolver); |
||
| 1725 | lastDomainSolver = theProfileSPDSolver; |
||
| 1726 | return theSOE; |
||
| 1727 | } |
||
| 1728 | else { |
||
| 1729 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1730 | opserr << " - no ProfileSPD Domain Solver type exists for class tag "; |
||
| 1731 | opserr << classTagDDSolver << endln; |
||
| 1732 | return 0; |
||
| 1733 | } |
||
| 1734 | |||
| 1735 | |||
| 1736 | default: |
||
| 1737 | opserr << "FEM_ObjectBrokerAllClasses::getNewLinearSOE - "; |
||
| 1738 | opserr << " - no LinearSOE type exists for class tag "; |
||
| 1739 | opserr << classTagSOE << endln; |
||
| 1740 | return 0; |
||
| 1741 | |||
| 1742 | } |
||
| 1743 | } |
||
| 1744 | |||
| 1745 | |||
| 1746 | DomainDecompositionAnalysis * |
||
| 1747 | FEM_ObjectBrokerAllClasses::getNewDomainDecompAnalysis(int classTag, |
||
| 1748 | Subdomain &theSubdomain) |
||
| 1749 | { |
||
| 1750 | switch(classTag) { |
||
| 1751 | case DomDecompANALYSIS_TAGS_DomainDecompositionAnalysis: |
||
| 1752 | return new DomainDecompositionAnalysis(theSubdomain); |
||
| 1753 | |||
| 1754 | #ifdef _PARALLEL_PROCESSING |
||
| 1755 | case ANALYSIS_TAGS_StaticDomainDecompositionAnalysis: |
||
| 1756 | return new StaticDomainDecompositionAnalysis(theSubdomain); |
||
| 1757 | |||
| 1758 | case ANALYSIS_TAGS_TransientDomainDecompositionAnalysis: |
||
| 1759 | return new TransientDomainDecompositionAnalysis(theSubdomain); |
||
| 1760 | #endif |
||
| 1761 | |||
| 1762 | default: |
||
| 1763 | opserr << "ObjectBrokerAllClasses::getNewDomainDecompAnalysis "; |
||
| 1764 | opserr << " - no DomainDecompAnalysis type exists for class tag " ; |
||
| 1765 | opserr << classTag << endln; |
||
| 1766 | return 0; |
||
| 1767 | |||
| 1768 | } |
||
| 1769 | } |
||
| 1770 | |||
| 1771 | |||
| 1772 | Subdomain * |
||
| 1773 | FEM_ObjectBrokerAllClasses::getSubdomainPtr(int classTag) |
||
| 1774 | { |
||
| 1775 | opserr << "FEM_ObjectBrokerAllClasses: NOT IMPLEMENTED YET"; |
||
| 1776 | return 0; |
||
| 1777 | } |
||
| 1778 | |||
| 1779 | |||
| 1780 | int |
||
| 1781 | FEM_ObjectBrokerAllClasses::addUniaxialMaterial(int classTag, |
||
| 1782 | const char *lib, |
||
| 1783 | const char *funcName, |
||
| 1784 | UniaxialMaterial *(*funcPtr)(void)) |
||
| 1785 | { |
||
| 1786 | // check to see if it's already added |
||
| 1787 | |||
| 1788 | UniaxialPackage *matCommands = theUniaxialPackage; |
||
| 1789 | bool found = false; |
||
| 1790 | while (matCommands != NULL && found == false) { |
||
| 1791 | if ((strcmp(lib, matCommands->libName) == 0) && (strcmp(funcName, matCommands->funcName) == 0)) { |
||
| 1792 | return 0; |
||
| 1793 | } |
||
| 1794 | } |
||
| 1795 | |||
| 1796 | // |
||
| 1797 | // if funPtr == 0; go get the handle |
||
| 1798 | // |
||
| 1799 | |||
| 1800 | void *libHandle; |
||
| 1801 | if (funcPtr == 0) { |
||
| 1802 | if (getLibraryFunction(lib, funcName, &libHandle, (void **)&funcPtr) != 0) { |
||
| 1803 | opserr << "FEM_ObjectBrokerAllClasses::addUniaxialMaterial - could not find function\n"; |
||
| 1804 | return -1; |
||
| 1805 | } |
||
| 1806 | } |
||
| 1807 | |||
| 1808 | // |
||
| 1809 | // add the new funcPtr |
||
| 1810 | // |
||
| 1811 | |||
| 1812 | char *libNameCopy = new char[strlen(lib)+1]; |
||
| 1813 | char *funcNameCopy = new char[strlen(funcName)+1]; |
||
| 1814 | UniaxialPackage *theMat = new UniaxialPackage; |
||
| 1815 | if (libNameCopy == 0 || funcNameCopy == 0 || theMat == 0) { |
||
| 1816 | opserr << "FEM_ObjectBrokerAllClasses::addUniaxialMaterial - could not add lib, out of memory\n"; |
||
| 1817 | return -1; |
||
| 1818 | } |
||
| 1819 | strcpy(libNameCopy, lib); |
||
| 1820 | strcpy(funcNameCopy, funcName); |
||
| 1821 | |||
| 1822 | theMat->classTag = classTag; |
||
| 1823 | theMat->funcName = funcNameCopy; |
||
| 1824 | theMat->libName = libNameCopy; |
||
| 1825 | theMat->funcPtr = funcPtr; |
||
| 1826 | theMat->next = theUniaxialPackage; |
||
| 1827 | theUniaxialPackage = theMat; |
||
| 1828 | |||
| 1829 | return 0; |
||
| 1830 | |||
| 1831 | } |
||
| 1832 | |||
| 1833 | |||
| 1834 | Parameter * |
||
| 1835 | FEM_ObjectBrokerAllClasses::getParameter(int classTag) |
||
| 1836 | { |
||
| 1837 | Parameter *theRes = 0; |
||
| 1838 | |||
| 1839 | switch(classTag) { |
||
| 1840 | case PARAMETER_TAG_Parameter: |
||
| 1841 | theRes = new Parameter; |
||
| 1842 | break; |
||
| 1843 | |||
| 1844 | case PARAMETER_TAG_MaterialStageParameter: |
||
| 1845 | theRes = new MaterialStageParameter(); |
||
| 1846 | break; |
||
| 1847 | |||
| 1848 | case PARAMETER_TAG_MatParameter: |
||
| 1849 | theRes = new MatParameter(); |
||
| 1850 | break; |
||
| 1851 | |||
| 1852 | default: |
||
| 1853 | ; |
||
| 1854 | } |
||
| 1855 | |||
| 1856 | return theRes; |
||
| 1857 | } |
||
| 1858 |