| 3720 | } |
| 3721 | |
| 3722 | void* OPS_MumpsSolver() { |
| 3723 | int icntl14 = 20; |
| 3724 | int icntl7 = 7; |
| 3725 | int matType = 0; // 0: unsymmetric, 1: symmetric positive definite, 2: symmetric general |
| 3726 | while (OPS_GetNumRemainingInputArgs() > 2) { |
| 3727 | const char* opt = OPS_GetString(); |
| 3728 | int num = 1; |
| 3729 | if (strcmp(opt, "-ICNTL14") == 0) { |
| 3730 | if (OPS_GetIntInput(&num, &icntl14) < 0) { |
| 3731 | opserr << "WARNING: failed to get icntl14\n"; |
| 3732 | return 0; |
| 3733 | } |
| 3734 | } else if (strcmp(opt, "-ICNTL7") == 0) { |
| 3735 | if (OPS_GetIntInput(&num, &icntl7) < 0) { |
| 3736 | opserr << "WARNING: failed to get icntl7\n"; |
| 3737 | return 0; |
| 3738 | } |
| 3739 | } else if (strcmp(opt, "-matrixType") == 0) { |
| 3740 | if (OPS_GetIntInput(&num, &matType) < 0) { |
| 3741 | opserr << "WARNING: failed to get -matrixType. Unsymmetric matrix assumed\n"; |
| 3742 | return 0; |
| 3743 | } |
| 3744 | if (matType < 0 || matType > 2) { |
| 3745 | opserr << "Mumps Warning: wrong -matrixType value (" << matType << "). Unsymmetric matrix assumed\n"; |
| 3746 | matType = 0; |
| 3747 | } |
| 3748 | } |
| 3749 | } |
| 3750 | |
| 3751 | #ifdef _PARALLEL_INTERPRETERS |
| 3752 | #ifdef _MUMPS |
| 3753 | MumpsParallelSOE* soe = 0; |
| 3754 | |
| 3755 | MumpsParallelSolver *solver= new MumpsParallelSolver(icntl7, icntl14); |
| 3756 | soe = new MumpsParallelSOE(*solver, matType); |
| 3757 | |
| 3758 | MachineBroker* machine = cmds->getMachineBroker(); |
| 3759 | Channel** channels = cmds->getChannels(); |
| 3760 | int numChannels = cmds->getNumChannels(); |
| 3761 | |
| 3762 | int rank = machine->getPID(); |
| 3763 | soe->setProcessID(rank); |
| 3764 | soe->setChannels(numChannels, channels); |
| 3765 | return soe; |
| 3766 | #endif |
| 3767 | #else |
| 3768 | #ifdef _MUMPS |
| 3769 | MumpsSolver *theSolver = new MumpsSolver(icntl7, icntl14); |
| 3770 | theSOE = new MumpsSOE(*theSolver, matType); |
| 3771 | return theSOE; |
| 3772 | #endif |
| 3773 | #endif |
| 3774 | return 0; |
| 3775 | } |
| 3776 | |
| 3777 | // Sensitivity:BEGIN ///////////////////////////////////////////// |
| 3778 |
no test coverage detected