| 1400 | } |
| 1401 | |
| 1402 | int 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 |
no test coverage detected