MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / OPS_System

Function OPS_System

SRC/interpreter/OpenSeesCommands.cpp:1402–1534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1400}
1401
1402int OPS_System()
1403{
1404 if (OPS_GetNumRemainingInputArgs() < 1) {
1405 opserr << "WARNING insufficient args: system type ...\n";
1406 return -1;
1407 }
1408
1409 const char* type = OPS_GetString();
1410
1411 // create soe
1412 LinearSOE* theSOE = 0;
1413
1414 if ((strcmp(type,"BandGeneral") == 0) || (strcmp(type,"BandGEN") == 0)
1415 || (strcmp(type,"BandGen") == 0)){
1416 // BAND GENERAL SOE & SOLVER
1417 theSOE = (LinearSOE*)OPS_BandGenLinLapack();
1418
1419 } else if (strcmp(type,"BandSPD") == 0) {
1420 // BAND SPD SOE & SOLVER
1421 theSOE = (LinearSOE*)OPS_BandSPDLinLapack();
1422
1423 } else if (strcmp(type,"Diagonal") == 0) {
1424 // Diagonal SOE & SOLVER
1425 theSOE = (LinearSOE*)OPS_DiagonalDirectSolver();
1426
1427
1428 } else if (strcmp(type,"MPIDiagonal") == 0) {
1429#ifdef _PARALLEL_INTERPRETERS
1430 MPIDiagonalSolver* theSolver = new MPIDiagonalSolver();
1431 theSOE = new MPIDiagonalSOE(*theSolver);
1432 setMPIDSOEFlag = true;
1433#else
1434 // Diagonal SOE & SOLVER
1435 theSOE = (LinearSOE*)OPS_DiagonalDirectSolver();
1436#endif
1437
1438 } else if (strcmp(type,"SProfileSPD") == 0) {
1439 // PROFILE SPD SOE * SOLVER
1440 // now must determine the type of solver to create from rest of args
1441 theSOE = (LinearSOE*)OPS_SProfileSPDLinSolver();
1442
1443 } else if (strcmp(type, "ProfileSPD") == 0) {
1444
1445 theSOE = (LinearSOE*)OPS_ProfileSPDLinDirectSolver();
1446
1447#ifdef _PARALLEL_INTERPRETERS
1448 } else if (strcmp(type, "ParallelProfileSPD") == 0) {
1449 ProfileSPDLinSolver* theSolver = new ProfileSPDLinDirectSolver();
1450 DistributedProfileSPDLinSOE* theParallelSOE = new DistributedProfileSPDLinSOE(*theSolver);
1451 theSOE = theParallelSOE;
1452 auto theMachineBroker = cmds->getMachineBroker();
1453 auto rank = theMachineBroker->getPID();
1454 auto numChannels = cmds->getNumChannels();
1455 auto theChannels = cmds->getChannels();
1456 theParallelSOE->setProcessID(rank);
1457 theParallelSOE->setChannels(numChannels, theChannels);
1458
1459#endif

Callers 2

Tcl_ops_systemFunction · 0.85
Py_ops_systemFunction · 0.85

Calls 15

OPS_BandGenLinLapackFunction · 0.85
OPS_BandSPDLinLapackFunction · 0.85
OPS_DiagonalDirectSolverFunction · 0.85
OPS_SProfileSPDLinSolverFunction · 0.85
OPS_PFEMSolver_UmfpackFunction · 0.85
OPS_PFEMSolver_MumpsFunction · 0.85
OPS_SuperLUSolverFunction · 0.85
OPS_SymSparseLinSolverFunction · 0.85
OPS_UmfpackGenLinSolverFunction · 0.85

Tested by

no test coverage detected