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

Function OPS_ParallelDisplacementControl

SRC/interpreter/OpenSeesCommands.cpp:3663–3720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3661}
3662
3663void* 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}

Callers 1

OPS_IntegratorFunction · 0.85

Calls 9

getMachineBrokerMethod · 0.80
getChannelsMethod · 0.80
getNumChannelsMethod · 0.80
getPIDMethod · 0.80
OPS_GetIntInputFunction · 0.70
OPS_GetDoubleInputFunction · 0.70
setProcessIDMethod · 0.45
setChannelsMethod · 0.45

Tested by

no test coverage detected