| 3661 | } |
| 3662 | |
| 3663 | void* OPS_ParallelDisplacementControl() { |
| 3664 | #ifdef _PARALLEL_INTERPRETERS |
| 3665 | DistributedDisplacementControl *theDDC = 0; |
| 3666 | if (cmds == 0) { |
| 3667 | return theDDC; |
| 3668 | } |
| 3669 | int idata[3]; |
| 3670 | double ddata[3]; |
| 3671 | |
| 3672 | if (OPS_GetNumRemainingInputArgs() < 3) { |
| 3673 | opserr << "WARNING integrator DistributedDisplacementControl node dof dU \n"; |
| 3674 | opserr << "<Jd minIncrement maxIncrement>\n"; |
| 3675 | return 0; |
| 3676 | } |
| 3677 | |
| 3678 | int num = 2; |
| 3679 | if (OPS_GetIntInput(&num, &idata[0]) < 0) { |
| 3680 | opserr << "WARNING: failed to get node and dof\n"; |
| 3681 | return 0; |
| 3682 | } |
| 3683 | num = 1; |
| 3684 | if (OPS_GetDoubleInput(&num, &ddata[0]) < 0) { |
| 3685 | opserr << "WARNING: failed to get dU\n"; |
| 3686 | return 0; |
| 3687 | } |
| 3688 | if (OPS_GetNumRemainingInputArgs() >= 3) { |
| 3689 | num = 1; |
| 3690 | if (OPS_GetIntInput(&num, &idata[2]) < 0) { |
| 3691 | opserr << "WARNING: failed to get Jd\n"; |
| 3692 | return 0; |
| 3693 | } |
| 3694 | num = 2; |
| 3695 | if (OPS_GetDoubleInput(&num, &ddata[1]) < 0) { |
| 3696 | opserr << "WARNING: failed to get min and max\n"; |
| 3697 | return 0; |
| 3698 | } |
| 3699 | } else { |
| 3700 | idata[2] = 1; |
| 3701 | ddata[1] = ddata[0]; |
| 3702 | ddata[2] = ddata[0]; |
| 3703 | } |
| 3704 | |
| 3705 | theDDC = new DistributedDisplacementControl(idata[0], idata[1]-1, |
| 3706 | ddata[0], idata[2], |
| 3707 | ddata[1], ddata[2]); |
| 3708 | MachineBroker* machine = cmds->getMachineBroker(); |
| 3709 | Channel** channels = cmds->getChannels(); |
| 3710 | int numChannels = cmds->getNumChannels(); |
| 3711 | |
| 3712 | int rank = machine->getPID(); |
| 3713 | theDDC->setProcessID(rank); |
| 3714 | theDDC->setChannels(numChannels, channels); |
| 3715 | return theDDC; |
| 3716 | #else |
| 3717 | return 0; |
| 3718 | #endif |
| 3719 | |
| 3720 | } |
no test coverage detected